Skip to content

Instantly share code, notes, and snippets.

@ca0v
Last active March 5, 2019 12:59
Show Gist options
  • Save ca0v/26fd44a5371d64e46ac6dc4d43d035fc to your computer and use it in GitHub Desktop.
Save ca0v/26fd44a5371d64e46ac6dc4d43d035fc to your computer and use it in GitHub Desktop.
For Stephen Stralka

app/app

The programmatic point-of-contact with the map control instantiated by liferay-runner and facilitated through the mediator.

The create method bootstraps the maplet environment and passes control to an applications/rhythm-gis-app instance, which has access to this API as well as the underlying configuration.

If no configuration is provided create() queries the rest service for the 'base' configuration.

Once the configuration arrives from the configuration service:

  1. The API() is created and initialized with the configuration.
  2. A controller is assigned to the API. This is an application controller and is implemented in ./applications/rhythm-gis-app.
  3. The api.run() waits for the controller to signal it is "ready-to-start" before calling controller.start(). When the controller signals it is "running" the api.run() callback resolves.

But what does the application controller do?

  1. It is a Marionette application and it listens for "view" events to register those views with the one and only application view (AppView). Although the AppView is about to be created, it hasn't yet. The "view" handler defers to the mediator.appView to provide it. Once it does any past and future "view" is managed here.
  2. Meanwhile, the AppView template starts loading. Once it finishes the AppView is created and the mediator notified, and indirectly, the "view" handler.
  3. The AppView renders inside the "region" of application and the app signals it is "ready-to-start". Recall the api calls application.start(), which triggers "start", which invokes createMapView(). It also signals the application is "running", which is true, although the map has yet to load!
  4. createMapView() creates a view controller and then calls createView on that controller. In this case, the controller is ./controls/map and the only option forwarded is the "region". It uses the "region" defined under the Map options in configuration or defaults to "maplet-region".
  5. The controller uses ./views/MapView and there is no way of changing this.
  6. The ./application/rhythm-gis-app has hard-coded configuration for the map controller, setting only the "region". See createMapView().
  7. The map controller sets up event forwarding from the mapView based on applet-level events.
  8. The controller tells the mediator that "mapView" is available.
  9. The meditor tells the controller appView is available so it renders the mapView within an appView region ("maplet-region").
API Methods Description
merge Merges a configuration into this application instance

app/applications/rhythm-gis-app

A Marionette Application utilizing mediator to manage a map.
The mediator facilitates messaging, data sharing and safe(1) access to views (they initialize asynchronously).

The controller logic is confusing because it creates the application view and stores it with the mediator after it starts watching the mediator for this same view and trigger the creation of a map view.

Mediator Properties Description
view the view to render into the region identified via configuration

Accepts the following options:

option about
css css file to load
css-name The class name to assign to the view [default: applet.id]
region region to use for this view [default: applet-region]

app/collections/base-collection

Base collections provide merge, updateModel and onAdd helpers to simplify management.

app/collections/bookmark-collection

Bookmarks

app/collections/feature-collection

Features

app/collections/layer-collection

Layers

app/collections/symbology-collection

Symbology provides findSymbol method to honor symbology filtering rules.

app/collections/tabs-collection

Markup meant to be rendered in tabs. Used by tabs.

app/commands/add-features-to-layer

Adds features to a specific layer using a specific symbology. Features coming through this command are added to the vector layer identified by the layer-name option. Commands associated with the layer render in the infoviewer. The features default symbology is identified by the symbology option.

Usage Example:

An originating event e.g. ags-geoquery-locator place layers on the bus:

<EVENT about="When user clicks map perform a search for addresses in that area" event="reverse-geoquery" id="ags-address-reverse-locator" mid="app/commands/ags-geoquery-locator" type="spatial">
<OPTIONS>
    <Values id="query-service" value="https://usalvqa1.infor.com/arcgis/rest/services/IPS850/QASQL4850/MapServer" />
    <Values id="key-template" value="&lt;%=FID%&gt;" />
    <Values id="layers" value="1" />
    <Values about="once the addresses are found notify the handler that will add them to the address layer" id="event" value="add-to-address-layer" />
</OPTIONS>
</EVENT>    

Allowing this handler to merge the features within the layers collection with the target layer:

<EVENT event="add-to-address-layer" id="add-to-address-layer-handler" mid="app/commands/add-features-to-layer">
<OPTIONS>
    <Values id="layer-name" value="address-features" />
    <Values id="symbology" value="addresses" />
</OPTIONS>
</EVENT>

Accepts the following options:

option about
box When present, identifies the search area resulting in this merge request.
layer-name the target layer
layers the feature collection
pixel converts this pixel into a WGS84 coordinate and assigns to the features image-center attribute.
symbology the symbology rule to invoke
target-geometry-type if point then convert polygon to point feature [domain: point,polyline,polygon]

app/commands/add-projection

Adds proj4 projections where each option id is the spatial code (value=definition), e.g.

id value
EPSG:102707 +proj=tmerc +lat_0=34.75 +lon_0=-115.5833333333333 +k=0.9999 +x_0=200000 +y_0=7999999.999999999 +datum=NAD83 +units=us-ft +no_defs

Usage Example:

<COMMAND about="defines available proj4 projections" id="add-projection" mid="app/commands/add-projection" type="startup">
  <OPTIONS>
    <Values id="EPSG:102113" value="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs" />
    <Values id="EPSG:3857" value="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs" />
    <Values id="EPSG:102100" value="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext  +no_defs" />
  </OPTIONS>
</COMMAND>

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

app/commands/ags-geoquery-locator

Uses the ArcGIS Server find a query services implemented by services/ags/map-service-reader to perform spatial and non-spatial queries.

Handles three types of commands:

type about
find Invokes the "find" service of ArcGIS Server. See the "ARCGIS REST API-FIND":http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000zm000000.
join Requires "query-service" and "service-query-template" option to perform one query per input layer. Each query is build from all provided features concatenated with "OR".
spatial Requires "query-service" option an a "box" or "point" argument to execute a spatial filter, which does not contain a data filtering component

If no type is provided The default is "spatial", but the presence of a "service-query-template" option indicates "join". If that option is not missing and it is called with a "location" argument then it assumes the type is "find".

Usage Example:

<EVENT about="Use the AGS find service to search for parcels" disabled="False" event="universal-search" id="ags-parcel-locator" mid="app/commands/ags-geoquery-locator" text="Parcel Locator" type="find">
  <OPTIONS>
    <Values id="query-service" value="https://usalvqa1.infor.com/arcgis/rest/services/IPS850/QASQL4850/MapServer/16&amp;sr=4326" />
    <Values about="Directs the renderer to use the 'parcels' symbologies instead of the default (*) symbologies" id="symbology" value="parcels" />
    <Values id="zoommap" value="true" />
    <Values id="key-template" value="&lt;%=FID%&gt;" />
    <Values about="Once the results are gathered forward them to the 'geoquery-result' handler" id="event" value="add-to-parcel-layer,auto-zoom" />
    <Values about="merge features into the parcel-features layer" id="layer-name" value="parcel-features" />
    <Values about="do a parcel search during a universal-search event and associate the results to the _parcel_ keyword" id="keywords" value="parcel" />
  </OPTIONS>
</EVENT>

Accepts the following options:

option about
box search area as a rectangle
buffer-size grow the search extent but this many pixels [default: 8]
event the event to trigger [default: geoquery-result]
filter data filter
key-template template for computing the features key value [default: <%=OBJECTID%>]
keywords when present prevents execution when message bus contains keywords and none match; facilitating execution scope (e.g. universal-search can be configured to perform 'parcel' searches by providing a parcel keyword).
layerDefs restrict search to these layers
layers
        | type  | about |
        | find  | list of layers to search when doing a 'find' |
        | join  | all features from each layer are run through the query template to perform the join |
        | spatial | spatial join using the first feature in the first layer |
         |

| location | the search text | | max-feature-count | when present, find and query both reduce the result set to this count | | pixel | search location as a pixel | | point | search location as a point | | queryService | the ags rest endpoint | | service-query-template | the query template for a 'join' request | | type | Identifies the query type [domain: find,join,spatial] [default: spatial] |

Puts the following arguments onto the stack:

output about
filterInfo the input filter options (url, searchText, layers)
layers the results of the 'find' or 'query'
metadata the fields of a query response
query the 'join' OR clause
serviceInfo the options of this commands
typeName the filterInfo layers
url the service endpoint

app/commands/ags-geoquery-processor

Converts form input to an ArcGIS query and executes that query. Depends on controls/ags-geoquery-form-tool and services/ags/map-service-reader. Requires a "url" option.

All options are forwarded to map-service-reader.

Accepts the following options:

option about
event event to raise when result obtained [default: geoquery-result]
key-template underscore template for computing a feature id, inherited from invoking controller
returnCountOnly Only return the count of matching features, forwarded to map-service-reader
returnGeometry Include the geometry in the response, forwarded to map-service-reader
returnIdsOnly Only return the feature ids, forwarded to map-service-reader
symbology symbology to use when rendering the results, inherited from invoking controller
url ags query service url, inherited from invoking controller

Puts the following arguments onto the stack:

output about
filter The query data
layers The response data
metadata The response metadata
query The form data encoded as a filter
url The input endpoint

app/commands/alert

Opens an alert window to display a message.

Accepts the following options:

option about
message the message to show as an window alert

app/commands/annotation-tool

Creates a drawing tool.

Usage Example:

<CONTROL disabled="False" id="annotation-tool" mid="app/controls/view" text="Annotations">
<COMMANDS>
    <COMMAND id="annotation-polygon-tool" mid="app/commands/annotation-tool" text="Draw Polygon" type="action">
    <OPTIONS>
        <Values id="type" value="Polygon" />
        <Values id="toggle" value="true" />
        <Values id="symbology" value="annotations" />
        <Values id="radio-group" value="geo-selection" />
    </OPTIONS>
    </COMMAND>
    <COMMAND id="annotation-polyline-tool" mid="app/commands/annotation-tool" text="Draw Line" type="action">
    <OPTIONS>
        <Values id="type" value="LineString" />
        <Values id="toggle" value="true" />
        <Values id="symbology" value="annotations" />
        <Values id="radio-group" value="geo-selection" />
    </OPTIONS>
    </COMMAND>
    <COMMAND id="annotation-point-tool" mid="app/commands/annotation-tool" text="Draw Point" type="action">
    <OPTIONS>
        <Values id="type" value="Point" />
        <Values id="toggle" value="true" />
        <Values id="symbology" value="annotations" />
        <Values id="radio-group" value="geo-selection" />
    </OPTIONS>
    </COMMAND>
    <COMMAND id="annotation-multipoint-tool" mid="app/commands/annotation-tool" text="Draw Points" type="action">
    <OPTIONS>
        <Values id="type" value="MultiPoint" />
        <Values id="toggle" value="true" />
        <Values id="symbology" value="annotations" />
        <Values id="radio-group" value="geo-selection" />
    </OPTIONS>
    </COMMAND>
    <COMMAND id="annotation-clear-tool" mid="app/commands/annotation-tool" text="Clear Drawings" type="action">
    <OPTIONS>
        <Values id="stop" value="true" />
        <Values id="clear" value="true" />
    </OPTIONS>
    </COMMAND>
</COMMANDS>
</CONTROL>

Accepts the following options:

option about
clear clear annotations [default: false]
radio-group Commands sharing this group are considered to be mutually exclusive [default: geo-selection]
start activates the drawing tool of the given type [default: false]
stop suspends the active drawing tool [default: false]
toggle activates if deactivate, deactivates if active [default: true]
type type of geometry to draw [domain: Point,LineString,Polygon,Circle] [default: Point]

