AnsweredAssumed Answered

display infowindow when mouse hover over a specific point graphic

Question asked by lkoumis on Jul 18, 2015
Latest reply on Jul 18, 2015 by lkoumis

I have several graphics but I want to display an info window only when the mouse hover one specific graphic point.

So, I modified a code from a sample, to initiate the display only if the mouse location is the same as the point location (mypoint.lon,

When I use accuracy to 3 decimals for the lat lon, it works but it displays the infowindow when the mouse is nearby the point. If I increase the accuracy to 4 decimals, then the infowindow never displays unless you hit the exact location which is difficult. Suggestions? Do you have another approach to show the info window only for selected graphics?


Thank you.


var mp = webMercatorUtils.webMercatorToGeographic(event.mapPoint);

  if ((mp.x.toFixed(3) === mypoint.lon.toFixed(3)) && (mp.y.toFixed(3) ==={

      ;  //use the maps graphics layer as the highlight layer

               // var graphic = event.graphic;



                var highlightGraphic = new Graphic(myGraphicMarker.geometry, pointSymbol);