gem.control. GeoJsonAddedDataControl

new GeoJsonAddedDataControl(geoJsonFileOrObject, iconLocation, iconFilteropt, dataOptionsopt)

Control for displaying data from a GeoJSON source

Parameters:
NameTypeAttributesDescription
geoJsonFileOrObjectstring

GeoJSON data file path/url or string object

iconLocationstring

path/url to marker image/icon

iconFilterArray.<object><optional>

filters for applying different icons to markers based on their properties

Properties
NameTypeDescription
keystring

data source item property key

valuestring

data source item property value

iconClassstring

css class to use for this filter

dataOptionsobject<optional>

options for displaying data source items

Properties
NameTypeAttributesDefaultDescription
markerobject

options for markers display on map

Properties
NameTypeAttributesDefaultDescription
cssClassstring<optional>

specify custom marker style rules

highlightClassstring<optional>

specify selected marker custom highlight style rules

widthnumber<optional>
20
heightnumber<optional>
20
hoverWidthnumber<optional>
25
hoverHeightnumber<optional>
25
markerPosstring<optional>
'center'

where to place the marker relative to the item coordinate

markerFunctioncallbackMarker

fully customize marker appearance

markerBubbleobject

options for styling the marker bubble on click/hover

Properties
NameTypeAttributesDefaultDescription
titleArray.<string>

data source properties to use for marker bubble title text

imagestring

data source image url property to use for marker bubble image

widthnumber<optional>
240

bubble width in px

heightnumber<optional>
200

bubble height in px

enableHoverbool<optional>
true

disable marker bubble interaction on hover

enableClickbool<optional>
true

disable marker bubble interaction on click

markerBubbleClassstring<optional>

custom css class for marker bubble

markerBubbleFunctioncallbackMarkerBubble<optional>

fully customize marker bubble

markerGroupingobject<optional>

marker grouping options

Properties
NameTypeAttributesDefaultDescription
maxLevelnumber<optional>
13

maximum map level to apply grouping ( max allowed 15 )

styleobject<optional>
gem.control.MarkersGroupStyleType.default

style to apply to marker groups

markerGroupFunctioncallbackMarkerGroup<optional>

fully customize marker groups style

disableZoomToDatabool<optional>
false

disables zooming to the data source area at start-up