You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

2.3 KiB

Marker

Creates a marker component.

Extends Evented.

new Marker(options: Object)

Parameters

options (Object)

Name Description
options.element
HTMLElement
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) 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) A LngLatLike 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) 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.