[OpenLayers-Users] Re: use sub-zoomlevels

Andreas Hocevar ahocevar at opengeo.org
Mon Nov 28 10:36:20 EST 2011


Hi,

this suggestion only works if you have configured your map with
fractionalZoom: true. And if you use OpenLayers trunk, this also works
for cached layers.

One academic caveat though: you know that 1:250000 will only be
1:250000 if your screen resolution is exactly 72dpi.

Andreas.

On Mon, Nov 28, 2011 at 4:05 PM, Sveen, Atle Frenvik (Geomatikk-IKT)
<Atle-Frenvik.Sveen at geomatikk-ikt.no> wrote:
> If you are using a WMS that is _not_ cached (or cached at 1:250 000) this is no problem). With WMS cached at other zoom levels or tilecaches (OSM/Google maps etc), it's more complocated (and you'll have to do some resampling of the tiles..)
>
> But, in the case of a (regular) WMS, you could try:
>
> map.zoomToScale(250000);
>
> -atle
> ________________________________________
> From: openlayers-users-bounces at lists.osgeo.org [openlayers-users-bounces at lists.osgeo.org] on behalf of Morper-Busch, Lucia [Lucia.Morper-Busch at sbg.ac.at]
> Sent: Monday, November 28, 2011 3:21 PM
> To: Andreas Hocevar; Jan Tappenbeck
> Cc: openlayers-users at lists.osgeo.org
> Subject: AW: [OpenLayers-Users] Re: use sub-zoomlevels
>
> Hello,
> is it possible with OpenLayers to zoom exactly to 1:250 000?
> Thank you
> Lucia
>
> Dipl.-Geogr. Lucia Morper-Busch | Researcher
> University of Salzburg | Centre for Geoinformatics - Z_GIS
> Schillerstr.30 | Techno-Z, Block 15, 3rd floor, Room 320 | 5020 Salzburg, Austria
> Phone +43 (0)662 8044 5298 | Fax +43 (0)662 8044 5260
>> Z_GIS...experts for the spatial view
>
>
> -----Ursprüngliche Nachricht-----
> Von: openlayers-users-bounces at lists.osgeo.org [mailto:openlayers-users-bounces at lists.osgeo.org] Im Auftrag von Andreas Hocevar
> Gesendet: Donnerstag, 24. November 2011 21:52
> An: Jan Tappenbeck
> Cc: openlayers-users at lists.osgeo.org
> Betreff: Re: [OpenLayers-Users] Re: use sub-zoomlevels
>
> On Thu, Nov 24, 2011 at 7:35 PM, Jan Tappenbeck <osm at tappenbeck.net> wrote:
>> Hi !
>>
>> the function is ok - but did i understand correct that openstreetmap
>> (mapnik) is a cached tile - so the funktion will not work ??
>
> If you are using a recent version of OpenLayers (from master on
> github), it will work, thanks to the new client zoom feature.
>
> Andreas.
>
>>
>> regards Jan :-)
>>
>>
>> Am 19.11.2011 22:10, schrieb Eric Lemoine:
>>>
>>>
>>> On Saturday, November 19, 2011, Jan Tappenbeck
>>> <osm at tappenbeck.net
>>> <mailto:osm at tappenbeck.net>> wrote:
>>>  >
>>>  >
>>>  >  hi !
>>>  >
>>>  > everybody used zoomlevels like 10,11,12,13,.....
>>>  >
>>>  > but is it possible to define / use subzoom-levels like 10.4, 11.3 ???
>>>  >
>>>  > regards Jan :-)
>>>
>>> Hi
>>>
>>> The map has a fractionalZoom option that you may want to look at.
>>>
>>>
>>>
>>> --
>>> Eric Lemoine
>>>
>>> Camptocamp France SAS
>>> Savoie Technolac, BP 352
>>> 73377 Le Bourget du Lac, Cedex
>>>
>>> Tel : 00 33 4 79 44 44 96
>>> Mail : eric.lemoine at camptocamp.com
>>> <mailto:eric.lemoine at camptocamp.com>
>>> http://www.camptocamp.com
>>>
>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>>
>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
> _______________________________________________
> Users mailing list
> Users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/openlayers-users
>



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


More information about the Users mailing list