infotemplate displays incorrect layer

4352
6
Jump to solution
01-28-2015 07:53 AM
FrankCardone
New Contributor III

i have a web map built using the ArcGIS JavaScript API, and it contains 6 point layers.  Each layer has its own infotemplate, but each layer uses the same popup template.  When i click on a point to see its infotemplate, it displays the infotemplate, but it says something like (1 of 11) at the top, even though i only clicked on one.  The weird part is that the number of infotemplates is the number of total features in the other point layers.  For example, if i have 6 layers and each layer has 10 features, and i click on one point in Layer A, it displays (1 of 51) at the top because it counts the current feature plus all the features of the other layers.  Any idea what is happening?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

Yeah I can repro this with some sample data.  Here's a bin that shows the problem.

Popup

Looks like a bug - we'll get this fixed in the next release of the JSAPI - due out sometime around dev summit time frame.

View solution in original post

0 Kudos
6 Replies
TimWitt2
MVP Alum

Frank,

is there a fiddle or code you can share?

Thanks,

Tim

0 Kudos
FrankCardone
New Contributor III

[REDACTED]

0 Kudos
KellyHutchins
Esri Frequent Contributor

I setup a quick test using sample data and it works ok for me. In my test I only used two layers. Can you try replacing the two sample layers in the test app with some of yours and see if you can still reproduce the issue?

Popup

0 Kudos
FrankCardone
New Contributor III

thanks for testing this. 

The problem seems to only happen if i use the time slider (i tested this out without the time slider and the problem went away).  Also, the issue stops occurring if i move the time slider to another date, then back to the original.  One thought i had would be to have the time slider's thumb index set to 1, then on some sort of event that occurs before everything is loaded, move the index to 0.  i hope there's a more elegant solution though!

0 Kudos
FrankCardone
New Contributor III

i'm adding an image to clarify the issue.  ignore the black bars.  notice that i clicked on an orange dot, and even though there is only one feature at that location, it lists 16.  Also, i've cycled through the items to the 3rd one, and you can see the purple dot below the popup is highlighted.

0 Kudos
KellyHutchins
Esri Frequent Contributor

Yeah I can repro this with some sample data.  Here's a bin that shows the problem.

Popup

Looks like a bug - we'll get this fixed in the next release of the JSAPI - due out sometime around dev summit time frame.

0 Kudos