Interface: MarkerConfig
Represents the configuration for the creation of a marker in a map. Provides all necessary properties to create and customize a map marker.
Example
const markerConfig: MarkerConfig = {
id: "coffee-shop-1",
coordinate: { lat: 40.7128, lng: -74.006 },
icon: "https://example.com/coffee-icon.png",
text: "Coffee Shop",
onClick: () => console.log("Marker clicked!"),
}Properties
anchor?
optional anchor: PositionAnchor;A string indicating the part of the Marker that should be positioned closest to the coordinate set
via coordinate. Options are 'center', 'top', 'bottom', 'left', 'right',
'top-left', 'top-right', 'bottom-left', and 'bottom-right'.
Default Value
"center"coordinate
coordinate: LatLngThe geographic coordinates of the pointed position.
See
LatLng for coordinate structure
element?
optional element: HTMLElement;The HTML element associated with the marker. If provided, this element will be used instead of the icon and text properties.
floorId?
optional floorId: string;Identifier for the floor on which the marker is located. Used for indoor navigation and floor-specific marker management.
icon?
optional icon: string | HTMLElement;The icon element to be displayed within the marker. Can be either a URL string or an HTML element.
iconProperties?
optional iconProperties: IconProperties;Additional properties for customizing the marker icon.
See
IconProperties for available customization options
id?
optional id: string;Unique identifier for the marker. If not provided, a hexadecimal key will be generated automatically.
onClick()?
optional onClick: () => void;The function to be executed when the marker is clicked.
Returns
void
refId?
optional refId: string;Reference identifier of the marker related place. Used to associate the marker with a specific place in the system.
rotation?
optional rotation: number;Rotation angle of the marker in degrees clockwise from north. Useful for directional markers (e.g.
compass arrows). Combine with rotationAlignment: "map" to keep the marker pointing the same
compass direction as the user rotates the map.
Default Value
0rotationAlignment?
optional rotationAlignment: Alignment;Sets the rotationAlignment property of the marker. Controls how the marker rotates with the map.
See
Alignment for available alignment options
text?
optional text: string | HTMLElement;The text content to be displayed with the marker. Can be either a string or an HTML element.
textPosition?
optional textPosition: TextPosition;The position of the marker’s text relative to its container.
See
TextPosition for available positioning options
textProperties?
optional textProperties: TextProperties;Additional properties for customizing the marker text. If text content is an instance of HTMLElement, this value will not be considered.
See
TextProperties for available customization options