Hi Chris,

thanks for the patch - this would definitely be good to have in the code base, 
but it needs some work. Can you please create a ticket and add your patch? If 
you don't have a trac account, send me a PM with your desired user name and 
I'll create one for you.

You should add two assertions to the unit tests to show that the scales are 
populated correctly for maps and base layers with and without a scales array. 
You will see that there are several cases to consider, depending on whether the 
scales array was set on the map or on the base layer or on both.

Regards,
Andreas.

On Oct 11, 2010, at 10:01 , Christian Mayer wrote:

> Hello list,
> 
> within a GeoExt project I used the ScaleStore due to the example at 
> http://api.geoext.org/1.0/examples/zoom-chooser.html.
> The problem is that some scales are not shown correctly in the scale chooser, 
> for example 1:49999 instead of 1:50000. Some recherche clarified that in the 
> populateFromMap() function in GeoExt.data.ScaleStore the scales are always 
> calculated with OpenLayers.Util.getScaleFromResolution(...), although they 
> are defined in this.map.scales.
> To fix this problem for my project I modified the ScaleStore.js (see attached 
> patch). Maybe this modification could be interesting for the general GeoExt 
> code base.
> 
> Thanks for any review.
> 
> Best regards,
> Chris
> 
> <scalestore-get-map-scale.patch>_______________________________________________
> Dev mailing list
> [email protected]
> http://www.geoext.org/cgi-bin/mailman/listinfo/dev



-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

_______________________________________________
Dev mailing list
[email protected]
http://www.geoext.org/cgi-bin/mailman/listinfo/dev

Reply via email to