Select to view content in your preferred language

For Robert Scheitlin:  problem with Dynamic Legend Widget 2.5

727
3
01-23-2012 08:27 AM
MarcWeinshenker1
Regular Contributor
Hi Robert,

I had a strange problem with the Dynamic Legend Widget v2.5 where opening the widget immediately after opening the map led to an empty legend display.  Toggling the zoom, though, would reveal the legend.  After some investigation, it appeared to me that the line in the function itemrenderer_dataChangeHandler in LegendItemRenderer.mxml had an awkward comparison:

else if(((iminscale == 0 || map.scale <= imaxscale) && map.scale >= imaxscale) && layer.visible && visArr.contains(lId))


As this differed from the similar line in the function updateVisibilty, I changed the map.scale comparison in the OR from <=maxscale to <=minscale as I felt is should have been, and the problem was resolved.

Thanks,
Marc
Tags (2)
0 Kudos
3 Replies
RobertScheitlin__GISP
MVP Emeritus
Marc,

   Thanks for catching that I will get the source code updated and re-release for 2.5
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Marc,

   Can you go ahead and mark your own post as the answer that way this thread does not appear in the list as unanswered?
0 Kudos
MarcWeinshenker1
Regular Contributor
Thanks, Robert.  I thought I had set the thread to Discussion and not Question, but it ended up as a question.
0 Kudos