Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

GISMapApp

Custom

  • Last UpdatedMar 04, 2025
  • 3 minute read

Defines a layer where data is not hosted by any server. In turn, you can specify the layer's data (features) either as a plain JSON array (each element is a feature, with the elements properties as attribute fields) or in GeoJSON format (tool helps to build a custom GeoJSON). JSON format only allows features with Point geometry, if more complex geometries are required, GeoJSON format should be used.

The information on how to render (draw) this features in the map is controlled by the drawingInfo layer property.

The following table provides the specific configurable options available for this layer:

Property

Type

Description

asImage [Optional]

Boolean

Defines vector data is rendered client-side, to an image. This provides great performance during panning and zooming, however pixels are scaled during zoom animations.

assetNameTemplate [Optional]

String

Defines template string to generate each feature asset name which is used to set CurrentAsset control property when clicked.

When merge is enabled, the generated asset name is used to match the properties derived from the Features control property.

assetZoom [Optional]

String

Defines zoom level to set when an asset in this layer is selected via CurrentAsset control property. Attribute templates can be used to get this value from a feature property ({property}).

centerOnClick [Optional]

Boolean

Centers the map on a feature when clicked.

data

Object

Defines custom layer's data in plain JSON (array) or GeoJSON format.

drawingInfo [Optional]

DrawingInfo

Provides drawing, labeling, and transparency information for the layer.

For more information, refer DrawingInfo.

format [Optional]

Format

Defines data format used.

  • Values: "json" | "geojson"

  • Default: "json"

featureReduction [Optional]

FeatureReduction

Provides options for reducing the number of features in the view by aggregating them to clusters.

For more information, refer Feature Reduction.

merge [Optional]

Boolean

Enables feature merging capacity for this layer.

popup [Optional]

Popup

Defines layer popup configuration.

For more information, refer Popup.

projection [Optional]

String

Defines projection used when format is plain JSON.

  • Default: "EPSG:4326"

type

custom

A type of Layer.

xProperty [Optional]

String

Defines property used as X coordinate when format is plain JSON.

  • Default: "x"

yProperty [Optional]

String

Defines property used as Y coordinate when format is plain JSON.

  • Default: "y"

zoomOnClick [Optional]

Boolean

Sets the assetZoom level to the map when a feature is clicked.

Examples of Custom

Below is an example with a custom layer with json format:

  • Configuration and map preview

    Custom configuration and map preview

  • Configuration JSON string

    {

    "data": [

    {

    "x": 0,

    "y": 0

    },

    {

    "x": ,

    "y":

    },

    {

    "x": ,

    "y":

    }

    ],

    "title": "Custom",

    "type": "custom",

    "isBaseMap": false,

    "format": "json"

    }

Below is an example with a custom layer with geojson format.

  • Configuration and map preview

    Custom layer with geojson configuration and map preview

  • Configuration JSON string

    {

    "title": "Custom",

    "type": "custom",

    "isBaseMap": false,

    "format": "geojson",

    "data": {

    "type": "FeatureCollection",

    "features": [{

    "type": "Feature",

    "geometry": { "type": "Point" ,"coordinates": [0,0.]},

    "properties": {"prop0": "value0","prop": ""}

    }, {

    "type": "Feature",

    "geometry": {"type": "LineString", "coordinates": [[0,0],[0,],[0,0],[0,]]},

    "properties": {"prop0": "value0","prop": 0}

    }, {

    "type": "Feature",

    "geometry": {"type": "Polygon", "coordinates": [[[00,0],[0,0],[0,],[00,],[00,0]]]},

    "properties": {"prop0": "value0","prop": {"this": "that"}

    }

    }]

    }

    }

Related Links
TitleResults for “How to create a CRG?”Also Available in