Limit Legend to Show Only Items Within View Extent

188
2
09-06-2019 01:56 PM
BenBabbel
New Contributor II

Hello, I have some rasters that I am adding to my map as a single MapImageLayer. As of right now, when I zoom to any one of these rasters the legend automatically displays ALL rasters. (I have a minScale set for my MapImagerLayer, so the legend won't populate until I zoom in enough, and the rasters display on the map). I was wondering what would be the best way to have the legend display only the raster that is within my view extent. I will continuously be adding rasters to my map at various locations around the world, so it would be nice to make it so the legend only displays the raster you are zoomed in on rather than all of the rasters in my MapImageLayer. 

Thanks!

Ben

0 Kudos
2 Replies
BenElan
Esri Contributor

A solution was provided in this thread 

You may have to update the code, but the workflow would remain the same.

0 Kudos
BenBabbel
New Contributor II

Thank you for the response. I will give this a try.

-Ben

0 Kudos