[OpenLayers-Users] zoomToScale(); free extent

Eric Lemoine eric.c2c at gmail.com
Sat Jan 26 08:48:03 EST 2008


On Jan 26, 2008 11:08 AM, Maik Finsterbusch <mfinsterbusch at codematix.de> wrote:
> hi out there,
>
> i want to get a specific scale (eg. 1:2000), so i call zoomToScale(2000);
> but openlayers finds only its scale (or extent) list, because  of its
> numberofzoomlevels automaticly calculated scales (or extent).
>
> thats damn, because i must have 1:2000;
>
> anyway out there?

You can set the list of scales you want and make sure this 1:2000
scale is included in the list. Use the 'scales' map option for that.
Check this wiki page
<http://trac.openlayers.org/wiki/SettingZoomLevels> to understand how
you can configure zoom levels in OpenLayers.

Hope this helps,
--
Eric



More information about the Users mailing list