Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I take the following steps:

  • Click 2 overlapping features from 2 different featLayers.

  • Popup auto-selects and highlights map.infoWindow.features[first object]

  • The popup content is actually from map.infoWindow.features[second object]

After you navigate to the second graphic and back, the popup corrects it's self??

here's an example using esri data: http://jsfiddle.net/92Q2G/1/

Any advice? Thanks.

share|improve this question
add comment

1 Answer

Couple quick things --

  1. I would say that your function identifyFeatures is getting convoluted -- hard to follow. Break things down into smaller pieces and then set breakpoints as needed. Are the deferreds functioning the way you expect them?

  2. You've probably already looked at this, but instead of keeping track of all your graphics, iterating through them, filtering and intersecting, maybe just use the identifyTask like in this example. It shows returning more than one feature identified in an infowindow http://help.arcgis.com/en/webapi/javascript/arcgis/help/jssamples_start.htm#jssamples/find_popup.html

Best of luck!

share|improve this answer
    
thanks for your comments. I'll have to take your #1 advice and re-check my identifyFeatures function. I really want to stay away from the identify Task since I'm using feature layers, and all the featLayer.graphics.features[0].attributes are already loaded in the map. Identify Task is more-so used for dynamic map service layers where attributes have to be retrieved from the REST service. –  dan Dec 7 '12 at 0:59
    
here's a workaround: setTimeout 500 mili before the infoWindow is displayed: jsfiddle.net/92Q2G/2 still isn't 'correct' tho. –  dan Dec 7 '12 at 1:45
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.