A versatile and lightweight toolkit for building a simple web map.
This project is maintained by bcgov
This is default configuration for the ESRI Dynamic layer. Click on a property name for more information:
{ "layers": [ { "type": "esri-dynamic", "id": null, "title": null, "opacity": null, "isVisible": false, "isQueryable": true, "minScale": null, "maxScale": null, "metadataUrl": null, "popupTemplate": null, "titleAttribute": null, "attributes": null, "queries": null, "mpcmId": null, "mpcmWorkspace": null, "serviceUrl": null, "dynamicLayers": null } ] }
"type": String
The type of layer object.
Must be one of these values:
"esri-dynamic"
,
"vector"
,
or
"wms"
.
"id": String
The unique identifier for the layer.
Conventionally it is all lowercase with -
separating words.
This MUST be unique within the configuration.
"title": String
The title to show in the "layers"
tool panel.
"opacity": Number
The value can be from 0 (completely transparent, invisible) to 1 (opaque). This opacity value is applied over any opacity that may already configured for the layer on the server where it rendered.
"isVisible": Boolean
If true
, then the layer is visible when the map initializes.
Default is false
.
"isQueryable": Boolean
If true
, the layer is able to be queried by the "identify"
tool.
Defaults to true
.
"minScale": Number
This value is the denominator of the scale value. The layer is visible if the current scale is greater than the minimum scale value for the layer.
"maxScale": Number
This value is the denominator of the scale value. The layer is visible if the current scale is less than the maximum scale value for the layer.
"metadataUrl": String
The URL that will be used as a link to additional metadata of this layer.
"popupTemplate": String
A string that contains a Vue template.
The template is used to construct the popup that appears when presenting a feature, in the "identify"
tool, "query"
tool, and "select"
tool.
The model that is available to the template:
// layer configuration
layer.id
layer.title
layer.attributes // array of objects: { visible, title, name }
// current feature
feature.id
feature.title
feature.properties // object: attribute key:value
"titleAttribute": String
The name of the attribute to use as the title for a feature from this layer.
"attributes": Array
An array of attribute objects.
Used to control how feature attributes appear in the popup that is used by the "identify"
tool, "query"
tool, and "select"
tool.
The order of the attribute objects, is the order they will appear in the popup.
If this property is null
or missing, then the popup will show all the attributes of the feature, using the internal field names.
If this property is an empty array ([]
), then no attributes will be shown for the feature.
"queries": Array
An array of query objects.
These are query definitions which are used by the "query"
tool to allow the user to specify query parameters, and show the results of these parameterized queries on the map.
"mpcmId": String
The ID used for this layer in the DataBC Layer Catalog.
"mpcmWorkspace": String
The workspace used for this layer in the DataBC Layer Catalog.
"serviceUrl": String
The URL for the DataBC Layer Catalog.
"dynamicLayers": Array
A listing of dynamic layer configurations. This will typically contain configuration for a single layer. The default configuration comes from the MPCM Layer Catalog.
"drawingInfo": Object
Each dynamicLayers
property includes a drawingInfo
property which defines the appearance of the layer on the map. drawingInfo
can be manually edited to configure aspects of layer display. For more information, see drawingInfo
documentation.