-
Name Type Description options
Options
Name Type Description id
string Id
icon
module:cercaliagl/Icon~Icon Icon
position
maplibregl.LngLat Position
encodedGooglePosition
string Position encoded on google polyline format.
draggable
boolean Draggable. Default
false
.onClick
function Function to execute on marker click.
onDoubleClick
function Function to execute on marker double click.
onMouseOut
function Function to execute on Mouse Out.
onMouseOver
function Function to execute on Mouse Over.
onRightClick
function Function to execute on marker right click.
onDragEnd
function Function to execute when ends marker dragging.
onDragMove
function Function to execute during marker dragging.
onDragStart
function Function to execute on marker dragging start.
onDragStart
function Function to be executed when marker visibility changes.
onDrop
function Function to obtain markers on dragged marker extent when drag ends.
simpleLabel
module:cercaliagl/SimpleLabel~SimpleLabel Marker Simple Label object.
visible
boolean Marker visible or not. Default
true
.label
module:cercaliagl/Label~Label Label
zIndex
number Z-Index. Default 0.
extraProperties
Object.<string, string> Extra properties to put inside geojson. Default {}.
Extends
Methods
-
Name Type Description popup
module:cercaliagl/Popup~Popup PPopup
-
Close popup
-
Gets a value.
Name Type Description key
string 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 key
string Key name.
value
* Value.
silent
boolean Update without triggering an event.
-
Set marker as draggable
Name Type Description draggable
boolean Draggable
-
Set extra properties
Name Type Description properties
Object.<string, string> Extra properties
-
Set marker icon.
Name Type Description icon
module:cercaliagl/Icon~Icon Icon
-
Assign/change marker label text
Name Type Description label
module:cercaliagl/Label~Label Label content
-
Name Type Description map
module:cercaliagl/Map~Map Map
-
Sets the function to be called when the marker is dragged and released.
Name Type Description onDragEnd
function 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 onDragMove
function 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 onDragStart
function 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 onVisibilityChange
function The function to be called when the marker has changed his visibility.
-
Name Type Description popup
maplibregl.Popup Popup
-
Set position
Name Type Description position
module:cercaliagl/LonLat~LonLat | module:maplibre-gl~LngLat Position
avoidRefresh
boolean (defaults to false) Avoid refresh
-
Set simpel label. If
null
simple label will be removedName Type Description simpleLabel
module:cercaliagl/SimpleLabel~SimpleLabel | null Simple Label
-
Hide or show marker.
Name Type Description visible
boolean Visible
-
Set zIndex and update it.
Name Type Description zIndex
number zIndex
-
Show marker label