how can i attach "mouse-over" to graphiclayer in arcgis api for javascrip4.2

3598
2
Jump to solution
02-16-2017 05:33 PM
weiweitian
New Contributor

In Arcgis Javascript api 4.2 ,I want to attach "mouse-over" event to graphiclayer, but it not work

layer.on("mouse-move", function(){ });  

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Weiwei,

   The Layers and Graphics currently do not have mouse events so you have to use the views mouse events and a hitTest to see if you are dealing with any graphics.

FAQs | ArcGIS API for JavaScript 4.2 

Access features with click events | ArcGIS API for JavaScript 4.2 

https://community.esri.com/thread/177327 

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Weiwei,

   The Layers and Graphics currently do not have mouse events so you have to use the views mouse events and a hitTest to see if you are dealing with any graphics.

FAQs | ArcGIS API for JavaScript 4.2 

Access features with click events | ArcGIS API for JavaScript 4.2 

https://community.esri.com/thread/177327 

weiweitian
New Contributor

i get it ,thank you!

0 Kudos