-
Name Type Description optionsOptions
Name Type Description idstring Id
iconmodule:cercaliagl/Icon~Icon Icon
positionmodule:cercaliagl/LonLat~LonLat Position
encodedGooglePositionstring Position encoded on google polyline format.
draggableboolean Draggable. Default
false.popupmodule:cercaliagl/Popup~Popup | null marker popup.
onClickfunction Function to execute on marker click.
onDoubleClickfunction Function to execute on marker double click.
onMouseOutfunction Function to execute on Mouse Out.
onMouseOverfunction Function to execute on Mouse Over.
onRightClickfunction Function to execute on marker right click.
onDragEndfunction Function to execute when ends marker dragging.
onDragMovefunction Function to execute during marker dragging.
onDragStartfunction Function to execute on marker dragging start.
onVisibilityChangefunction Function to be executed when marker visibility changes.
onDropfunction Function to obtain markers on dragged marker extent when drag ends.
simpleLabelmodule:cercaliagl/SimpleLabel~SimpleLabel Marker Simple Label object.
visibleboolean Marker visible or not. Default
true.labelmodule:cercaliagl/Label~Label Label
zIndexnumber Z-Index. Default 0.
extraPropertiesObject.<string, string> Extra properties to put inside geojson. Default {}.
encodedPrecisionnumber Precision of encoded data. Default 5.
Extends
Methods
-
Name Type Description popupmodule:cercaliagl/Popup~Popup PPopup
-
Close popup
-
Gets a value.
Name Type Description keystring Key name.
Returns:
Value.
-
Get extra properties
Returns:
Extra properties
-
Returns:
GeoJSON
-
Returns:
GeoJSON
-
Get marker icon
Returns:
Icon
-
Returns:
Id
-
Get label
Returns:
label Label assigned to th marker.
-
Returns:
Layer
-
Returns:
Map
-
Returns:
Popup
-
Returns:
visible Visible
-
Get zIndex
Returns:
zIndex zIndex
-
Hide marker label
-
Returns:
draggable Draggable
-
Open popup
-
Remove label
-
Sets a value.
Name Type Description keystring Key name.
value* Value.
-
Set marker as draggable
Name Type Description draggableboolean Draggable
-
Set extra properties
Name Type Description propertiesObject.<string, string> Extra properties
-
Set marker icon.
Name Type Description iconmodule:cercaliagl/Icon~Icon Icon
-
Assign/change marker label text
Name Type Description labelmodule:cercaliagl/Label~Label Label content
-
Sets the function to be called when the marker is dragged and released.
Name Type Description onDragEndfunction The function to be called when the marker is dragged and released.
-
Sets the function to be called when the marker is moved.
Name Type Description onDragMovefunction The function to be called when the marker is moved
-
Sets the function to be called when the marker has started to be dragged.
Name Type Description onDragStartfunction The function to be called when the marker has started to be dragged.
-
Sets the function to be called when the marker has changed his visibility.
Name Type Description onVisibilityChangefunction The function to be called when the marker has changed his visibility.
-
Name Type Description popupmodule:cercaliagl/Popup~Popup Popup
-
Set position
Name Type Description positionmodule:cercaliagl/LonLat~LonLat | module:maplibre-gl~LngLat Position
avoidRefreshboolean (defaults to false) Avoid refresh
-
Set simpel label. If
nullsimple label will be removedName Type Description simpleLabelmodule:cercaliagl/SimpleLabel~SimpleLabel | null Simple Label
-
Hide or show marker.
Name Type Description visibleboolean Visible
-
Set zIndex and update it.
Name Type Description zIndexnumber zIndex
-
Show marker label