[OpenLayers-Users] WMS Layer not supporting SRS parameters

ITBeyond David at ITBEYOND.COM.AU
Sun Mar 30 23:25:16 EDT 2008


Thanks Chris,

So if I am adding google maps and other maps using different projections and
then adding multiple WMS layers which may be in different projections how
does this work? My issue seems to only occur when I use isBaseLayer = false
(hence trying to output the WMS layer on top of a google or custom map). As
the OL code seems to ignore the projection parameter when isBaselayer =
false it defaults it to 4326 (which is not listed anyway in my code. If I
check the isBaselayer = true the URL has my projection in it. So in a nut
shell changing the isBaseLayer value seems to use or ignore the projection
parameter in my WMS layer is this correct?

David

 

Christopher Schmidt-4 wrote:
> 
> On Sun, Mar 30, 2008 at 07:40:49PM -0700, ITBeyond wrote:
>> 
>> I have been trying various options on this for ages when I set
>> isBaseLayer
>> true the projection is used in the WMS query (from the projection: option
>> and not the WMS params SRS), if I set isBaseLayer true the projection
>> function is ignored. The parameter SRS in the WMS params field never
>> seems
>> to work.
> 
> That is correct. OpenLayers takes the projection from the Map
> 'projection' parameter: 
> 
>  m = new OpenLayers.Map("map", {projection:"SRS:4283"});
>  m.addLayer(new OpenLayers.Layer.WMS(..., {isBaseLayer: false});
> 
> Regards,
> -- 
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://www.nabble.com/WMS-Layer-not-supporting-SRS-parameters-tp16349012p16391302.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list