Skip to content

Instantly share code, notes, and snippets.

@ca0v
Last active February 26, 2016 18:18
Show Gist options
  • Save ca0v/b68d72e497d1c5c121d6 to your computer and use it in GitHub Desktop.
Save ca0v/b68d72e497d1c5c121d6 to your computer and use it in GitHub Desktop.
rhythm-civics-instrument-list configuration
<Maplet text="Civics Instrument List Maplet" id="rhythm-civics-instrument-list" about="Maplet configuration for Civics Instument List" parentId="toolbar">
<MAP>
<SYMBOLOGY>
<SYMBOL label="&lt;%= computedDescription %&gt;" id="*" template="app/templates/civics-infoviewer-template">
<ICON id="ServiceRequest.png">
<FILTERS>
<FILTER id="_dataType" value="serviceRequest" />
</FILTERS>
</ICON>
<ICON id="Planning_Application.png">
<FILTERS>
<FILTER id="_dataType" value="planning" />
</FILTERS>
</ICON>
<ICON id="License_Application.png">
<FILTERS>
<FILTER id="_dataType" value="businessLicense" />
</FILTERS>
</ICON>
<ICON id="Building_Review.png">
<FILTERS>
<FILTER id="_dataType" value="building" />
</FILTERS>
</ICON>
<ICON id="Project_Application.png">
<FILTERS>
<FILTER value="project" id="_dataType" />
</FILTERS>
</ICON>
<ICON id="Use_Application.png">
<FILTERS>
<FILTER id="_dataType" value="use" />
</FILTERS>
</ICON>
<ICON id="Case.png">
<FILTERS>
<FILTER id="_dataType" value="codeEnforcement" />
</FILTERS>
</ICON>
<ICON id="trade-license" type="style" style="{&#xD;&#xA; &quot;type&quot;: &quot;mixed&quot;,&#xD;&#xA; &quot;fill&quot;: {&#xD;&#xA; &quot;type&quot;: &quot;sfs&quot;,&#xD;&#xA; &quot;style&quot;: &quot;solid&quot;,&#xD;&#xA; &quot;color&quot;: [0, 197, 0, 0.1]&#xD;&#xA; },&#xD;&#xA; &quot;outline&quot;: {&#xD;&#xA; &quot;type&quot;: &quot;sls&quot;,&#xD;&#xA; &quot;style&quot;: &quot;solid&quot;,&#xD;&#xA; &quot;color&quot;: [50, 0, 0, 0.5],&#xD;&#xA; &quot;width&quot;: 4&#xD;&#xA; },&#xD;&#xA; &quot;image&quot;: {&#xD;&#xA; &quot;type&quot;: &quot;icon&quot;,&#xD;&#xA; &quot;icon&quot;: &quot;Building_Application.png&quot;&#xD;&#xA; }&#xD;&#xA;}">
<FILTERS>
<FILTER id="_dataType" value="tradeLicense" />
</FILTERS>
</ICON>
<ICON style="{&#xD;&#xA; &quot;type&quot;: &quot;mixed&quot;,&#xD;&#xA; &quot;fill&quot;: {&#xD;&#xA; &quot;type&quot;: &quot;sfs&quot;,&#xD;&#xA; &quot;style&quot;: &quot;solid&quot;,&#xD;&#xA; &quot;color&quot;: [0, 255, 0, 0.1]&#xD;&#xA; },&#xD;&#xA; &quot;outline&quot;: {&#xD;&#xA; &quot;type&quot;: &quot;sls&quot;,&#xD;&#xA; &quot;style&quot;: &quot;solid&quot;,&#xD;&#xA; &quot;color&quot;: [0, 255, 0, 1],&#xD;&#xA; &quot;width&quot;: 1&#xD;&#xA; },&#xD;&#xA; &quot;image&quot;: {&#xD;&#xA; &quot;type&quot;: &quot;icon&quot;,&#xD;&#xA; &quot;icon&quot;: &quot;Parcel.png&quot;&#xD;&#xA; }&#xD;&#xA;}" label="Parcel &lt;%= PROPNAME %&gt; (&lt;i&gt;&lt;%= PROPID %&gt;&lt;/i&gt;)" template="app/templates/parcel-template" id="parcel" type="style">
<FILTERS>
<FILTER id="PROPTYPE" value="GISType" />
</FILTERS>
</ICON>
</SYMBOL>
<SYMBOL id="parcels" template="app/templates/parcel-template" label="Parcels">
<ICON style="{&#xD;&#xA; &quot;type&quot;: &quot;mixed&quot;,&#xD;&#xA; &quot;fill&quot;: {&#xD;&#xA; &quot;type&quot;: &quot;sfs&quot;,&#xD;&#xA; &quot;style&quot;: &quot;solid&quot;,&#xD;&#xA; &quot;color&quot;: [0, 197, 0, 0.1]&#xD;&#xA; },&#xD;&#xA; &quot;outline&quot;: {&#xD;&#xA; &quot;type&quot;: &quot;sls&quot;,&#xD;&#xA; &quot;style&quot;: &quot;solid&quot;,&#xD;&#xA; &quot;color&quot;: [50, 0, 0, 0.5],&#xD;&#xA; &quot;width&quot;: 4&#xD;&#xA; },&#xD;&#xA; &quot;image&quot;: {&#xD;&#xA; &quot;type&quot;: &quot;icon&quot;,&#xD;&#xA; &quot;icon&quot;: &quot;Parcel.png&quot;&#xD;&#xA; }&#xD;&#xA;}" label="Parcel" template="app/templates/parcel-template" type="style" id="*">
<FILTERS>
<FILTER id="PROPTYPE" value="GISType" />
</FILTERS>
</ICON>
<ICON label="Parcel" template="app/templates/parcel-template" id="parcel" type="style" style="{&#xD;&#xA; &quot;type&quot;: &quot;mixed&quot;,&#xD;&#xA; &quot;fill&quot;: {&#xD;&#xA; &quot;type&quot;: &quot;sfs&quot;,&#xD;&#xA; &quot;style&quot;: &quot;solid&quot;,&#xD;&#xA; &quot;color&quot;: [0, 197, 0, 1]&#xD;&#xA; },&#xD;&#xA; &quot;outline&quot;: {&#xD;&#xA; &quot;type&quot;: &quot;sls&quot;,&#xD;&#xA; &quot;style&quot;: &quot;solid&quot;,&#xD;&#xA; &quot;color&quot;: [50, 0, 0, 5],&#xD;&#xA; &quot;width&quot;: 1&#xD;&#xA; },&#xD;&#xA; &quot;image&quot;: {&#xD;&#xA; &quot;type&quot;: &quot;icon&quot;,&#xD;&#xA; &quot;icon&quot;: &quot;Parcel.png&quot;&#xD;&#xA; }&#xD;&#xA;}">
<FILTERS>
<FILTER id="PROPTYPE" value="GISType" />
</FILTERS>
</ICON>
</SYMBOL>
</SYMBOLOGY>
<LAYERS>
<LAYER maxlevel="20" id="mapquest-sat" minlevel="10" text="Map Quest Sat" type="app/layer-factory/native" basemap="True">
<OPTIONS>
<Values value="mapquest" id="layerType" />
<Values value="sat" id="layerStyle" />
<Values value="true" id="visible" />
</OPTIONS>
</LAYER>
<LAYER maxlevel="20" id="mapquest-osm" minlevel="10" text="Map Quest" type="app/layer-factory/native" basemap="True">
<OPTIONS>
<Values value="mapquest" id="layerType" />
<Values value="osm" id="layerStyle" />
<Values value="true" id="visible" />
</OPTIONS>
</LAYER>
<LAYER id="civics" text="Search Results" type="app/layer-factory/configuration-features">
<COMMANDS>
<COMMAND mid="app/commands/trigger" id="civics-show-details" text="VIEW DETAILS" type="action" disabled="False">
<OPTIONS>
<Values value="civics:show-details" id="event" />
</OPTIONS>
</COMMAND>
</COMMANDS>
</LAYER>
<LAYER type="app/layer-factory/configuration-features" id="parcels" text="Parcels">
<COMMANDS>
<COMMAND mid="app/commands/trigger" id="more-info" text="View Parcel Info" type="action" disabled="False" />
<COMMAND mid="app/commands/trigger" id="zoom-to-feature" text="Zoom to Parcel" type="action" disabled="False" />
<COMMAND mid="app/commands/trigger" id="another-test" text="This has A Long Description" type="action" disabled="False" />
<COMMAND mid="app/commands/trigger" id="Copy Of another-test" text="This has A Long Description" type="action" disabled="False">
<OPTIONS>
<Values value="false" id="text" />
<Values value="ui-icon-home" id="icon" />
<Values value="current-location" id="event" />
</OPTIONS>
</COMMAND>
</COMMANDS>
</LAYER>
</LAYERS>
<VIEWPORT extent="-116, 35, -114, 37" />
</MAP>
<CONTROLS>
<CONTROL about="Uses instrument list template to render search and current location tools" id="toolbar">
<CONTROLS>
<CONTROL mid="app/controls/universal-search-tool" id="universal-search-tool" text="Search by Parcel or Location" disabled="False">
<OPTIONS>
<Values value="app/templates/universal-search-template" id="template" />
<Values value="universal-search" id="event" />
<Values id="region" value="universal-search-tool" />
<Values value="false" id="text" />
</OPTIONS>
<COMMANDS>
<COMMAND type="action" id="search" text="Search by Parcel" disabled="False" mid="app/commands/trigger" about="Does nothing other than allow the search input to lose focus">
<OPTIONS>
<Values id="icon" value="ui-icon ui-icon-search" />
<Values value="false" id="text" />
</OPTIONS>
</COMMAND>
<COMMAND about="Invokes the 'current-location' handler" mid="app/commands/trigger" id="current-location" text="Current Location" type="action">
<OPTIONS>
<Values value="current-location-tool" id="region" />
<Values id="icon" value="ui-icon-home" />
<Values value="false" id="text" />
</OPTIONS>
</COMMAND>
<COMMAND about="clicking this button turns all other geo-selection tools off, useful to disable Show Info if ever needed" mid="app/commands/radio-command" id="noop" type="action" text="Navigate" disabled="True">
<OPTIONS>
<Values value="geo-selection" id="radio-group" />
</OPTIONS>
</COMMAND>
</COMMANDS>
</CONTROL>
<CONTROL about="container for geoselection tools" mid="app/controls/view" id="geoselection-tool">
<COMMANDS>
<COMMAND about="Allow user to click a feature to display information about that feature, set type to 'action' to make it a button" mid="app/commands/feature-selection-tool" id="get-info-tool" text="Get Info" type="startup" disabled="True">
<OPTIONS>
<Values value="point" id="type" about="User can click the map to query feature info (set value to point+box for multi-select)" />
<Values value="show-info" id="event" about="Identifies the desired EVENT handler" />
<Values value="8" id="buffer-size" about="Make the buffer area large enough to easily select point features" />
<Values value="geo-selection" id="radio-group" />
</OPTIONS>
</COMMAND>
</COMMANDS>
<OPTIONS>
<Values id="region" value="feature-selection-tools" />
</OPTIONS>
</CONTROL>
</CONTROLS>
<OPTIONS>
<Values id="template" value="app/templates/instrument-list-template" />
<Values id="css-name" value="civics-instrument-list" />
</OPTIONS>
</CONTROL>
</CONTROLS>
<EVENTS>
<EVENT event="show-info" about="Opens an infoviewer on the map&#xD;&#xA;TODO: add VIEW DETAILS button via template?" mid="app/commands/popup-tool" id="show-info-handler">
<OPTIONS>
<Values id="template" value="app/templates/civics-infoviewer-template" />
</OPTIONS>
</EVENT>
<EVENT event="universal-search" mid="app/commands/google-geocoder" id="google-locator" text="Google Address Locator" type="find" disabled="True">
<OPTIONS>
<Values value="US" id="region" />
</OPTIONS>
</EVENT>
<EVENT event="universal-search" about="Search parcels using universal search value" mid="app/commands/ips-geoquery-locator" id="ips-parcel-locator" text="Parcel Locator" type="find" disabled="True">
<OPTIONS>
<Values value="property/parcels" id="query-service" />
<Values value="{filter:{property:parcelId,operator:Equals,value:&lt;%= location %&gt;}}" id="service-query-template" />
<Values value="Hansen.Property.Parcel" id="symbology" />
<Values value="EPSG:3421" id="srs" />
</OPTIONS>
</EVENT>
<EVENT event="universal-search" about="Use the AGS find service to search for parcels" mid="app/commands/ags-geoquery-locator" id="ags-parcel-locator" text="Parcel Locator" type="find" disabled="False">
<OPTIONS>
<Values value="//usalvwdgis1:6080/arcgis/rest/services/Vegas/MapVegas850/MapServer/17" id="query-service" />
<Values value="parcels" id="symbology" about="Directs the renderer to use the 'parcels' symbologies instead of the default (*) symbologies" />
<Values value="true" id="zoommap" />
<Values value="&lt;%=FID%&gt;" id="key-template" />
<Values id="event" value="add-parcel-to-civics-layer,auto-zoom" />
</OPTIONS>
</EVENT>
<EVENT event="show-in-map" about="Add features on the map" mid="app/commands/render-features" id="show-in-map-handler">
<OPTIONS>
<Values value="false" id="grid" />
<Values value="true" id="map" />
<Values id="maxscalefactor" value="2" />
<Values id="preserve-extent" value="false" />
<Values id="layer" value="civics" />
<Values id="symbology" value="civics" />
</OPTIONS>
</EVENT>
<EVENT id="add-parcel-to-civics-layer-handler" event="add-parcel-to-civics-layer" mid="app/commands/add-features-to-layer">
<OPTIONS>
<Values id="layer" value="parcels" />
<Values id="symbology" value="parcels" />
</OPTIONS>
</EVENT>
<EVENT event="auto-zoom" id="auto-zoom-handler" mid="app/commands/auto-zoom">
<OPTIONS>
<Values id="panmap" value="true" />
<Values id="zoommap" value="true" />
<Values value="false" id="preserve-extent" />
<Values value="10" id="maxscalefactor" />
</OPTIONS>
</EVENT>
<EVENT event="current-location" mid="app/commands/geolocation-tool" id="current-location-handler" />
</EVENTS>
<OPTIONS>
<Values value="civics-instrument-list" id="css-name" about="loads a custom css to manipulate toolbar layout" />
</OPTIONS>
<COMMANDS>
<COMMAND about="Use a layer switcher designed by the ol3 community" id="layer-switcher" disabled="False">
<OPTIONS />
</COMMAND>
<COMMAND mid="app/commands/feature-selection-tool" id="get-info-tool" text="Get Info" type="startup" about="Allow user to click a feature to display information about that feature; this is failing because the map is not loaded by the time this runs so moving it into a toolbar control" disabled="False">
<OPTIONS>
<Values value="point" id="type" about="User can click the map to query feature info (set value to point+box for multi-select)" />
<Values value="show-info" id="event" about="Identifies the desired EVENT handler" />
<Values value="8" id="buffer-size" about="Make the buffer area large enough to easily select point features" />
</OPTIONS>
</COMMAND>
</COMMANDS>
</Maplet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment