AnsweredAssumed Answered

Trigger Layer(s) Popup with Feature.Geometry

Question asked by bokeefe on Nov 5, 2014
Latest reply on Nov 6, 2014 by bokeefe

The simple version of this question is...

Can I trigger a specific layers popup / click response using a feature.geometry point?

 

The more involved version is as follows...

I have some simple maps, MyWatershed, Council Districts, etc. Currently the user opens the map, enters their address, and then has to click on the map to find out what watershed or council district they are in. I would like to circumvent that. I want the user to enter their address and then wherever that dot / popup (titled "Location") shows up, instead of showing it... trigger a click event / popup for a specific layer at that point.

 

I found the place in the Geocoder widget where this event gets fired...

/widgets/Geocoder/Widget.js : line 238

 

        if (feature) {

          this.map.infoWindow.setTitle("Location");

          this.map.infoWindow.setContent(content || null);

          this.map.infoWindow.show(feature.geometry);

  

        } else if (extent) {

          this.map.setExtent(extent);

        }

 

I "believe" that I can interrupt the this.map.infoWindow.show command, and step in and fire off a click even at feature.geometry instead. Still researching but if anyone has a better direction, please advise!

Outcomes