[Chameleon] Report the correct map scale

Abe Gillespie abe.gillespie at gmail.com
Mon Aug 8 17:10:10 EDT 2005


I'm having an issue getting the current map scale during widget load. 
If I debug write out the scale of the map for the ZoomIn widget it's
always one step behind.  The following dump is from first loading the
page through two subsequent zoom-ins:

Initial page load>
ZoomIn::ParseURL
pre-zoom scale: 432308.993166

First zoom in>
ZoomIn::ParseURL
pre-zoom scale: 432308.993186
post-zoom scale: 432308.993186

Second zoom in>
ZoomIn::ParseURL
pre-zoom scale: 102414.886918
post-zoom scale: 102414.886918

Things to note:
1.  Initial page load doesn't have the "post-zoom" line because no
zooming was done.
2.  At first zoom in you see the scale is the same as when the page is
initially loaded (before AND after the actual zoom).
3.  At second zoom the scale has finally changed ... but this is
actually what the scale should have been reported for the post-zoom
line of the first zoom.

Now the widget I'm creating is experiencing the same problems and
needs the current correct scale to function properly.

Any ideas?
Thanks.
-Abe



More information about the Chameleon mailing list