Skip to content

hd-map-pin

Attributes and example

hd-map-pin

One place on an hd-map, written inside it; draws nothing itself.

AttributeWhat it is
deviceWhat it is (a device id), to follow it and glide it.
latLatitude in degrees.
lonLongitude in degrees.
nameIts label beside the pin.
iconRegistry icon in the pin.Default device.vehicle.
sinceWhen it was seen there (ISO time), shown as "4 min ago".
staletrue when the device is unavailable: the pin fades.
<hd-map>  <hd-map-pin lat="52.3602" lon="4.8852" name="Car" icon="device.vehicle"></hd-map-pin></hd-map>

Styling

Set CSS variables on the component element. Its internal elements live in Shadow DOM; only the exposed named parts can be styled with ::part.

No component-specific CSS variables are exposed. Use the host element’s sizing and the documented theme variables.

Style the host

hd-map-pin {  --hd-accent: #2563eb;  max-width: 100%;}
Theme variables