YMapHotspot

The YMapHotspot class determines a hotspot not displayed separately on the map.
YMapHotspot is used to mark hotspots on raster layer images.

Usage example

const map = new ymaps3.YMap(document.getElementById('map-root'), {...});
map.addChild(new ymaps3.YMapListener({
  layer: 'any',
  onClick: (object) => {
     if (object instanceof ymaps3.YMapHotspot) {
         console.log('Hotspot clicked', object);
     }
  }
}))

Constructor

new YMapHotspot(geometry, properties)

Constructor parameters

Parameter

Type

geometry

undefined | GenericGeometry<LngLat>

properties

Record<string, unknown>

Properties

geometry

optional readonly geometry: <a href="ref/#GenericGeometry">GenericGeometry</a>&lt;<a href="ref/#LngLat">LngLat

id

readonly id: string

properties

readonly properties: <a href="ref/#recordkeys-type ">Record</a>&lt;string, unknown&gt;