app/commands/api/get-current-extent

Put the current extent on the bus.

Usage Example:

<EVENT 
    about="return map extent for filtering" 
    event="liferay:map-trace-extent"
    id="map-trace-extent-handler" 
    mid="app/commands/api/get-current-extent" />

Accepts the following options:

option about
include-features true to include features that are within the extent [domain: true,false] [default: false]
trace true to write data to the console [domain: true,false] [default: false]

Puts the following arguments onto the stack:

output about
box the map extent
center center of map
extent the map extent
layers the features within the map extent
resolution map resolution
rotation map rotation
wkid wkid of map projection
zoom map zoom level

app/commands/arcgis-directory-service

Uses the directoryService method provided by utils/ags/ags-directory to obtain layer definitions and add them to the layer collection of the configuration. Requires a "url" option to perform a discovery of all available services.

Accepts the following options:

option about
url the ags discovery endpoint

app/commands/auto-zoom

Zooms the map around a collection of features unless zoommap = "false", in which case it only re-centers the map about the features Pans the map to the center of the features unless panmap = "false", in which case it only grows the current extent to include the new features The collection of features includes all features ever seen by this command unless preserve-extent = "false", in which case it only considers the current features.

Example Usage:

<EVENT event="auto-zoom,liferay:auto-zoom" id="auto-zoom-handler" mid="app/commands/auto-zoom">
<OPTIONS>
    <Values id="panmap" value="true" />
    <Values id="zoommap" value="true" />
    <Values about="true =&gt; Prevent the current viewport to pan out of view" id="preserve-extent" value="false" />
</OPTIONS>
</EVENT>

Accepts the following options:

option about
panmap false to prevent panning [default: true]
preserve-extent true to prevent current extent from being clipped [default: true]
zoommap false to prevent zooming [default: true]

app/commands/base-command

This is the base of all other commands. It provides the command options as a config property that can be extended without modifying the source command.

It introduces support for the "event" option, which can be a comma-separated list of event names.

It introduces the trigger method, which creates "in" and "out" arguments before calling mediator.trigger, once for each event.

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

app/commands/base/geoquery

Assigns a key value to each feature using an underscore template provided by the key-template option. The unique value is stored as the id attribute of the feature.

This is a command helper used by other commands. The assignKeys method to performs the work.

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
key-template required underscore template to produce a unique id from feature attributes
trace write the command state to the console window

app/commands/base/keywords

Compares the command keywords option against the argument keywords to determine if the command should execute.

This is a command helper used by other commands supporting the keywords option. The validate method to performs the work.

app/commands/base/locator

Search text field(s) of a collection. Field name(s) are identified by the search-field option. The collection is identified by the model attribute.

Accepts the following options:

option about
calculator Replacement calculator for determining string distances [default: app/utils/levenshtein-distance]
model mid identifying a collection to search (not a model), uses mediator.api.features by default
panmap Pan map to bring results into view [default: true]
search-field comma-separated list of fields to search within this collection [default: text]
zoommap Zoom map to bring results into full view [default: true]

Puts the following arguments onto the stack:

output about
features list of features that were located

app/commands/basemap-tool

Logic to select the correct basemap.

Accepts the following options:

option about
allow-multi if "true", allows multiple basemaps to be visible at one time
default-basemap Identifies the desired default basemap, if not provided the first visible basemap is assumed to be the default

Puts the following arguments onto the stack:

output about
basemap A basemap configuration

app/commands/bookmark-locator

Overrides base/locator to perform a text search against all configured bookmarks.

Accepts the following options:

option about
calculator Replacement calculator for determining string distances [default: app/utils/levenshtein-distance]
model mid identifying a collection to search (not a model), uses mediator.api.features by default [default: app/data/bookmarks]
panmap Pan map to bring results into view [default: true]
search-field comma-separated list of fields to search within this collection [default: text]
zoommap Zoom map to bring results into full view [default: true]

Puts the following arguments onto the stack:

output about
features list of features that were located

app/commands/bookmark-selected-handler

Handles a bookmark selection event

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

app/commands/command-handler

Executes a command passed as argument, prefer this.trigger("command", {command: CommandLeaf}) over Utils.execute to allow swapping in additional "command" handlers or replacing this handler entirely.

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

app/commands/create-point-feature

Converts a pixel, point or box into a point feature with lon/lat attributes.

Usage Example:

<EVENT about="Adds a feature to the map every time the user clicks on a non-feature (features are after every click so this has to happen last)" disabled="False" event="show-click-location" id="show-click-location-handler" mid="app/commands/create-point-feature">
<OPTIONS>
    <Values about="Renders the click location as a point on the points layer" id="event" value="add-to-points-layer" />
    <Values id="symbology" value="points" />
    <Values id="debug" value="false" />
</OPTIONS>
</EVENT>

Accepts the following options:

option about
box geometric extent
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

Puts the following arguments onto the stack:

output about
layers layer containing single feature with 'lon' and 'lat' values

app/commands/destroy-maplet

Invokes destroy on the maplet

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

app/commands/dom

facilitates modifying input elements and can be used to put values on the args stack

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
selector css selector to find the target elements
trace write the command state to the console window
value the new value

Puts the following arguments onto the stack:

output about
original the value before applying the change
type change
value the current value

app/commands/feature-clear-all

Requests all features from all layers to be unselected.

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

Puts the following arguments onto the stack:

output about
selected always empty
unselected list of features that were previously selected

app/commands/feature-collection-handler

Creates a vector layer and renders application-level features.

Usage Example:

<COMMAND about="watches the feature collection and keeps it in sync with a vector layer" disabled="False" id="feature-collection-handler" mid="app/commands/feature-collection-handler" type="startup" />

Accepts the following options:

option about
symbology if symbology set on the handler use it as the default feature symbology

app/commands/feature-highlight-handler

Highlights "selected" features, removes highlight from "unselected" features.

Accepts the following options:

option about
selected the features that need to be selected
symbology Style to use when rendering highlighted features
unselected the features that need to be unselected

app/commands/feature-hover

Listens for map "pointermove" event and triggers an event with "selected" and "unselected" features.

Accepts the following options:

option about
delay Debounce delay, in milliseconds, before invoking the pointermove callback. [default: 100]

app/commands/feature-locator

Extends base/locator to perform a text search against all features

Accepts the following options:

option about
calculator Replacement calculator for determining string distances [default: app/utils/levenshtein-distance]
model mid identifying a collection to search (not a model), uses mediator.api.features by default [default: api.features]
panmap Pan map to bring results into view [default: true]
search-field comma-separated list of fields to search within this collection [default: text]
zoommap Zoom map to bring results into full view [default: true]

Puts the following arguments onto the stack:

output about
features list of features that were located

app/commands/feature-selection-tool

Identifies a group of features by selecting them.

Usage Example:

<COMMAND 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" id="get-info-tool" mid="app/commands/feature-selection-tool" text="Get Info" type="startup">
  <OPTIONS>
    <Values about="User can click the map to query feature info (set value to point+box for multi-select)" id="type" value="point" />
    <Values about="Identifies the desired EVENT handler" id="event" value="show-info" />
    <Values about="Make the buffer area large enough to easily select point features" id="buffer-size" value="16" />
    <Values id="condition" value="none" />
    <Values about="Ignore the green and red zones when searching for existing features" id="exclude-layer" value="green-zone,red-zone" />
  </OPTIONS>
</COMMAND>    

This module has the job of searching the map for features within an extent.
It can do this by "box", "point" or "box+point" interactions.
A "point" interaction is just a small "box" interaction.
The size is calculated in pixels and the pixel buffer size is configured with the "buffer-size" option.
It selects all the features and signals an event.

Here is another usage example providing a "filter" to include only addresses (AddrType = 'A'):

<COMMAND mid="app/commands/feature-selection-tool" about="Allow user ability to select addresses without selecting any other types of features" text="Select Addresses" id="select-address-only" type="action">
 <OPTIONS>
 <Values value="box" id="type" />
 <Values about="Provide a name for handler to listen on" value="address-selection" id="event" />
 <Values value="geo-selection" id="radio-group" />
 </OPTIONS>
</COMMAND>

In this case, the event is "address-selection".
The purpose of this command is to select addresses and nothing else. he event listening to this command does the actual work:

<EVENT event="address-selection" mid="app/commands/feature-selector" text="Select Addresses" disabled="False" id="ips-address-selector">
 <OPTIONS>
 <Values about="Select addresses from the address test layer" value="{&quot;moniker&quot;: &quot;Hansen.Property.Address&quot;}" id="filter" />
 </OPTIONS>
</EVENT>

Accepts the following options:

option about
condition The click event should be accompanied by what keyboard condition? [domain: always,alt,ctrl,shift,alt+shift,never,none] [default: none]
exclude-layer comma-separated list of layers to ignore
symbology Symbology to use when rendering the selection box [default: selection-box]
type identifies how a feature can be selected [domain: default,point,box,point+box] [default: default]

app/commands/feature-selector

Selects features based on input geometry and optionally highlight them.

Accepts the following options:

option about
hilite use built-in higlighter
toggle-rule Internal algorithm used to interpret toggle; "simple" does a literal toggle, "smart" select everything within the area unless everything is already selected, then it unselects everything.

app/commands/flash-feature

Renders a feature for one second then removes it from the map.

Usage Example:

<EVENT about="Temporarily display geometry" event="flash-buffer" id="flash-buffer-handler" mid="app/commands/flash-feature">
<OPTIONS>
    <Values about="wait one second before removing feature" id="delay" value="0" />
</OPTIONS>
</EVENT>

Accepts the following options:

option about
box the rectangle to hilite
delays time, in seconds, to show feature [default: 1]
extent the rectangle to hilite
feature the feature to hilite

Puts the following arguments onto the stack:

output about
feature feature that was flashed
flash indicates if the feature should flash - true the first time and false when called after delays seconds [domain: true,false]

app/commands/geolocation-tool

Trigger when a geolocation even takes place.

Example Usage:

<EVENT about="pan to current location, chrome requires https" event="current-location" id="current-location-handler" mid="app/commands/geolocation-tool" type="action" />

Accepts the following options:

option about
track see ol.Geolocation tracking, requests notification when device location changes [default: false]

Puts the following arguments onto the stack:

output about
position the location reported by the browser

app/commands/geoquery-result-handler

DEPRECATE.

This is essentially just forwarding events (e.g. listen for "foo", trigger "bar1,bar2") so could be replaced with base-command once dependent events are 'findOption' aware

Accepts the following options:

option about
panmap forwarded to listeners to indicate if the map is allowed to pan [default: true]
symbology forwarded to listeners to indicate how the results should be rendered
zoommap forwarded to listeners to indicate if the map is allowed to zoom [default: false]

app/commands/google-geocoder

google geocoder

Usage Example:

<EVENT about="reverse-geocode on every map-click" event="map-click" id="google-reverse-locator" mid="app/commands/google-geocoder">
<OPTIONS>
    <Values about="one of true,false,auto but in this case true will try to find an address when the map is clicked" id="reverse" value="true" />
    <Values about="valid values include street_address, neighborhood, political, postal_code, administrative_area_level_1, administrative_area_level_2" id="google-result-type" value="street_address" />
    <Values about="the place_id is a google feature identifier, use it as our feature key" id="key-template" value="&lt;%=place_id %&gt;" />
    <Values about="Place the marker on the map (the marker has a label so don't show the info viewer)" id="event" value="geoquery-result" />
    <Values about="Only executes when the shift key is pressed" id="condition" value="shift" />
</OPTIONS>
</EVENT>    

Accepts the following options:

