[OpenLayers-Users] Changing the srs of a map
Eric Lemoine
eric.lemoine at camptocamp.com
Fri Feb 19 11:57:01 EST 2010
On Friday, February 19, 2010, Christopher Schmidt
<crschmidt at metacarta.com> wrote:
> On Fri, Feb 19, 2010 at 09:54:20AM +0100, Eric Lemoine wrote:
>> On Friday, February 19, 2010, Christopher Schmidt
>> <crschmidt at metacarta.com> wrote:
>> > On Thu, Feb 18, 2010 at 11:25:39PM +0100, Andreas Hocevar wrote:
>> >> Phil Scadden wrote:
>> >> > I am wanting to change the SRS of map "on the fly", (largely dependent
>> >> > on what imagery is selected am using as a backdrop). Can you just change
>> >> > it for an existing map or do you have to destroy the map and recreate
>> >> > with a the new srs?
>> >>
>> >> If your backdrop is a base layer, and configured with the right srs, the
>> >> map will automatically switch to the srs that is configured for the base
>> >> layer.
>> >
>> > Sort of. Vectors loaded statically won't reproject.
>>
>> + I think one needs to reconfigure the overlays, i.e. set the
>> projection, recalculate min/maxResolution, etc.
>
> Probably not any more. Most of the time, overlays will be alwaysInRange
> these days unless you have specific configurations for min/max scale,
> so overlays will always be on; in general, non-vector overlays just take
> their projection information from the base layer at draw time, so changing
> the base layer projection will cause the raster overlays to change projection
Right. But as you said min/maxResolution must be recalculated if
max/minScale is set in the layer config.
--
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
http://www.camptocamp.com
More information about the Users
mailing list