Types and interfaces

Types of interfaces used in the constructors, options and functions of the Marker Layout library.


The possible anchor points values: "center" | "top" | "bottom" | "left" | "right"


The type AbstractMarker is a simple data structure that hold information about a marker (position, size) and the list of vector features it is supposed to contain.


id Unique ID of a marker, most likely the ID of a geojson feature (from a vector tile)
position Position in screen space of the top-left corner [x, y]
size Size in screen space [width, height]
The feature represented by the marker
internalElementSize Size of each internal elements (useful for when a marker contain multiple vector features)


The type MarkerMap is simply a JS Map of AbstractMarker. The key of this map (number) is a hash specific to one of multiple vector features contained by a marker. If you want to add an extra caching logic, you may want to track this ID, otherwise it’s only used internally and is of little interest at application level.


An object of type MarkerStatus is a simple data structure that contains the status of the marker compared to the previous status.


new The markers that were added since the last update()
updated The markers that were already present in the last update but had their position changed
removed The markers that are no longer present since the last update
On this page