-
Name Type Description options
Name Type Description id
string Layer id
map
module:cercaliagl/Map~Map Mapbox Map
type
string Type
onClusterClick
function Callback function when mouse click cluster feature.
onClusterMouseOver
function Callback function when mouse over cluster feature.
onClusterMouseOut
function Callback function when mouse out cluster feature.
clusteringEnabled
Boolean Enable/Disable clustering. Default
true
.minTimeToDrag
number Minimum time to start dragging a marker. Default
200
.
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#enableClustering
methodName Type Description maxZoom
number Max zoom. Default
16
clusterRadius
number 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 styleZones
StyleHeat Zones styles.
stylePoints
StyleHeat Points styles.
-
Obtain layer id.
Returns:
Layer id.
-
Returns:
Layer opacity factor
-
Returns:
Return min time to start dragging in milliseconds
-
getOverlappedMarkers(currentExtentView, opt_tolerance){Array.<Array.<ol.Feature>>}
-
Get Overlapped markers
Name Type Description currentExtentView
boolean | undefined If
true
returns only visible markers at the moment, if notnull
orfalse
it returns all markerstolerance
number 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 separation
number (defaults to 3) Separation from anchor. Default
3
. -
Name Type Description factor
number Layer opacity factor
-
Name Type Description minTimeToDrag
number Min time to start dragging in milliseconds
-
Name Type Description visible
boolean Visible