# Perspective Map: make areas (polygons) hoverable & clickable?

**URL:** <https://forum.inductiveautomation.com/t/perspective-map-make-areas-polygons-hoverable-clickable/45807>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [April 20, 2021, 1:28pm UTC](https://forum.inductiveautomation.com/t/perspective-map-make-areas-polygons-hoverable-clickable/45807 "2021-04-20T13:28:52Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [April 20, 2021, 1:28pm UTC](https://forum.inductiveautomation.com/t/perspective-map-make-areas-polygons-hoverable-clickable/45807/1 "2021-04-20T13:28:52Z")

</div>

Is it possible to make map polygons hoverable and clickable by the user? I want to create polygons that define areas on a map, and have the user be able to hover over the areas and have them change style, and also be able to click to go to that area.

---

<div class="post-metadata">

**Author:** ![nminchin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nminchin/32/6911_2.png) [@nminchin](https://forum.inductiveautomation.com/u/nminchin)\
**Post date:** [April 24, 2021, 2:04am UTC](https://forum.inductiveautomation.com/t/perspective-map-make-areas-polygons-hoverable-clickable/45807/2 "2021-04-24T02:04:13Z")

</div>

Looks like this has been added 😃

> [@Nightly 8.1 Changelogs - 2021](http://forum.inductiveautomation.com/t/nightly-8-1-changelogs-2021/42410/66):
>
> Nightly Changelog: 8.1.6-b20210420 Visualization 2010: Map: add vector layer component mouse events Added a onVectorClick event function for Map component vector layers that will return the vector layers name, type of vector as a string, and the vectors position coordinates. Also changed the type expected for the name parameter in both onVectorClick and onMarkerClick events to be of any type. Enterprise 2271: Gateway Network duplicate connection errors after reconnect Fixed an issue where …

---

<div class="post-metadata">

**Author:** ![hventer23](https://avatars.discourse-cdn.com/v4/letter/h/bbce88/32.png) [@hventer23](https://forum.inductiveautomation.com/u/hventer23)\
**Post date:** [February 16, 2023, 3:52pm UTC](https://forum.inductiveautomation.com/t/perspective-map-make-areas-polygons-hoverable-clickable/45807/3 "2023-02-16T15:52:42Z")

</div>

Hi, apologies for replying to an old post.

Yes they did add an onVectorClick event, but so many other features, that markers have, are not available for Vectors.

Markers have a popup and view property which vectors don't have.

I want to be able to hover over a vector and get a popup so that people know what area they are looking at. I can't use the click event since that is for zooming in on the area.

Just curious if you were able to make this work?

---

<div class="post-metadata">

**Author:** ![justin\_potter](https://avatars.discourse-cdn.com/v4/letter/j/ecc23a/32.png) [@justin\_potter](https://forum.inductiveautomation.com/u/justin_potter)\
**Post date:** [April 22, 2023, 5:54am UTC](https://forum.inductiveautomation.com/t/perspective-map-make-areas-polygons-hoverable-clickable/45807/4 "2023-04-22T05:54:13Z")

</div>

I have the same question. I spent several hours trying to run a script on a geoJSON file for adding a tooltip and popup attributes to type: Feature….. type: Polygon, only to realize it wouldn’t work. Is this a function not supported by leaflet?

---

<div class="post-metadata">

**Author:** ![pascal](https://avatars.discourse-cdn.com/v4/letter/p/e9a140/32.png) [@pascal](https://forum.inductiveautomation.com/u/pascal)\
**Post date:** [July 28, 2023, 1:25pm UTC](https://forum.inductiveautomation.com/t/perspective-map-make-areas-polygons-hoverable-clickable/45807/5 "2023-07-28T13:25:31Z")

</div>

Anyone managed to crate event on hover ?  
I can't figure out how to do 😥