option about
condition reverse geocoding only performed when alt
coordinates the click location
event the event to publish [default: geoquery-result]
extent limits the search extent [default: Map.Viewport.extent]
google-api google api endpoint [default: https://www.google.com/maps]
google-api-key google api key [default: [GOOGLE-API-KEY]]
google-result-type comma-separated list of possible result types (e.g. street-address) [domain: street_address,neighborhood,political,postal_code,administrative_area_level_1,administrative_area_level_2] [default: street_address]
location the search text
map internal reference to the underlying map
reverse auto

Puts the following arguments onto the stack:

output about
layers the search results
status status message from google, explains why layers.count = 0

app/commands/goto-url

admittedly convoluted!
popup-tool command creates InfoViewer controller containing google-it command handled by goto-handler

Accepts the following options:

option about
popup true to open as a popup dialog
url-template identify the markup template

Puts the following arguments onto the stack:

output about
url The URL to goto

app/commands/growl

Adds a growl element to the bottom-right of the window.

Usage Example:

<EVENT about="Add &quot;growl&quot; handler to support notifying user when no results are found" event="growl" id="growl" mid="app/commands/growl">
<OPTIONS>
    <Values about="Clear message after 5 seconds" id="remove-delay" value="5" />
</OPTIONS>
</EVENT>

Accepts the following options:

option about
className The css class name to assign to the main element [default: ol-control bottom-1 left-1 growl]
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
remove-delay number of seconds to wait before auto-dismissing the message area [default: 5]
trace write the command state to the console window

app/commands/infoviewer-paging-as-feature-click-event

Make an infoviewer page event look like a feature click event.

Usage Example:

<EVENT about="When paging occurs treat that as if the user clicked the associated feature" event="show-info-handler-controller" id="synthetic-click" mid="app/commands/infoviewer-paging-as-feature-click-event">
<OPTIONS>
    <Values about="highlight the feature each time the user pages" id="event" value="flash-buffer" />
    <Values id="debug" value="false" />
</OPTIONS>
</EVENT>

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

Puts the following arguments onto the stack:

output about
feature the active infoviewer feature

app/commands/ips-geoquery-locator

Extends base/geoquery to execute a text or spatial search depending on input arguments.

Example Usage:

<EVENT about="Search addresses for universal search value" event="universal-search" id="ips-address-locator" mid="app/commands/ips-geoquery-locator" text="Address Locator" type="find">
<OPTIONS>
    <Values id="query-service" value="property/addresses" />
    <Values id="service-query-template" value="{&#xD;&#xA;    &quot;formulaName&quot;: &quot;FalseMapValidation&quot;,&#xD;&#xA;    &quot;Data&quot;: {&#xD;&#xA;        &quot;attributes&quot;: {&#xD;&#xA;            &quot;PARCLKEY&quot;: 10153454,&#xD;&#xA;            &quot;PARCLID&quot;: &quot;00005-44454-4546&quot;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}" />
    <Values id="symbology" value="addresses" />
    <Values about="Once the results are gathered forward them to the 'geoquery-result' handler" id="event" value="geoquery-result" />
</OPTIONS>
</EVENT>

Accepts the following options:

option about
box an extent, transformed into x1 x2 y1 y2 to be template-friendly
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes [default: geoquery-result]
key-template required underscore template to produce a unique id from feature attributes [default: <%=id%>]
locatingproperties the attributes to examine to determine the feature location
location a description of a location
point a selection point
query-service Public Sector REST endpoint
service-query-template filter template
trace write the command state to the console window

Puts the following arguments onto the stack:

output about
layers the search results
serviceInfo the input options

app/commands/ips-geoquery-processor

Converts an auto-generated IPS query form data into an IPS REST query.

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes [default: geoquery-result]
key-template required underscore template to produce a unique id from feature attributes [default: <%=id%>]
trace write the command state to the console window

Puts the following arguments onto the stack:

output about
layers the search results

app/commands/ips-query

Executes an Infor Public Sector REST service.

Usage Example:

See app/test/commands/multiplexer for a complex example of querying property/parcels to validate the existing of a parcel.

Experimental Usage Example (Formula):

  <EVENT about="Invokes arbitrary REST service but in this case it is a formula to decide if this is a valid parcel" event="civics:show-details" id="formula-validator" mid="app/commands/ips-query">
    <OPTIONS>
      <Values about="once the validation result is available notify the validator" id="event" value="formula-validation" />
      <Values about="REST endpoint" id="query-service" value="portal/scenario/map/location/validation" />
      <Values id="service-query-template" value="{&#xD;&#xA;    &quot;formulaName&quot;: &quot;FalseMapValidation&quot;,&#xD;&#xA;    &quot;Data&quot;: {&#xD;&#xA;        &quot;attributes&quot;: {&#xD;&#xA;            &quot;PARCLKEY&quot;: 10153454,&#xD;&#xA;            &quot;PARCLID&quot;: &quot;00005-44454-4546&quot;&#xD;&#xA;        }&#xD;&#xA;    }&#xD;&#xA;}" />
      <Values about="What populates the query template. - in this case the template &quot;Data&quot; is the activeFeature" id="data" value="activeFeature" />
    </OPTIONS>
  </EVENT>

The service-query-template value when unescaped looks like this and would be used to invoke the FalseMapValidation formula made available on portal/scenario/map/location/validation:

{
    "formulaName": "FalseMapValidation",
    "Data": {
        "attributes": {
            "PARCLKEY": 10153454,
            "PARCLID": "00005-44454-4546"
        }
    }
}

Accepts the following options:

option about
data the name of the attribute to pass to the query template
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
key-template required underscore template to produce a unique id from feature attributes
query-service the REST endpoint
service-query-template the query template
trace write the command state to the console window

Puts the following arguments onto the stack:

output about
request the query that was sent to the endpoint
response the response from the service

app/commands/layer-switcher

Wrapper for the ol3-layerswitcher control.

Accepts the following options:

option about
control-mid used to override the default control (ol3-layerswitcher)

app/commands/liferay-interpreter

Listens for mediator events and posts them to the liferay listener.

Usage Example:

<COMMAND about="Listens for mediator events, re-interprets the arguments and triggers a new event on the civics channel" id="liferay-interpreter" mid="app/commands/liferay-interpreter" type="startup">
  <OPTIONS>
    <Values id="channel-name" value="civics-channel" />
    <Values id="liferay-echo-prefix" value="liferay" />
    <Values id="debug" value="false" />
    <Values about="take a snapshot of the feature(s)" id="snapshot" value="true" />
    <Values about="events to forward to liferay" id="forward" value="map:clicked,map:paging,civics:show-details,civics:zone-validation,civics:paging,show-info,show-feature-info,civics:map-click-results,flash-buffer,show-info-handler-controller" />
    <Values about="Creates a stub listener (liferay will not get events)" id="stub" value="false" />
    <Values about="write to console" id="trace" value="false" />
  </OPTIONS>
</COMMAND>

Accepts the following options:

option about
channel-name The radio channel to use when communication with liferay
forward Limit the events which should be forwarded to liferay.
liferay-echo-prefix Listens for mediator events, re-interprets the arguments and triggers a new event on the civics channel prefixing the name of the original event.
locatingproperties One or more attribute paths to probe for location information [default: address,property,parcel,instrument]
snapshot take a snapshot of the feature(s)
stub Creates a fake liferay radio channel

app/commands/map-event-handler

Deprecate.

Sample handler that puts the map viewState, zoom and center on the bus.

Usage Example:

<EVENT 
    about="logs the maps viewstate each time the resolution changes" 
    event="map-resolution" 
    id="map-event-handler" 
    mid="app/commands/map-event-handler" />

See get-current-extent for getting the extent as well as markers within that extent.

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

app/commands/map-hover-handler

Proxy for the openlayers MousePosition control.

Accepts the following options:

option about
class-name class name to assign to the MousePosition control [default: xy-position]
default-markup Markup to use when the control doesn't have a position to report [default:  ]
fractions Number of decimal places [default: 4]
projection spatial reference system [default: EPSG:4326]

app/commands/measure-tool

Uses a draw interaction as a measurement tool (should be in the control namespace)

Accepts the following options:

option about
clear Clear prior measurement [default: false]
event event(s) to fire upon completion [default: measurement]
geodesic perform geodesic measurements [domain: true,false] [default: true]
radio-group Commands sharing this group are considered to be mutually exclusive [default: geo-selection]
symbology Symbology to use when rendering measurements [default: measure-tool]

Puts the following arguments onto the stack:

output about
feature the feature representing the measurement
final true when this is the full measurment (tool is no longer active)
measure the measurement

app/commands/measurement-handler

Converts a measurement

Accepts the following options:

option about
autoformat automatically convert to larger units (ft->mi, m->km) [default: true]
default-uom Unit of measure to use when rendering measurements [domain: english,metric,meters] [default: metric]
geodesic Use geodesic [default: true]
symbology Symbology to use when rendering measurements [default: measurements]

app/commands/more-info

This is a sample handler to facilitate responding to a 'More Info' button click.

Define a command to put the event on the bus:

<COMMAND id="more-info" mid="app/commands/trigger" text="More Property Information" type="action">
<OPTIONS>
    <Values id="event" value="more-info" />
</OPTIONS>
</COMMAND>

Now define a handler to listen to that event:

<EVENT 
    about="Test features contain more-info commands, this just opens a test dialog" 
    event="more-info" 
    id="more-info-handler" 
    mid="app/commands/more-info" 
    text="Show Additional Feature Information" type="point" />

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

app/commands/multiplexer

Usage Example:

<EVENT about="Each time reverse-geoquery initiates wait until both the address and parcel search returns before raising show-coordinates" event="reverse-geoquery" id="reverse-geoquery-multiplexer" mid="app/commands/multiplexer">
<OPTIONS>
    <Values about="Only do this once per &quot;use-this-parcel&quot; event" id="once" value="true" />
    <Values id="in" value="add-to-address-layer,add-to-parcel-layer,associated-addresses,find-associated-addresses" />
    <Values about="civics:map-click-results is picked up by liferay-interpreter and given to civics, notify show-coordinates so it can render a location marker if no features are found" id="out" value="show-coordinates,civics:map-click-results" />
</OPTIONS>
</EVENT>

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
in Event(s) that must occur before triggering out events
once Only do this once per event
out Event(s) to trigger once all in event have been received.
trace write the command state to the console window

app/commands/ogcwfs-geoquery-locator

Uses the WfsGetFeatureReader in ogc/wfs-readers to locate a feature in a WFS service

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes [default: geoquery-result]
key-template required underscore template to produce a unique id from feature attributes [default: <%=OBJECTID%>]
query-service url to query
service-query-template filter template
trace write the command state to the console window
typeName passes through to the WfsGetFeatureReader

app/commands/ogcwfs-geoquery-processor

Assigns a key value to each feature using an underscore template provided by the key-template option. The unique value is stored as the id attribute of the feature.

This is a command helper used by other commands. The assignKeys method to performs the work.

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
key-template required underscore template to produce a unique id from feature attributes
trace write the command state to the console window

app/commands/pan

Pan the map left/right/up/down depending on the direction options.

Accepts the following options:

option about
direction the pan direction [domain: left,right,up,down]

Puts the following arguments onto the stack:

output about
pan the pan direction or the geometry of the feature panned to [domain: left,right,up,down or a feature geometry]

app/commands/popup-tool

Generalized to launch any controller but launches the InfoViewer by default.

Accepts the following options:

option about
control Identify the infoviewer control [default: app/controls/infoviewer]
control-id The id to assign to the control [default: id-controller]
feature The feature to render
layer The layer associated with the feature
layers Render all features in these layers
selected The feature to render
template The infoviewer template [default: app/templates/infoviewer-template]

Puts the following arguments onto the stack:

output about
viewer InfoViewer instance for viewing the data associated with a feature.

app/commands/radio-command

Place this command in a group of mutually exclusive commands.

Accepts the following options:

option about
radio-group Commands sharing this group are considered to be mutually exclusive [default: geo-selection]

app/commands/render-bookmarks

Obsolete. Remove this command.

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

app/commands/render-features

Render layer and map-level features on a grid and map and manage viewport changes.

Usage Example:

<EVENT about="Add features on the map" event="show-in-map" id="show-in-map-handler" mid="app/commands/render-features">
  <OPTIONS>
    <Values id="grid" value="false" />
    <Values id="map" value="true" />
    <Values id="preserve-extent" value="false" />
  </OPTIONS>
</EVENT>

See https://wiki.infor.com/confluence/display/~CALIX/2015/10/13/render-features

Accepts the following options:

option about
map indicate if the results should be rendered on the map (requires symbology) [domain: true,false] [default: true]
panmap indicate if the map should pan to show the result(s) [domain: true,false] [default: true]
symbology symbology to use [default: *]
zoommap indicate if the map should zoom in/out to show the result(s) [domain: true,false] [default: true]

Puts the following arguments onto the stack:

output about
layers features to be rendered

app/commands/schema-to-typescript

Obsolete. Remove this command

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

app/commands/show-layer-handler

If layer is decorated with an extent then ensure that extent is visible when layer is made visible

Usage Example:

<EVENT about="If layer is decorated with an extent then ensure that extent is visible when layer is made visible" event="show-layer" id="show-layer-handler" mid="app/commands/show-layer-handler">
<OPTIONS>
    <Values id="panmap" value="true" />
    <Values id="zoommap" value="true" />
</OPTIONS>
</EVENT>

Accepts the following options:

option about
lazy If true, extent is unchanged if it intersects with the desired extent (i.e. we are close enough) [default: true]
panmap allow the map to pan to achieve change in extent [default: false]
zoommap allow the map to zoom in/out to achieve change in extent [default: false]

Puts the following arguments onto the stack:

output about
center center of the extent
extent desired extent
layer layer identified by the id output argument, which is specified in the Layer configuration
pan true when map is allowed to pan

app/commands/snapshot

renders a feature as an images

Accepts the following options:

option about
activeFeature the feature to snapshot
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

Puts the following arguments onto the stack:

output about
snapshot the snapshot as image data

app/commands/synthetic-add-features

Layer event addfeature fires for every feature added. Invoking the popup for each feature is causing map issues. This command will build a collection of features before triggering.

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
feature the feature to add to the layer
layer layer to add to the source
trace write the command state to the console window

app/commands/trigger

Propagates an event.

Usage Example:

<EVENT about="When the input changes trigger a universal search event" event="change" id="change-handler" mid="app/commands/trigger">
<OPTIONS>
    <Values about="When the input changes trigger a universal search" id="event" value="universal-search" />
</OPTIONS>
</EVENT>

Accepts the following options:

option about
debug hit a breakpoint before executing this command
delay time to wait before triggering [default: 0]
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window [default: false]

app/commands/validator

This is intended to be a generic validator to whatever extent that is possible but the current use-case is this: The 'zone-validation' arguments contain a count of the number of intersecting zones; if that count is non-zero it is an error

Usage Example:

<EVENT about="If no features are clicked..." event="map-or-feature-click" id="feature-is-not-click-validator" mid="app/commands/validator" type="action">
<OPTIONS>
    <Values about="No feature clicked, clear existing features, perform reverse geocoding, show the click location" id="event" value="clear-features-from-layer,reverse-geoquery" />
    <Values about="We don't want any zones!" id="max-result-count" value="0" />
    <Values about="Do not trigger if there is at least one feature" id="trigger-invalid" value="false" />
    <Values id="debug" value="false" />
    <Values about="Clears the features from the parcel-features layers" id="layer-name" value="parcel-features,address-features" />
</OPTIONS>
</EVENT>

Accepts the following options:

option about
max-result-count valid when there are at most this many results
min-result-count valid when there are at least this many results
trigger-invalid trigger when invalidate [default: true]
trigger-valid trigger when validate [default: true]

Puts the following arguments onto the stack:

output about
reason The reason validation failed or succeeded [domain: no_layers_found,count_out_of_bounds]
valid Result of validity test [domain: true,false]

app/commands/view-model

Filter and re-map attribute names

Usage Example:

<COMMAND about="Simple attribute renaming to present addresses in with known attribute names" id="address-view-model" mid="app/commands/view-model" type="action">
<OPTIONS>
  <Values about="Identify the attribute names to be mapped" id="from" value="OWNER,STRNO,&lt;%=STRDIR&gt; &lt;%=STRNAME&gt;,CITY,STATE,ZIP" />
  <Values about="Identifies an attribute name for each from mapping" id="to" value="owner, streetNumber, streetName, city, state, zip" />
</OPTIONS>
</COMMAND>

Accepts the following options:

option about
in restrict results to this subset of field names
layers contains field names, field aliases and features, the array of models to be transform
out for each in field name an out alias field name is required

Puts the following arguments onto the stack:

output about
view-model the resulting models

app/commands/zoom

zoom the map in or out

Usage Example:

<COMMAND disabled="False" id="zoom-out" mid="app/commands/zoom" text="−" type="action">
  <OPTIONS>
    <Values id="direction" value="out" />
    <Values id="css-name" value="zoom-out" />
    <Values about="Tooltip Description" id="title" value="Zoom Out" />
  </OPTIONS>
</COMMAND>

Accepts the following options:

option about
debug hit a breakpoint before executing this command
direction in or out [domain: in,out]
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

Puts the following arguments onto the stack:

output about
direction forwards the direction to listeners [domain: in,out]

app/controls/ags-geoquery-form-tool

Generates a filter form from a feature services.

Usage Example:

<CONTROL id="ags-geoquery-form-tool-military-lines" mid="app/controls/ags-geoquery-form-tool" text="Military Lines" type="execute">
<OPTIONS>
    <Values id="url" value="//sampleserver6.arcgisonline.com/arcgis/rest/services/Military/FeatureServer/4" />
    <Values id="key-template" value="&lt;%=objectid%&gt;" />
    <Values id="blacklist" value="ruleid,azimuth,datetimevalid,datetimeexpired,eny,objectid,additionalinformation" />
</OPTIONS>
<COMMANDS>
    <COMMAND id="geoquery-form-search" mid="app/commands/trigger" text="Search" type="action">
    <OPTIONS>
        <Values id="event" value="ags-geoquery-execute" />
    </OPTIONS>
    </COMMAND>
</COMMANDS>
</CONTROL>

Accepts the following options:

option about
blacklist any control id's matching the metadata are considered field overrides, disabled fields are blacklisted
metadata if metadata already provided we do not need to discover it
query-service service endpoint(s)
url Ags Feature Service Discovery endpoint
whitelist remove fields not in whitelist (if there is a whitelist)

app/controls/base/command-controller

Controller helper for rendering "action" commands as buttons, and running "startup" and "execute" commands. Types include:

Type About
action render as a button, execute when clicked
execute immediate execution
startup immediate execution

app/controls/base/geoquery-form-tool

Creates a filter form from metadata.

Accepts the following options:

option about
blacklist any control id's matching the metadata are considered field overrides, disabled fields are blacklisted
metadata if metadata already provided we do not need to discover it
query-service service endpoint(s)
whitelist remove fields not in whitelist (if there is a whitelist)

app/controls/basemap-tool

Display a basemap carousel

Accepts the following options:

option about
css-name class name to assign to the view
icon commands only - icon to assign to the command
model collection to assign to the view
radio-group commands only - place command in this radio group
region containing region for this view, default is last-ditch-region
template template to assign to the view
text commands only - button text
title buttons only - button title
view the type of view to create, default is views/base-view

app/controls/bookmark-picker

Creates a bookmark dropdown control.

Usage Example:

<CONTROL disabled="False" id="bookmark-picker" mid="app/controls/bookmark-picker" />

Accepts the following options:

option about
css-name class name to assign to the view
icon commands only - icon to assign to the command
model collection to assign to the view
radio-group commands only - place command in this radio group
region containing region for this view, default is last-ditch-region
template template to assign to the view
text commands only - button text
title buttons only - button title
view the type of view to create, default is views/base-view

app/controls/controller

Base controller used to manage configuration, event delgation and ux rendering via overriding addChild.

Accepts the following options:

option about
event event to raise when _trigger_ed by various UX interactions depending on the implementation

app/controls/geoquery-controlfactory

Generates controls for the geoquery, each control should have an outer

with an id corresponding to the fieldInfo name. The actual input control should be contained within the div and have a name matching the fieldInfo name. Used by geoquery-form-tool.

app/controls/infoviewer

The default infoviewer popup.

Accepts the following options:

option about
css-name class name to assign to the view
field-labels comma-separated list of field labels
field-list comma-separated list of field names
icon commands only - icon to assign to the command
model collection to assign to the view
radio-group commands only - place command in this radio group
region containing region for this view, default is last-ditch-region
show-labels true => show field labels
template template to assign to the view
text commands only - button text
title buttons only - button title
use-svg false => do not use svg when rendering navigation controls
view the type of view to create, default is views/base-view

app/controls/ips-geoquery-form-tool

Create a query form for an IPS service.

Usage Example:

<CONTROL disabled="False" id="cdr-application-filter" mid="app/controls/ips-geoquery-form-tool" text="CDR Application" type="execute">
<OPTIONS>
    <Values id="service" value="resource/cdr" />
    <Values id="service-model" value="Application" />
    <Values id="query-service" value="cdr/applications/planning" />
    <Values id="srs" value="EPSG:3421" />
    <Values id="symbology" value="Hansen.CDR.Planning.Inspection" />
    <Values id="zoommap" value="false" />
    <Values about="Only these fields may appear on the form and only if they are enabled and not blacklisted" id="whitelist" value="ApplicationDateTime,ApplicationName,Comments,ExpireDateTime,Status,TotalUnpaidFees,Type,WorkType" />
    <Values about="These fields will not show on this form" id="blacklist" value="DeclaredValuation,LastModifiedDateTime" />
</OPTIONS>
<COMMANDS>
    <COMMAND id="geoquery-form-search" mid="app/commands/trigger" text="Search" type="action">
    <OPTIONS>
        <Values id="event" value="ips-geoquery-execute" />
    </OPTIONS>
    </COMMAND>
</COMMANDS>
<CONTROLS>
    <CONTROL about="Replaces the default input control with a date range control" id="ExpireDateTime" mid="app/test/controls/daterange" text="Expiration Date">
    <OPTIONS>
        <Values id="default-lo" value="-14" />
        <Values id="default-hi" value="14" />
    </OPTIONS>
    </CONTROL>
    <CONTROL about="Replaces the default input control with a fancy-pants editor" id="Comments" mid="app/test/controls/editor" text="Comments?">
    <OPTIONS>
        <Values id="default-value" value="[hello]" />
    </OPTIONS>
    </CONTROL>
    <CONTROL about="Display checkboxes or radio buttons instead of the default input control for selecting one or more status values" id="Status" mid="app/test/controls/domain" text="Status Filter">
    <OPTIONS>
        <Values about="Could add Attributes to commands, could introduce a &quot;model&quot; option, could dedicate options to the domain values, could do delimited value on &quot;domain&quot; but this covers the need of non-numeric domain keys and and allows for other options to be provided." id="domain" value="{&#xD;&#xA;    &quot;Open&quot;: &quot;open&quot;,&#xD;&#xA;    &quot;Closed&quot;: &quot;closed&quot;,&#xD;&#xA;    &quot;Inactive&quot;: &quot;0&quot;,&#xD;&#xA;    &quot;Active&quot;: 1&#xD;&#xA;}" />
        <Values about="show checkboxes instead of radio buttons" id="multi-select" value="true" />
        <Values id="domain-default" value="open,closed" />
    </OPTIONS>
    </CONTROL>
    <CONTROL about="Display checkboxes or radio buttons instead of the default input control for selecting one or more status values" id="WorkType" mid="app/test/controls/domain" text="Work Type">
    <OPTIONS>
        <Values about="Valid WorkType values for a CDR application" id="domain" value="{&#xD;&#xA;    &quot;Open&quot;: &quot;open&quot;,&#xD;&#xA;    &quot;Closed&quot;: &quot;closed&quot;&#xD;&#xA;}" />
        <Values about="show checkboxes instead of radio buttons" id="multi-select" value="false" />
    </OPTIONS>
    </CONTROL>
    <CONTROL about="Disable this field as if it were blacklisted or just disable this override?" disabled="True" id="IssuedDateTime" mid="app/test/controls/daterange" text="Date Issued" />
    <CONTROL about="Relabel this field" disabled="False" id="ProcessState" mid="app/test/controls/editor" text="Process State" />
</CONTROLS>
</CONTROL>

Accepts the following options:

option about
service The IPS service endpoint (e.g. resource/cdr)
service-model The IPS service model to query (e.g. Application)

app/controls/layerpicker-tool

controller for layerpicker-view, captures current visibility of operational layers, creates observable layer collection, binds hide and show to visibility

Accepts the following options:

option about
css-name class name to assign to the view
icon commands only - icon to assign to the command
model collection to assign to the view
radio-group commands only - place command in this radio group
region containing region for this view, default is last-ditch-region
template template to assign to the view [default: app/templates/layerpicker-template]
text commands only - button text
title buttons only - button title
view the type of view to create, default is views/base-view [default: app/views/layerpicker-view]

Puts the following arguments onto the stack:

output about
keys The layer identifiers
viewArgs visible:changed callback arguments containing the desired state of each layer

app/controls/legend

Uses app/views/SymbologyView to render the symbology registered with the map.

Usage Example:

Accepts the following options:

option about

app/controls/map

Used by applications/rhythm-gis-app to render the map.

Accepts the following options:

option about
css-name class name to assign to the view
icon commands only - icon to assign to the command
model collection to assign to the view
radio-group commands only - place command in this radio group
region containing region for this view, default is last-ditch-region [default: map-region]
template template to assign to the view
text commands only - button text
title buttons only - button title
view the type of view to create, default is views/base-view [default: app/views/MapView]

app/controls/map-panel

Adds a control to the ol3 map control collection

Usage Example:

<CONTROL about="adds a control to the ol3 map control collection" disabled="False" id="zoom-in-tool" mid="app/controls/map-panel">
  <OPTIONS>
    <Values id="position" value="bottom-3 right-2" />
  </OPTIONS>
  <COMMANDS>
    <COMMAND disabled="False" id="zoom-in" mid="app/commands/zoom" text="+" type="action">
      <OPTIONS>
        <Values id="direction" value="in" />
        <Values id="css-name" value="zoom-in" />
        <Values about="Tooltip Description" id="title" value="Zoom In" />
      </OPTIONS>
    </COMMAND>
  </COMMANDS>
</CONTROL>

Accepts the following options:

option about
css-name the class name to assign to view container
position Added to the class name to indicate location [domain: top[-n],bottom[-n],left[-n],right[-n],center,middle]
region Class name to use when creating a container region
stack vertical
title the title assigned to the view element [default: controls text value]

app/controls/ogcwfs-geoquery-form-tool

WFS query form builder.

Accepts the following options:

option about
blacklist any control id's matching the metadata are considered field overrides, disabled fields are blacklisted
metadata if metadata already provided we do not need to discover it
query-service service endpoint(s)
whitelist remove fields not in whitelist (if there is a whitelist)

app/controls/ol3-control

Wrapper for openlayers controls. Documented and undocumented options are passed through to the underlying control. In cases where the underlying control cannot accept a string representation of a value you may wrap the option in eval() and use code.

Usage Examples:

FullScreen

<CONTROL about="Display the map full screen" disabled="False" id="map-full-screen" mid="app/controls/ol3-control" type="na">
    <OPTIONS>
        <Values about="identify the ol3 constructor/class" id="control-type" value="FullScreen" />
        <Values about="http://openlayers.org/en/latest/apidoc/ol.control.FullScreen.html" id="label" value="⤢" />
    </OPTIONS>
</CONTROL>

ZoomToExtent

<CONTROL about="Restores the map to the original &quot;full&quot; extent" id="map-zoom-to-extent" mid="app/controls/ol3-control">
    <OPTIONS>
        <Values about="identify the ol3 constructor/class" id="control-type" value="ZoomToExtent" />
        <Values about="Using eval to cast the extent as number[]" id="extent" value="eval([-12830000, 4320000,-12820000, 4330000])" />
        <Values about="top-left" id="className" value="ol-zoom-extent" />
    </OPTIONS>
</CONTROL>

Input

<CONTROL about="Creates an 'input' control on the map" id="universal-search-input" mid="app/controls/ol3-control" text="�">
    <OPTIONS>
        <Values about="Position the input in the top-left corner, configure the control to keep the expander to the left (via 'right')" id="className" value="ol-control top-2 left-2 ol-input right" />
        <Values about="identify the ol3 constructor/class" id="control-type" value="Input" />
        <Values about="output 'location' instead of 'value'" id="valueName" value="location" />
        <Values about="Start the control already expanded" id="expanded" value="true" />
        <Values about="When user presses enter collapse the control" id="autoCollapse" value="false" />
        <Values about="Text when the control is collapsed" id="closedText" value="�" />
        <Values about="Text when the control is expanded (collapses to the left)" id="openedText" value="«" />
        <Values id="placeholderText" value="�" />
    </OPTIONS>
    <EVENTS>
        <EVENT about="When the input changes trigger a universal search event" event="change" id="change-handler" mid="app/commands/trigger">
            <OPTIONS>
                <Values about="When the input changes trigger a universal search" id="event" value="universal-search" />
            </OPTIONS>
        </EVENT>
    </EVENTS>
</CONTROL>

ZoomToExtent

<CONTROL about="Restores the map to the original &quot;full&quot; extent" id="map-zoom-to-extent" mid="app/controls/ol3-control">
    <OPTIONS>
        <Values about="identify the ol3 constructor/class" id="control-type" value="ZoomToExtent" />
        <Values about="experimenting with eval" id="extent" value="eval([-12830000, 4320000,-12820000, 4330000])" />
        <Values about="top-left" id="className" value="ol-zoom-extent" />
    </OPTIONS>
</CONTROL>

OverviewMap

<CONTROL about="alternative zoom control" id="map-overview-map" mid="app/controls/ol3-control">
    <OPTIONS>
        <Values about="identify the ol3 constructor/class" id="control-type" value="OverviewMap" />
        <Values about="top-left" id="className" value="top-3 right-2 ol-overviewmap" />
        <Values about="Text to display when the map is collapsed" id="label" value="«" />
        <Values about="text to display when the control is expanded (click to collapse)" id="collapseLabel" value="»" />
    </OPTIONS>
</CONTROL>

MousePosition

<CONTROL about="adds mouse coordinates to map, for testing and demonstration of why generic ol3-control is a trade-off" id="map-mouse-position" mid="app/controls/ol3-control">
    <OPTIONS>
        <Values about="identify the ol3 constructor/class" id="control-type" value="MousePosition" />
        <Values about="top-left container" id="className" value="ol-control top-2 right-3 ol-mouse-position" />
        <Values about="see http://openlayers.org/en/latest/apidoc/ol.control.MousePosition.html" id="undefinedHTML" value="X,Y" />
        <Values about="render coordinates using this projection" id="projection" value="EPSG:4326" />
        <Values about="example of why generic control will not work, requires an interpreter like map-hover-handler otherwise no way to specify 'coordinateFormat'" id="coordinateFormat" value="eval(ol.coordinate.createStringXY(5))" />
    </OPTIONS>
</CONTROL>

Accepts the following options:

option about
control-type openlayers control type [default: Control]
css-name class name to assign to the button
title button title

app/controls/tabs

This is an incomplete test control that does not render items in tabs but simply renders them in a list.

Usage Example:
<CONTROL id="geoquery-form" mid="app/controls/tabs" text="Queries" type="container">
  <OPTIONS>
    <Values id="region" value="filter-region" />
  </OPTIONS>
  <CONTROLS>
    <CONTROL id="ags-geoquery-form-tool-sf311" mid="app/controls/ags-geoquery-form-tool" text="San Francisco 311" type="execute">
      <OPTIONS>
        <Values id="url" value="//sampleserver6.arcgisonline.com/arcgis/rest/services/SF311/FeatureServer/0" />
        <Values id="symbology" value="sf311" />
        <Values id="key-template" value="&lt;%=objectid%&gt;" />
        <Values id="whitelist" value="req_type,status" />
      </OPTIONS>
      <COMMANDS>
        <COMMAND id="geoquery-form-search" mid="app/commands/trigger" text="Search" type="action">
          <OPTIONS>
            <Values id="event" value="ags-geoquery-execute" />
          </OPTIONS>
        </COMMAND>
      </COMMANDS>
      <CONTROLS>
        <CONTROL about="Execute this query:&#xD;&#xA;&#xD;&#xA;http://sampleserver6.arcgisonline.com/arcgis/rest/services/SF311/FeatureServer/0/query?where=1=1&amp;outFields=req_type&amp;returnGeometry=false&amp;returnDistinctValues=true&amp;f=pjson" id="req_type" mid="app/test/controls/ags/domain" text="Request Type">
          <OPTIONS>
            <Values id="url" value="http://sampleserver6.arcgisonline.com/arcgis/rest/services/SF311/FeatureServer/0/query?where=1=1&amp;outFields=req_type&amp;returnGeometry=false&amp;returnDistinctValues=true&amp;f=pjson" />
            <Values about="Query for multiple requests types at one time" id="multi-select" value="true" />
          </OPTIONS>
        </CONTROL>
      </CONTROLS>
    </CONTROL>
    <CONTROL id="ogcwfs-geoquery-form-tool-usstates" mid="app/controls/ogcwfs-geoquery-form-tool" text="US States" type="execute">
      <OPTIONS>
        <Values id="url" value="//usgvdcalix01:8080/geoserver/wfs" />
        <Values id="typeName" value="usa:states" />
        <Values id="symbology" value="usa:states" />
        <Values id="key-template" value="&lt;%=STATE_ABBR%&gt;" />
        <Values id="blacklist" value="MALE,FEMALE,PERSONS,STATE_NAME" />
      </OPTIONS>
      <COMMANDS>
        <COMMAND id="geoquery-form-search" mid="app/commands/trigger" text="Search" type="action">
          <OPTIONS>
            <Values id="event" value="ogc-geoquery-execute" />
          </OPTIONS>
        </COMMAND>
      </COMMANDS>
    </CONTROL>
    <CONTROL id="ags-geoquery-form-tool-military-lines" mid="app/controls/ags-geoquery-form-tool" text="Military Lines" type="execute">
      <OPTIONS>
        <Values id="url" value="//sampleserver6.arcgisonline.com/arcgis/rest/services/Military/FeatureServer/4" />
        <Values id="key-template" value="&lt;%=objectid%&gt;" />
        <Values id="blacklist" value="ruleid,azimuth,datetimevalid,datetimeexpired,eny,objectid,additionalinformation" />
      </OPTIONS>
      <COMMANDS>
        <COMMAND id="geoquery-form-search" mid="app/commands/trigger" text="Search" type="action">
          <OPTIONS>
            <Values id="event" value="ags-geoquery-execute" />
          </OPTIONS>
        </COMMAND>
      </COMMANDS>
    </CONTROL>
    <CONTROL disabled="False" id="cdr-date-range-filter" mid="app/controls/ips-geoquery-form-tool" text="CDR Date Range Filter" type="execute">
      <OPTIONS>
        <Values id="service" value="resource/cdr" />
        <Values id="service-model" value="Application" />
        <Values id="query-service" value="cdr/applications/building,cdr/applications/use,cdr/applications/codeenforcement,cdr/applications/businesslicense" />
        <Values id="srs" value="EPSG:3421" />
        <Values id="symbology" value="status" />
        <Values id="zoommap" value="false" />
        <Values about="Only show this one date field" id="whitelist" value="ApplicationDateTime,Status" />
      </OPTIONS>
      <COMMANDS>
        <COMMAND id="geoquery-form-search" mid="app/commands/trigger" text="Search" type="action">
          <OPTIONS>
            <Values id="event" value="ips-geoquery-execute" />
          </OPTIONS>
        </COMMAND>
      </COMMANDS>
      <CONTROLS>
        <CONTROL about="Replaces the default input control with a date range control" id="ApplicationDateTime" mid="app/test/controls/daterange" text="Expiration Date">
          <OPTIONS>
            <Values about="days ago" id="default-lo" value="-14" />
            <Values about="days ahead of today" id="default-hi" value="14" />
          </OPTIONS>
        </CONTROL>
        <CONTROL about="Display checkboxes or radio buttons instead of the default input control for selecting one or more status values" id="Status" mid="app/test/controls/domain" text="Status Filter">
          <OPTIONS>
            <Values about="Could add Attributes to commands, could introduce a &quot;model&quot; option, could dedicate options to the domain values, could do delimited value on &quot;domain&quot; but this covers the need of non-numeric domain keys and and allows for other options to be provided." id="domain" value="{&#xD;&#xA;    &quot;Open&quot;: &quot;open&quot;,&#xD;&#xA;    &quot;Closed&quot;: &quot;closed&quot;,&#xD;&#xA;    &quot;Inactive&quot;: &quot;0&quot;,&#xD;&#xA;    &quot;Active&quot;: 1&#xD;&#xA;}" />
            <Values about="show checkboxes instead of radio buttons" id="multi-select" value="true" />
            <Values id="domain-default" value="open,closed" />
          </OPTIONS>
        </CONTROL>
        <CONTROL about="Display checkboxes or radio buttons instead of the default input control for selecting one or more status values" id="WorkType" mid="app/test/controls/domain" text="Work Type">
          <OPTIONS>
            <Values about="Valid WorkType values for a CDR application" id="domain" value="{&#xD;&#xA;    &quot;Open&quot;: &quot;open&quot;,&#xD;&#xA;    &quot;Closed&quot;: &quot;closed&quot;&#xD;&#xA;}" />
            <Values about="show checkboxes instead of radio buttons" id="multi-select" value="false" />
          </OPTIONS>
        </CONTROL>
      </CONTROLS>
    </CONTROL>
    <CONTROL disabled="False" id="cdr-application-filter" mid="app/controls/ips-geoquery-form-tool" text="CDR Application" type="execute">
      <OPTIONS>
        <Values id="service" value="resource/cdr" />
        <Values id="service-model" value="Application" />
        <Values id="query-service" value="cdr/applications/planning" />
        <Values id="srs" value="EPSG:3421" />
        <Values id="symbology" value="Hansen.CDR.Planning.Inspection" />
        <Values id="zoommap" value="false" />
        <Values about="Only these fields may appear on the form and only if they are enabled and not blacklisted" id="whitelist" value="ApplicationDateTime,ApplicationName,Comments,ExpireDateTime,Status,TotalUnpaidFees,Type,WorkType" />
        <Values about="These fields will not show on this form" id="blacklist" value="DeclaredValuation,LastModifiedDateTime" />
      </OPTIONS>
      <COMMANDS>
        <COMMAND id="geoquery-form-search" mid="app/commands/trigger" text="Search" type="action">
          <OPTIONS>
            <Values id="event" value="ips-geoquery-execute" />
          </OPTIONS>
        </COMMAND>
      </COMMANDS>
      <CONTROLS>
        <CONTROL about="Replaces the default input control with a date range control" id="ExpireDateTime" mid="app/test/controls/daterange" text="Expiration Date">
          <OPTIONS>
            <Values id="default-lo" value="-14" />
            <Values id="default-hi" value="14" />
          </OPTIONS>
        </CONTROL>
        <CONTROL about="Replaces the default input control with a fancy-pants editor" id="Comments" mid="app/test/controls/editor" text="Comments?">
          <OPTIONS>
            <Values id="default-value" value="[hello]" />
          </OPTIONS>
        </CONTROL>
        <CONTROL about="Display checkboxes or radio buttons instead of the default input control for selecting one or more status values" id="Status" mid="app/test/controls/domain" text="Status Filter">
          <OPTIONS>
            <Values about="Could add Attributes to commands, could introduce a &quot;model&quot; option, could dedicate options to the domain values, could do delimited value on &quot;domain&quot; but this covers the need of non-numeric domain keys and and allows for other options to be provided." id="domain" value="{&#xD;&#xA;    &quot;Open&quot;: &quot;open&quot;,&#xD;&#xA;    &quot;Closed&quot;: &quot;closed&quot;,&#xD;&#xA;    &quot;Inactive&quot;: &quot;0&quot;,&#xD;&#xA;    &quot;Active&quot;: 1&#xD;&#xA;}" />
            <Values about="show checkboxes instead of radio buttons" id="multi-select" value="true" />
            <Values id="domain-default" value="open,closed" />
          </OPTIONS>
        </CONTROL>
        <CONTROL about="Display checkboxes or radio buttons instead of the default input control for selecting one or more status values" id="WorkType" mid="app/test/controls/domain" text="Work Type">
          <OPTIONS>
            <Values about="Valid WorkType values for a CDR application" id="domain" value="{&#xD;&#xA;    &quot;Open&quot;: &quot;open&quot;,&#xD;&#xA;    &quot;Closed&quot;: &quot;closed&quot;&#xD;&#xA;}" />
            <Values about="show checkboxes instead of radio buttons" id="multi-select" value="false" />
          </OPTIONS>
        </CONTROL>
        <CONTROL about="Disable this field as if it were blacklisted or just disable this override?" disabled="True" id="IssuedDateTime" mid="app/test/controls/daterange" text="Date Issued" />
        <CONTROL about="Relabel this field" disabled="False" id="ProcessState" mid="app/test/controls/editor" text="Process State" />
      </CONTROLS>
    </CONTROL>
    <CONTROL disabled="False" id="property-address-filter" mid="app/controls/ips-geoquery-form-tool" text="Property Address" type="execute">
      <OPTIONS>
        <Values id="service" value="resource/property" />
        <Values id="service-model" value="Address" />
        <Values id="query-service" value="property/addresses" />
        <Values id="symbology" value="Hansen.Property.Address" />
        <Values id="srs" value="EPSG:3857" />
        <Values id="panmap" value="true" />
        <Values id="whitelist" value="City,PostalCode,Region,StreetName,StreetNumber" />
      </OPTIONS>
      <COMMANDS>
        <COMMAND id="geoquery-form-search" mid="app/commands/trigger" text="Search" type="action">
          <OPTIONS>
            <Values id="event" value="ips-geoquery-execute" />
          </OPTIONS>
        </COMMAND>
      </COMMANDS>
    </CONTROL>
    <CONTROL disabled="False" id="crm-servicerequests" mid="app/controls/ips-geoquery-form-tool" text="Service Requests" type="execute">
      <OPTIONS>
        <Values id="service" value="resource/crm" />
        <Values id="service-model" value="ServiceRequest" />
        <Values id="query-service" value="crm/servicerequests" />
        <Values id="srs" value="EPSG:3857" />
        <Values id="symbology" value="Hansen.CRM.ServiceRequest" />
        <Values id="whitelist" value="ReferenceNumber,RequestDate" />
      </OPTIONS>
      <COMMANDS>
        <COMMAND id="geoquery-form-search" mid="app/commands/trigger" text="Search" type="action">
          <OPTIONS>
            <Values id="event" value="ips-geoquery-execute" />
          </OPTIONS>
        </COMMAND>
      </COMMANDS>
      <CONTROLS>
        <CONTROL about="Replaces the default input control with a date range control" id="RequestDate" mid="app/test/controls/daterange" text="Request Range">
          <OPTIONS>
            <Values about="days ago" id="default-lo" value="-30" />
            <Values about="days ahead of today" id="default-hi" value="0" />
          </OPTIONS>
        </CONTROL>
      </CONTROLS>
    </CONTROL>
    <CONTROL id="ags-parcel-filter" mid="app/controls/ags-geoquery-form-tool" text="Parcels" type="execute">
      <OPTIONS>
        <Values id="url" value="//usalvwdgis1:6080/arcgis/rest/services/Vegas/MapVegas850/MapServer/18" />
        <Values id="symbology" value="Hansen.Property.Parcels" />
        <Values id="key-template" value="&lt;%=objectid%&gt;" />
        <Values id="whitelist" value="PRCLID,PRCLNAME,PRCLNO,ZIPCODE" />
      </OPTIONS>
      <COMMANDS>
        <COMMAND id="geoquery-form-search" mid="app/commands/trigger" text="Search" type="action">
          <OPTIONS>
            <Values id="event" value="ags-geoquery-execute" />
          </OPTIONS>
        </COMMAND>
      </COMMANDS>
    </CONTROL>
  </CONTROLS>
</CONTROL>

Accepts the following options:

option about
css-name class name to assign to the view
icon commands only - icon to assign to the command
model collection to assign to the view
radio-group commands only - place command in this radio group
region containing region for this view, default is last-ditch-region
template template to assign to the view
text commands only - button text
title buttons only - button title
view the type of view to create, default is views/base-view

app/controls/universal-search-tool

A simple input control that puts the search location on the message bus.

Accepts the following options:

option about
css-name class name to assign to the view
icon commands only - icon to assign to the command
model collection to assign to the view
radio-group commands only - place command in this radio group
region containing region for this view, default is last-ditch-region
template template to assign to the view [default: app/templates/universal-search-template]
text commands only - button text
title buttons only - button title
view the type of view to create, default is views/base-view

Puts the following arguments onto the stack:

output about
location The text entered by the user in the input control

app/controls/view

Extends controller to provide a generic view control for managing events and rendering commands and nested controls.

Usage Example:

<CONTROL id="measure-tool" mid="app/controls/view" text="Measurement Tool">
<COMMANDS>
    <COMMAND id="measure-linear-tool" mid="app/commands/measure-tool" text="Measure Length" type="action">
    <OPTIONS>
        <Values id="type" value="linear" />
        <Values id="geodesic" value="true" />
        <Values id="toggle" value="true" />
        <Values id="symbology" value="measurements" />
        <Values id="radio-group" value="geo-selection" />
        <Values id="event" value="measurement" />
    </OPTIONS>
    </COMMAND>
    <COMMAND id="measure-area-tool" mid="app/commands/measure-tool" text="Measure Area" type="action">
    <OPTIONS>
        <Values id="type" value="area" />
        <Values id="geodesic" value="true" />
        <Values id="toggle" value="true" />
        <Values id="symbology" value="measurements" />
        <Values id="radio-group" value="geo-selection" />
        <Values id="event" value="measurement" />
    </OPTIONS>
    </COMMAND>
    <COMMAND id="measure-clear-tool" mid="app/commands/measure-tool" text="Clear Measurements" type="action">
    <OPTIONS>
        <Values id="stop" value="false" />
        <Values id="clear" value="true" />
    </OPTIONS>
    </COMMAND>
</COMMANDS>
<OPTIONS>
    <Values id="default-uom" value="metric" />
    <Values id="geodesic" value="true" />
    <Values id="symbology" value="measurements" />
    <Values id="autoformat" value="false" />
</OPTIONS>
</CONTROL>

Accepts the following options:

option about
css-name class name to assign to the view
icon commands only - icon to assign to the command
model collection to assign to the view
radio-group commands only - place command in this radio group
region containing region for this view, default is last-ditch-region
template template to assign to the view
text commands only - button text
title buttons only - button title
view the type of view to create, default is views/base-view

app/data/bookmarks

Shared collection of bookmarks

app/data/features

model: Extends a backbone model by providing a data attribute.

app/data/layers

model: model: Extends a backbone model by providing a data attribute.

app/data/symbology

model: model: model: Extends a backbone model by providing a data attribute.

app/google-api

google API loader plugin

app/layer-factory/ags-discovery

Create a layer group containing all discoverable layers.

Usage Example:

<LAYER id="arcgis-directory-service" text="Military Group" type="app/layer-factory/ags-discovery" url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Military/MapServer">
<OPTIONS>
    <Values id="layerType" value="mapserver" />
</OPTIONS>
</LAYER>

Accepts the following options:

option about
layerType Query the catalog or mapserver service to produce a ol.layer.Group containing the available layers. [domain: discover,mapserver] [default: discover]

app/layer-factory/ags-featureserver

Create a vector layer pre-populated with everything in this featureserver

Accepts the following options:

option about
layerType Service type to query (only queries featureserver services). [domain: featureserver] [default: featureserver]

app/layer-factory/ags-webmap

Similar to ags-discovery, creates a group layer containing all discovered layers from an agsonline webmap.

Usage Example:

<Maplet about="https://infor1.maps.arcgis.com/sharing/rest/content/items/313b7327133f4802affee46893b4bec7/data?f=json" id="WebMap-313b7327133f4802affee46893b4bec7" parentId="base" text="Greenville I85 Corridor">
<MAP>
    <LAYERS>
    <LAYER about="Reads a webmap configuration" id="313b7327133f4802affee46893b4bec7" text="I85 Corridor Features" type="app/layer-factory/ags-webmap" url="//infor1.maps.arcgis.com/sharing/rest/content/items/313b7327133f4802affee46893b4bec7/data?f=json">
        <OPTIONS>
        <Values about="Import all operational layers" id="operationalLayers" value="true" />
        <Values about="Import basemap layers" id="baseMap" value="true" />
        <Values about="import bookmarks" id="bookmarks" value="true" />
        </OPTIONS>
    </LAYER>
    </LAYERS>
    <SYMBOLOGY>
    <SYMBOL about="Features from a webmap configuration" id="webmap" label="WebMap Item">
        <ICON about="WebMap items are all black and white" id="*" label="&lt;%= TITLE %&gt;" style="{&#xD;&#xA;    &quot;type&quot;: &quot;mixed&quot;,&#xD;&#xA;    &quot;fill&quot;: {&#xD;&#xA;        &quot;style&quot;: &quot;solid&quot;,&#xD;&#xA;        &quot;color&quot;: [0, 0, 0, 0.5]&#xD;&#xA;    },&#xD;&#xA;    &quot;outline&quot;: {&#xD;&#xA;        &quot;style&quot;: &quot;solid&quot;,&#xD;&#xA;        &quot;color&quot;: [255, 255, 255, 1],&#xD;&#xA;        &quot;width&quot;: 1&#xD;&#xA;    },&#xD;&#xA;    &quot;text&quot;: {&#xD;&#xA;        &quot;font&quot;: &quot;20px courier new&quot;,&#xD;&#xA;        &quot;textAlign&quot;: &quot;center&quot;&#xD;&#xA;    }&#xD;&#xA;}" type="style" />
        <ICON about="WebMap type 2 Point" id="point" label="&lt;%= TITLE %&gt;" style="{&quot;type&quot;:&quot;circle&quot;,&quot;radius&quot;:7,&quot;fill&quot;:{&quot;color&quot;:[247,96,84]}}" type="style">
        <FILTERS>
            <FILTER about="Stride is a numeric value so need the '=' to do a == instead of an ===" id="geometryType" value="Point" />
        </FILTERS>
        </ICON>
    </SYMBOL>
    </SYMBOLOGY>
    <VIEWPORT about="Greenville" extent="-82.3,34.8,-82.1,35" />
    <OPTIONS>
    <Values id="default-interactions" value="{&#xD;&#xA;    &quot;altShiftDragRotate&quot;: true,&#xD;&#xA;    &quot;doubleClickZoom&quot;: true,&#xD;&#xA;    &quot;keyboard&quot;: true,&#xD;&#xA;    &quot;mouseWheelZoom&quot;: false,&#xD;&#xA;    &quot;shiftDragZoom&quot;: true,&#xD;&#xA;    &quot;dragPan&quot;: true,&#xD;&#xA;    &quot;pinchRotate&quot;: true,&#xD;&#xA;    &quot;pinchZoom&quot;: true,&#xD;&#xA;    &quot;zoomDuration&quot;: 1&#xD;&#xA;}" />
    <Values id="default-controls" value="{&#xD;&#xA;    &quot;attribution&quot;: false,&#xD;&#xA;    &quot;rotate&quot;: false,&#xD;&#xA;    &quot;zoom&quot;: true&#xD;&#xA;}" />
    <Values about="To be moved to VIEWPORT" id="min-zoom" value="5" />
    <Values about="To be moved to VIEWPORT" id="max-zoom" value="20" />
    <Values about="To be moved to VIEWPORT" id="init-zoom" value="9" />
    <Values about="To be moved to VIEWPORT" id="init-center" value="-82.3,34.8,-82.1,35" />
    </OPTIONS>
</MAP>
</Maplet>

Accepts the following options:

option about
layerType Service type to query (only queries webmap services). [domain: webmap] [default: webmap]

app/layer-factory/arcgis-tile

Creates a layer suitable for rendering imagery provided by ArcGIS Server.

Usage Example:

<LAYER basemap="False" disabled="False" extent="-115.2589,36.15677,-115.1867,36.22891" id="parcels" maxlevel="24" minlevel="14" text="Parcels" type="app/layer-factory/arcgis-tile" url="https://usalvqa1.infor.com/arcgis/rest/services/IPS850/QASQL4850/MapServer">
<OPTIONS>
    <Values id="layerType" value="rest" />
    <Values about="Parcels and Properties" id="showLayers" value="16" />
    <Values id="visible" value="true" />
    <Values id="layerDefs" value="{16:&quot;PRCLKEY&gt;1&quot;}" />
</OPTIONS>
</LAYER>

Accepts the following options:

option about
layerDefs rest only, allows you to filter the features of individual layers in the exported map by specifying definition expressions for those layers. Definition expression for a layer that is published with the service will be always honored.
layerType Identify the service type, use 'tile' to tile data with URLs in a set XYZ format that are defined in a URL template, use 'rest' to tile data from ArcGIS Rest services (map and image services are supported) [domain: tile,rest] [default: tile]
refresh-interval time in seconds to wait before refreshing this layer
resolutions space separated values to specify the min and max resolutions for this layer
showLayers rest only, determines which layers appear on the exported map, comma-separated numeric values
visible controls the initial visibility of a layer, true to show the layer immediately, false otherwise [domain: true,false] [default: true]
wkid if an 'extent' is provided it must be in 4326 but can be converted to the spatial reference specified here if the unlikely event the map is not using a 4326 projection

app/layer-factory/base/event-handler

Register/unregister source and layer events and limit availability based on visibility depending upon configuration.

source events: *addfeature *change *changefeature *clear *removefeature

view change events: *extent *maxResolution *minResolution *opacity *source *visible *zIndex

Both source and view events trigger a corresponding layer-event on the event bus. The view events are triggered when the associated value changes.

Accepts the following options:

option about
when-hidden only fires when layer is hidden [default: false]
when-visible only fires when layer is visible [default: true]

app/layer-factory/base/group-helper

Facilitates merging layers into the maplet configuration using api.merge.

Used by the following factories to extend the maplet configuration:

Accepts the following options:

option about
layerType Merge child layers with the main configuration [domain: merge] [default: merge]

app/layer-factory/configuration-features

Creates a vector layer from layers defined in configuration.

Usage Example:

<LAYER id="civics" text="Search Results" type="app/layer-factory/configuration-features">
<COMMANDS>
    <COMMAND about="Adds a 'more info' button to the info viewer popup" disabled="False" id="more-info" mid="app/commands/trigger" text="View Details" type="action">
    <OPTIONS>
        <Values id="event" value="civics:show-details" />
        <Values id="css-name" value="btn btn-secondary" />
    </OPTIONS>
    </COMMAND>
</COMMANDS>
<OPTIONS>
    <Values about="List the fields in the order you'd like them to appear in the infoViewer" id="field-list" value="id" />
    <Values about="The vertical offset of the markers associated with this layer, a 1 will shift the marker up so the bottom edge touches the point-feature; use 0.5 to center." id="anchorYValue" value="1" />
    <Values id="show-labels" value="false" />
    <Values id="layerType" value="cluster" />
    <Values id="cluster-distance" value="20" />
</OPTIONS>
</LAYER>

Triggering clear-features-from-layer will clear all features from this layer.

Accepts the following options:

option about
cluster-distance ol.source.Cluster "distance" parameter (minimum distance in pixels between clusters). [default: 20]
cluster-symbology symbology to use for clustering
symbology symbology to use for clustering when "cluster-symbology" not provided

app/layer-factory/group

Creates a ol.layer.Group to contain child layers.

Usage Example:

<LAYER id="property-layer-group" text="Property" type="app/layer-factory/group">
<LAYERS>
    <LAYER basemap="False" disabled="False" extent="-115.2589,36.15677,-115.1867,36.22891" id="parcels" maxlevel="24" minlevel="14" text="Parcels" type="app/layer-factory/arcgis-tile" url="https://usalvqa1.infor.com/arcgis/rest/services/IPS850/QASQL4850/MapServer">
    <OPTIONS>
        <Values id="layerType" value="rest" />
        <Values id="visible" value="true" />
    </OPTIONS>
    </LAYER>
</LAYERS>
</LAYER>

Accepts the following options:

option about
layerType This is a layer container [domain: group] [default: group]
visible Should this layer group be visible [domain: true,false] [default: true]

app/layer-factory/heatmap

Uses native openlayers sources to manage the heatmap layer.

Accepts the following options:

option about
layerType Identify the layer type [domain: kml] [default: kml]

app/layer-factory/ips-query-layer

Query IPS REST services and render the results as layers.

Usage Example:

<LAYER disabled="False" id="cdr" text="CDR" type="app/layer-factory/group">
<LAYERS>
    <LAYER disabled="False" id="cdr.application.building" text="Building Applications" type="app/layer-factory/ips-query-layer">
    <OPTIONS>
        <Values id="group-service" value="cdr/applicationtypes/building" />
    </OPTIONS>
    </LAYER>
    <LAYER disabled="True" id="cdr.application.use" text="Use Applications" type="app/layer-factory/ips-query-layer">
    <OPTIONS>
        <Values id="group-service" value="cdr/applicationtypes/use" />
    </OPTIONS>
    </LAYER>
    <LAYER disabled="False" id="cdr.application.codeenforcement" text="Case" type="app/layer-factory/ips-query-layer">
    <OPTIONS>
        <Values id="group-service" value="cdr/applicationtypes/codeenforcement" />
    </OPTIONS>
    </LAYER>
    <LAYER disabled="True" id="cdr.application.businesslicense" text="Business License" type="app/layer-factory/ips-query-layer">
    <OPTIONS>
        <Values id="group-service" value="cdr/applicationtypes/businesslicense" />
    </OPTIONS>
    </LAYER>
</LAYERS>
<OPTIONS>
    <Values id="group-service-query" value="{select:[code]}" />
    <Values id="service-query-template" value="{filter:{property:&quot;applicationType.Code&quot;,operator:&quot;Equal&quot;,value:&quot;&lt;%=code%&gt;&quot;}}" />
    <Values id="text-template" value="&lt;%=code%&gt; (&lt;%=type%&gt;)" />
</OPTIONS>
</LAYER>

Accepts the following options:

option about
group-service The IPS endpoints service to query
group-service-query Filter to apply to the group-service
layerType Service type to query (only queries webmap services). [domain: group,ips] [default: ips]
locatingproperties One or more attribute paths to probe for location information [default: address]
max-record-count Maximum number of results to accept [default: 100]
merge Forwarded to REST but purpose is unclear [default: true]
service-query-template group only, used to produce a service query
text-template template used to assign text to the child layers
use-gis Directs the services use the underlying GIS system, false to use local coordinates stored in IPS. [domain: true,false] [default: true]

app/layer-factory/native

Creates a layer suitable for rendering imagery provided by OSM and Bing as well support for KML. These are the sources provided natively by OpenLayers.

Usage Example:

<LAYER basemap="True" id="mapquest-osm" maxlevel="20" minlevel="10" text="Map Quest" type="app/layer-factory/native">
<OPTIONS>
    <Values id="layerType" value="osm" />
    <Values id="layerStyle" value="osm" />
    <Values id="visible" value="false" />
</OPTIONS>
</LAYER>

Accepts the following options:

option about
key The API key for bing
layerStyle For bing one of Aerial
layerType Identifies the layer type to be configured [domain: bing,debug,kml,stamen,xyz] [default: osm]
srs For KML, the coordinate system of the KML document
url For KML, the url if no layer url is provided
visible controls the initial visibility of a layer, true to show the layer immediately, false otherwise [domain: true,false] [default: true]

app/layer-factory/wms

Uses ol.source.TileWMS to manage the wms layer.

Accepts the following options:

option about
layerType Identify the layer type [domain: wms,wms-group] [default: wms]
max-resolution Hide the layer beyond this resolution
min-resolution Minimum resolution before layer is visible
visible Hide the layer [domain: true,false] [default: true]

app/liferay-runner

Used by liferay loader to initialize the maplet.

app/mediator

All messaging passes through this mediator. Provides convenience functions for accessing shared state.

app/models/arcgis-services

ServiceModel: Internal. Model containing service information.

app/models/arcgis-services

ServiceDirectoryModel: ArcGIS Server Discovery services.

app/models/base-model

model: model: model: Extends a backbone model by providing a data attribute.

app/models/defaults

Provides default values for partial configurations to avoid null references.

app/ol3/control/input

Control: A collapsible input control.

Accepts the following options:

option about
autoCollapse Auto-collapse input control when user presses Enter [domain: true,false] [default: true]
autoSearchDelay Number of seconds to wait for user input before auto-searching, 0 to disable auto searching [default: 1]
className The css class name to assign to the main element [default: ol-input bottom left]
closedText Text or tooltip to render when control is collapsed
expanded 'true' if the control is to be initially expanded [domain: true,false] [default: false]
openedText Text or tooltip to render when control is not collapsed [default: «]
placeholderText Input placeholder (text to render before a value is provided) [default: Search]
valueName Places the value on this attribute [default: value]

app/plugins/async

Plugin to load data as modules

app/run

App loader uses the api to get application configuration before instantiating the application. AMD package definitions are updated before the application loads. Controls and commands are registered with the application once it is 'ready' to do so.

app/services/agencymaps

property/agencymap proxy service

app/services/ags/feature-service-reader

ags discovery and querying services

app/services/ags/map-service-reader

Provides count, find and query proxies to the underlying ags.

Accepts the following options:

option about
contains If false, the operation searches for an exact match of the searchText string. An exact match is case sensitive. Otherwise, it searches for a value that contains the searchText provided. This search is not case sensitive. The default is true.
f Response format, should always be json or pjson [default: json]
layers search these layers
returnCountOnly Only return the count of matching features
returnGeometry Include the geometry in the response
returnIdsOnly Only return the feature ids
searchText use find service to search for this value

app/services/cdr/applications/businesslicense

service proxy for cdr/applications/businesslicense

app/services/ogc/wfs-readers

WfsDescribeFeatureReader: DescribeFeatureType proxy

app/services/ogc/wfs-readers

WfsGetFeatureReader: GetFeature proxy

app/services/ogc/wfs-readers

WfsDescribeFeatureConverter: Converts DescribeFeatureType response to IFieldInfo items

app/services/ogc/wfs-readers

WfsGetCapabilitiesConverter: Extracts operations and feature types from GetCapabilities response.

app/services/ogc/wfs-readers

WfsGetFeatureConverter: Converts GetFeature response to a layer of features.

app/services/ogc/wms-readers

WmsGetCapabilitiesConverter: Uses ol.format.WMSCapabilities to convert xml to an object

app/services/ogc/wms-readers

WmsDescribeLayerConverter: Extracts typeName from a layer description

app/services/ogc/wms-readers

WmsGetFeatureInfoConverter: Uses ol.format.WMSGetFeatureInfo to convert xml to an object

app/services/property/addresses

Proxy for the property/addresses service

app/services/property/parcels

Proxy for the property/parcels service

app/services/publishedmaps

Proxy for the property/publishedmaps service.

app/services/workmanagement/workorders

Proxy for the workmanagement/workorders service.

app/test/commands/geometry-event

puts a hard-coded feature on the bus

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

Puts the following arguments onto the stack:

output about
activeFeature the hard-coded feature

app/test/commands/layers-event

puts a hard-coded layers on the bus

Accepts the following options:

option about
debug hit a breakpoint before executing this command
disabled true to prevent the command from executing [domain: true,false]
event the event to raise once the command executes
trace write the command state to the console window

Puts the following arguments onto the stack:

output about
layers the hard-coded layer(s)

app/test/controls/daterange

Creates a date range control.

Usage Example:

<CONTROL about="Replaces the default input control with a date range control" id="ApplicationDateTime" mid="app/test/controls/daterange" text="Expiration Date">
<OPTIONS>
    <Values about="days ago" id="default-lo" value="-14" />
    <Values about="days ahead of today" id="default-hi" value="14" />
</OPTIONS>
</CONTROL>

Accepts the following options:

option about
default-hi default end value (in days from today)
default-lo default start value (in days from today)

app/test/data/sprints

0: Implements SC 84184

app/utils/ags/ags-directory

Gets multiple MapServer services from a single directory

app/utils/ags/ags-layers

asLayers creates app/layer-factory/arcgis-tile layers from configuration.

app/utils/ags/ags-mapserver

mapserverService gets layers from an ArcGIS Service.

app/utils/ags/converter

Converts native ArcGIS Server features to configurations.

app/utils/ags/style-converter

convert from ags style to an internal format

app/utils/ags/style-to-html-converter

Converts a symbol definition to HTML

app/utils/levenshtein-distance

Levenshtein distance algorithm

app/utils/ol3/converter

Feature conversion routines for featured defined in configuration and native openlayers features.

app/views/AppLayoutView

The app/application/rhythm-gis-app uses this view to render the maplet.

Accepts the following options:

option about
text title to assign to this view

app/views/BasemapView

The app/controls/basemap-tool uses this view to render basemaps.

Accepts the following options:

option about
text title to assign to this view

app/views/BookmarkView

The app/controls/bookmark-picker uses this view to render bookmarks.

Accepts the following options:

option about
text title to assign to this view

app/views/MapView

Manages all things map including creating layers.

Triggers a corresponding event when any of the following map events occur:

DOMAttrModified DOMCharacterDataModified DOMContentLoaded DOMFocusIn DOMFocusOut DOMNodeInserted DOMNodeInsertedIntoDocument DOMNodeRemoved DOMNodeRemovedFromDocument DOMSubtreeModified MSGestureChange MSGestureEnd MSGestureHold MSGestureStart MSGestureTap MSGotPointerCapture MSInertiaStart MSLostPointerCapture MSPointerCancel MSPointerDown MSPointerEnter MSPointerHover MSPointerLeave MSPointerMove MSPointerOut MSPointerOver MSPointerUp beforecopy beforecut beforepaste beforeunload blur change click compositionend compositionstart compositionupdate connect consolemessage contextmenu copy cut dblclick deactivate drag dragend dragenter dragleave dragover dragstart drop error exit focus gotpointercapture hashchange help input keydown keypress keyup load loadabort loadcommit loadredirect loadstart loadstop losecapture lostpointercapture message mousedown mouseenter mouseleave mousemove mouseout mouseover mouseup moveend offline online orientationchange pagehide pageshow paste pointercancel pointerdown pointerenter pointerleave pointermove pointerout pointerover pointerup popstate postcompose postrender precompose propertychange readystatechange render resize responsive rightclick scroll select selectstart sizechanged storage submit text textInput touchcancel touchend touchmove touchstart unload unresponsive visibilitychange webkitAnimationEnd webkitAnimationIteration webkitAnimationStart webkitTransitionEnd wheel

The difference being that the event name is prefixed with "map-".

Similarly, triggers a "map-" event when any of the following view "change" events occur:

center resolution rotation

Identify any of these events using an event handlers event attribute to respond to map/view changes.

Sample Usage:

<EVENT 
    about="extension placeholder, logs the maps viewstate" 
    event="map-resolution" 
    id="map-event-handler" 
    mid="app/commands/map-event-handler" />

In this example the map-event-handler fires each time the map resolution changes.

Accepts the following options:

option about
className css className [default: map]
extent Set the geographical extent of the map.
init-center Set the coordinates on which the map will be centered when it is first loaded.
init-zoom Set the initial zoom level of the map.
maplet maplet configuration
max-zoom Specify the minimum zoom level at which the map will be visible.
min-zoom Specify the maximum zoom level at which the map will be visible.
model model of maplet configuration
template map layout template [default: app/templates/layout-map-template]
wkid Spatial Referencing System Well-known ID [default: EPSG:3857]

app/views/SymbologyView

The app/controls/legend uses this view to render the symbologies registered with the maplet.

Accepts the following options:

option about
text title to assign to this view

app/views/TabsView

The app/controls/tabs uses this view to render controls in a tabbed container.

Accepts the following options:

option about
text title to assign to this view

app/views/ToolbarView

View using templates/toolbar-template.

Usage Example:

<CONTROL id="toolbar" mid="app/controls/view">
<OPTIONS>
    <Values about="identify a template containing view regions" id="template" value="app/templates/toolbar-template" />
    <Values id="view" value="app/views/ToolbarView" />
</OPTIONS>
</CONTROL>

Accepts the following options:

option about
template overrides the default template
text title to assign to this view

app/views/base-view

base view

Accepts the following options:

option about
text title to assign to this view

app/views/layerpicker-view

The app/controls/layerpicker-tool uses this view to render layers.

Accepts the following options:

option about
text title to assign to this view

liferay

This is the runtime loader for the Rhythm Civics map. It configures the requirejs namespaces and returns a promise to the application constructor.

Usage Example:

require(["liferay"], function (loader) {
	loader.done(function (App) {
		App.create().done(function(app) {
			// do things with the app instance
		});
	});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment