AnsweredAssumed Answered

Extracting location clicked from InfoWindow Content Formatting function

Question asked by evtguy on May 20, 2016
Latest reply on May 20, 2016 by evtguy


I've run into a  situation and I'm not sure I can do what I want. I'm using formatting functions for my infoWindow content and, as part of that content, I'm including spatial coordinates (lat/long & US National Grid). If the feature clicked is a point, all is well. If the feature is a line or a polygon, things get harder because the geometry of the graphic isn't where the user actually clicked.

 

Is there any way, from within a formatting function, to go back up the chain of events to get the map click location? I tried setting a map.on("click", function(evt) {}) to store the map click position in a global variable but that's occuring AFTER I get to the content formatting function.

 

I'm not seeing a way to backtrack via the graphic sent to the function but I thought I'd ask.

 

Steve

Outcomes