[OpenLayers-Users] getting map scale in layerswitcher redraw...

John Cole john.cole at uai.com
Wed Mar 14 09:46:04 EDT 2007


This is a repost, since I really need some help on this one :-)  If anyone
has a suggestion on how to get the current map scale inside the
LayerSwitcher redraw event, I'd really appreciate it.

-------------------

I'm working with Lance Dyas' modified LayerSwitcher and I've run into an
issue.  I need to tell the WMS GetLegendGraphic request the current scale.
I peeked at the scale control and used 'this.map.getScale()' and it isn't
returning the results I was expecting.  I put a string append in both the
layer switcher redraw and the scale control updateScale function to get a
trace of what OL thinks the scale is at each point.  Here are the results:

layer switcher> 442943842.5
layer switcher> 442943842.5
layer switcher> 442943842.5
layer switcher> 442943842.5
layer switcher> 442943842.5
updateScale> 442943842.5
updateScale> 216281.17309570312

The last scale 216K is what I was expecting back.  How can I get this scale
in the layer switcher redraw?

Thanks,

John

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.446 / Virus Database: 268.18.11/721 - Release Date: 3/13/2007
4:51 PM
 
This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail.



More information about the Users mailing list