# Marker
Creates a marker component.
Extends Evented (opens new window).
new Marker(options: Object)
# Parameters
# options
(Object
(opens new window))
Name | Description |
---|---|
options.element HTMLElement (opens new window) | DOM element to use as a marker. The default is a light blue, droplet-shaped SVG marker. |
# Instance Members
# addTo(map)
Attaches the Marker
to a Map
object.
# Parameters
map
(Map
) The Mini Tokyo 3D map to add the marker to.
# Returns
Marker
: Returns itself to allow for method chaining.
# remove()
Removes the marker from a map.
# Returns
Marker
: Returns itself to allow for method chaining.
# setActivity(active)
Sets the marker's activity state. Active status refers to the state where the marker is selected and highlighted.
# Parameters
active
(boolean
(opens new window)) If true
, the marker is active.
# Returns
Marker
: Returns itself to allow for method chaining.
# setLngLat(lnglat)
Sets the marker's geographical position and move the marker to it.
# Parameters
lnglat
(LngLatLike
(opens new window)) A LngLatLike (opens new window) describing where the marker should be located.
# Returns
Marker
: Returns itself to allow for method chaining.
# setVisibility(visible)
Sets the marker's visibility state.
# Parameters
visible
(boolean
(opens new window)) If true
, the marker is visible.
# Returns
Marker
: Returns itself to allow for method chaining.
# Events
# click
Fired when a pointing device (usually a mouse) is pressed and released on the marker.
# mouseenter
Fired when a pointing device (usually a mouse) enters the marker.
# mouseleave
Fired when a pointing device (usually a mouse) leaves the marker.