[Chameleon] Report the correct map scale

Bart van den Eijnden BEN at Syncera-ITSolutions.NL
Tue Aug 9 02:09:31 EDT 2005


Abe,

are you in JSAPI mode or not?

I fixed a similar problem a few months  ago, maybe you can check this bug report, the solution might also apply to your problem:

http://bugzilla.maptools.org/show_bug.cgi?id=1030

Best regards,
Bart

Bart van den Eijnden
Syncera IT Solutions
Postbus 270
2600 AG  DELFT

tel.nr.: 015-7512436
email: BEN at Syncera-ITSolutions.nl

>>> Abe Gillespie <abe.gillespie at gmail.com> 08/08/05 11:10pm >>>
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

_______________________________________________
Chameleon mailing list
Chameleon at lists.maptools.org 
http://lists.maptools.org/mailman/listinfo/chameleon




More information about the Chameleon mailing list