-
Name Type Description optionsName Type Description idstring Layer id
mapmodule:cercaliagl/Map~Map Mapbox Map
typestring Type
onClusterClickfunction Callback function when mouse click cluster feature.
onClusterMouseOverfunction Callback function when mouse over cluster feature.
onClusterMouseOutfunction Callback function when mouse out cluster feature.
clusteringEnabledBoolean Enable/Disable clustering. Default
true.minTimeToDragnumber Minimum time to start dragging a marker. Default
200.layerOpacityFactornumber Layer opacity. Default
1.
Extends
Methods
-
-
Disable clustering markers.
-
-
Enable clustering. Clustering agroup markers in circle features showing total features clustered over this circular feature. Callback events for cluster feature events is possible using
module:cercaliagl/Map~Map#enableClusteringmethodName Type Description maxZoomnumber Max zoom. Default
16clusterRadiusnumber Radius in pixels for every cluster. Default
40. -
Converts layer into heatmap. There are two layers: Zone layer for heat, and points layer. Points layers is useful to show markers in the nearest zooms. Read MapboxGL documentation to styling both layers: https://docs.mapbox.com/mapbox-gl-js/style-spec/layers/#heatmap.
Name Type Description styleZonesObject.<string, (string|boolean|number|array)> Zones styles.
stylePointsObject.<string, (string|boolean|number|array)> Points styles.
-
Obtain layer id.
Returns:
Layer id.
-
Returns:
Layer opacity factor
-
Returns:
Return min time to start dragging in milliseconds
-
getOverlappedMarkers(currentExtentView, tolerance){Array.<Array.<module:cercaliagl/layer/Marker~Marker>>}
-
Get Overlapped markers
Name Type Description currentExtentViewboolean | undefined If
truereturns only visible markers at the moment, if notnullorfalseit returns all markerstolerancenumber (defaults to 5) Tolerance in meters.
Returns:
Array of group (array) of features.
-
Overlap markers if some markers coincides in the same exact coordinate. This function must be called after add or remove markers.
Name Type Description separationnumber (defaults to 3) Separation from anchor. Default
3. -
Name Type Description factornumber Layer opacity factor
-
Name Type Description minTimeToDragnumber Min time to start dragging in milliseconds
-
Name Type Description visibleboolean Visible