Marker
Class for creating markers on the map.
new constructor
(map, options)
Example:
const marker = new mapgl.Marker(map, {
coordinates: map.getCenter()
});
Parameters
Methods
Class for creating markers on the map.
(map, options)
Example:
const marker = new mapgl.Marker(map, {
coordinates: map.getCenter()
});
()
Destroys the marker.
void
(type, data?)
Calls all event listeners with event type type
type
K
Event type
data?
DynamicObjectEventTable[K]
Data transferred to events
this
()
Returns current marker center in geographical coordinates [longitude, latitude]
.
number[]
()
Hides the marker.
this
(type, listener)
Removes event listener registered with on
type
K
Event type
listener
(ev: DynamicObjectEventTable[K]) => void
Event handler
this
(type, listener)
Registers event listener
type
K
Event type
listener
(ev: DynamicObjectEventTable[K]) => void
Event handler
this
(type, listener)
Registers event listener which will be called once
type
K
Event type
listener
(ev: DynamicObjectEventTable[K]) => void
Event handler
this
(coordinates)
Sets the geographical center of the marker.
coordinates
number[]
Coordinates [longitude, latitude]
where the center of the marker should be set.
this
()
Displays hidden marker.
this