OptionalavailabilityAvailability level for POI icons with availability indicators.
Used when displaying custom icons for POIs with real-time availability data. The SDK will select the appropriate icon based on the availability ratio and configured threshold.
'available': Used when ratio >= threshold (sufficient capacity available)'occupied': Used when ratio < threshold (low or no availability)Unique identifier for the icon in the map sprite.
This ID is used to reference the icon when styling map features. The specific values depend on the context:
OptionalimageURL or data URI of the icon image.
This property is optional. If omitted, the icon with the corresponding id
must already exist in the map's sprite. Use this property when you need to add
a new icon to the sprite, or provide undefined when referencing an existing sprite icon.
// Adding a new icon to the sprite
image: 'https://example.com/marker.png'
// Using a data URI
image: 'data:image/png;base64,iVBORw0KG...'
// Using a relative path
image: '/assets/icons/marker.png'
// Referencing an existing sprite icon (no URL needed)
// image is omitted when the icon already exists in the sprite
OptionalpixelThe pixel ratio of the icon image.
This property is optional and only relevant when image is provided.
If omitted while providing an image, it defaults to 2.
When the icon already exists in the sprite (no image), this property is ignored.
Use 2 for high-DPI (Retina) displays, 1 for standard displays.
Higher values result in sharper icons on high-resolution screens.
Basic structure to define custom map icons, which end up in the map sprite.
Allows you to provide custom images for various map icons such as POIs, route waypoints, charging stations, and any other TomTom map icons, replacing the default icons with your own branding or design.
Remarks
Icon images can be URLs, raw SVG texts, data URIs or loaded img elements. They will be loaded/transformed if necessary and added to the map style sprite for rendering.
Example
See
https://maplibre.org/maplibre-style-spec/sprite/