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
vanilla
react
vue
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 |
|
|
|
|
|
|
Properties
geometry
optional readonly geometry: <a href="ref/#GenericGeometry">GenericGeometry</a><<a href="ref/#LngLat">LngLat
id
readonly id: string
properties
readonly properties: <a href="ref/#recordkeys-type ">Record</a><string, unknown>