[OpenLayers-Users] Limit-Zoomlevel-Problem

Arnd Wippermann arnd.wippermann at web.de
Thu Aug 16 22:56:29 PDT 2012


for the baselayer should the resolutions be known.
 
if baselayer = map.layers[0]
 
map.layers[0].resolutions.length
map.layers[0].resolutions[10]
map.layers[0].resolutions[14]
 
this should work.
 
Arnd
 
  _____  

Von: openlayers-users-bounces at lists.osgeo.org
[mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Jan
Tappenbeck
Gesendet: Donnerstag, 16. August 2012 16:04
An: users at openlayers.org
Betreff: [OpenLayers-Users] Limit-Zoomlevel-Problem


hi !

in german osm-forum [1] we discuss about the limit the zoomlevels and the
result is:


// resulutions wird einmal irgendwo am Anfang definiert.



var resolutions =       [156543.03390625, 78271.516953125, 39135.7584765625,

                               19567.87923828125, 9783.939619140625,
4891.9698095703125,

                               2445.9849047851562, 1222.9924523925781,
611.4962261962891,

                               305.74811309814453, 152.87405654907226,
76.43702827453613,

                               38.218514137268066, 19.109257068634033,
9.554628534317017,

                               4.777314267158508, 2.388657133579254,
1.194328566789627,

                               0.5971642833948135];



// später



 var hkts = new OpenLayers.Layer.Vector("hkts", {

                 baselayer:  false,

                 maxResolution: resolutions[10],           

                 minResolution:  resolutions[14],           

                ... 

      });



but my question now is - is it really required to define resolutions by the
real value or is there a possibillity to define max / minresoltion directly
by the zoomlevel?



regards Jan :-) 

[1] 



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120817/a22b9e08/attachment.html>


More information about the Users mailing list