Re: [OpenLayers-Users] Changing the srs of a map

2010-02-19 Thread Eric Lemoine
On Friday, February 19, 2010, Christopher Schmidt
 wrote:
> On Fri, Feb 19, 2010 at 09:54:20AM +0100, Eric Lemoine wrote:
>> On Friday, February 19, 2010, Christopher Schmidt
>>  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.lemo...@camptocamp.com
http://www.camptocamp.com
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Changing the srs of a map

2010-02-19 Thread Christopher Schmidt
On Fri, Feb 19, 2010 at 09:54:20AM +0100, Eric Lemoine wrote:
> On Friday, February 19, 2010, Christopher Schmidt
>  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
as well.

Regards,
-- 
Christopher Schmidt
MetaCarta
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Changing the srs of a map

2010-02-18 Thread Christopher Schmidt
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.

-- Chris

> Regards,
> Andreas.
> 
> > 
> > Notice: This email and any attachments are confidential. If received in 
> > error please destroy and immediately notify us. Do not copy or disclose the 
> > contents.
> > 
> > ___
> > Users mailing list
> > Users@openlayers.org
> > http://openlayers.org/mailman/listinfo/users
> 
> 
> -- 
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
> ___
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users

-- 
Christopher Schmidt
MetaCarta
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users


Re: [OpenLayers-Users] Changing the srs of a map

2010-02-18 Thread Andreas Hocevar
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.

Regards,
Andreas.

> 
> Notice: This email and any attachments are confidential. If received in error 
> please destroy and immediately notify us. Do not copy or disclose the 
> contents.
> 
> ___
> Users mailing list
> Users@openlayers.org
> http://openlayers.org/mailman/listinfo/users


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.
___
Users mailing list
Users@openlayers.org
http://openlayers.org/mailman/listinfo/users