Displaying legend symbology in infowindow popup?

3961
4
Jump to solution
04-29-2015 07:22 AM
VincentChoffrut
New Contributor

hello everyone,

my map has a nice legend dijit and a click on some particuliar objects of the map pops up an infowindow dijit with the selected fields as a content, this is just FINE.

NOW I wonder whether it would be possible that the infowindow dijit displayed the same thing as the legend dijit, meaning the symbology of the particuliar object which is actually clicked?

I hope this question is clear...

I've tried several ways but I can't seem to find where the symbology of the objets is managed in arcgisServer (somewhere in LayerInfo?) and how to select it for diplaying in an infowindow.

I hope this is possible,

thanx in advance!

0 Kudos
1 Solution

Accepted Solutions
KellyHutchins
Esri Frequent Contributor

One option might be to use the template picker to display the selected features symbol. Here's an example of how this works:

Symbols

View solution in original post

0 Kudos
4 Replies
SteveCole
Frequent Contributor

I have not done this but the REST API can return a layer's legend information as a JSON object. Within the framework of the Javascript API, you would use the esri/request object to obtain the legend info via the REST API call. Again, I haven't done this but it is covered in Rene Rubalcava's ArcGIS Web Development book on page 53.

Steve

0 Kudos
VincentChoffrut
New Contributor

hello steve, thanx a lot for the interesting hint... I'm going to dig a little bit in that direction too

0 Kudos
KellyHutchins
Esri Frequent Contributor

One option might be to use the template picker to display the selected features symbol. Here's an example of how this works:

Symbols

0 Kudos
VincentChoffrut
New Contributor

hello kelly,

thanx a lot for the hint! I'm working on it... Template picker seems to do exactly what I expect from him...

cheers from paris

0 Kudos