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) <[email protected]> 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: [email protected] > [[email protected]] on behalf of Morper-Busch, Lucia > [[email protected]] > Sent: Monday, November 28, 2011 3:21 PM > To: Andreas Hocevar; Jan Tappenbeck > Cc: [email protected] > 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: [email protected] > [mailto:[email protected]] Im Auftrag von Andreas > Hocevar > Gesendet: Donnerstag, 24. November 2011 21:52 > An: Jan Tappenbeck > Cc: [email protected] > Betreff: Re: [OpenLayers-Users] Re: use sub-zoomlevels > > On Thu, Nov 24, 2011 at 7:35 PM, Jan Tappenbeck <[email protected]> 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 >>> <[email protected] >>> <mailto:[email protected]>> 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 : [email protected] >>> <mailto:[email protected]> >>> http://www.camptocamp.com >>> >>> >>> >>> _______________________________________________ >>> Users mailing list >>> [email protected] >>> http://lists.osgeo.org/mailman/listinfo/openlayers-users >> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.osgeo.org/mailman/listinfo/openlayers-users >> > > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > _______________________________________________ > Users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-users > _______________________________________________ > Users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-users > -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
