[OpenLayers-Users] Unsetting request parameters
jdb@mail.nerc-essc.ac.uk
jdb at mail.nerc-essc.ac.uk
Tue Jul 25 02:32:06 CDT 2006
Hi Erik,
Thanks, but I'm afraid this doesn't work - I get the following request string:
...&CRS=CRS:84&PROJECTION=none&SRS=EPSG:4326&BBOX=...
I tried setting "projection: null" as well but this produced:
...&CRS=CRS:84&SRS=EPSG:4326&BBOX=...
as before.
Cheers, Jon
Quoting Erik Uzureau <euzuro at gmail.com>:
> Hi Jon,
>
> If you are using the svn HEAD version,
> the way to disable the svn parameter is by setting
> the option "projection" to "none"
> ...
>
> ie:
>
> OpenLayers.Layer.WMS1_3.prototype =
> Object.extend( new OpenLayers.Layer.WMS(), {
>
> DEFAULT_PARAMS: { service: "WMS",
> version: "1.3.0",
> request: "GetMap",
> styles: "",
> exceptions: "INIMAGE",
> format: "image/png",
> crs: "CRS:84",
> projection: "none"
> },
>
>
> let me know if that works out alright for you... :-)
> erik
>
> On 7/24/06, Jon Blower <jdb at mail.nerc-essc.ac.uk> wrote:
>> Hi all,
>>
>> I've created a very simple Layer type for Web Map Servers using version
>> 1.3.0. This is very similar to the existing WMS layer type, which is for
>> WMS1.1.1. My code for the WMS1.3 layer looks like this:
>>
>> OpenLayers.Layer.WMS1_3 = Class.create();
>> OpenLayers.Layer.WMS1_3.prototype =
>> Object.extend( new OpenLayers.Layer.WMS(), {
>>
>> DEFAULT_PARAMS: { service: "WMS",
>> version: "1.3.0",
>> request: "GetMap",
>> styles: "",
>> exceptions: "INIMAGE",
>> format: "image/png",
>> crs: "CRS:84"
>> },
>>
>> CLASS_NAME: "OpenLayers.Layer.WMS1_3"
>> });
>>
>> This works fine, but there's a minor bug. Note that the coordinate
>> reference systems is now specified by the "CRS" parameter, not the "SRS"
>> parameter that is used in WMS1.1.1. The URLs that are generated for the
>> call to the GetMap function look like this:
>>
>> &SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&STYLES=&EXCEPTIONS=INIMAGE
>> &FORMAT=image/png&CRS=CRS:84&SRS=EPSG:4326&BBOX=...
>>
>> Note that the "CRS" and "SRS" parameters both appear in the URL. This
>> doesn't really matter because the "SRS" parameter is ignored by WMS1.3
>> servers. However, for the sake of neatness, is there a way of "unsetting"
>> the SRS parameter so that it doesn't appear in the URL? I tried setting
>> "SRS: null" in the DEFAULT_PARAMS section of the above code but that didn't
>> seem to work.
>>
>> Thanks in advance,
>> Jon
>>
>>
>> --------------------------------------------------------------
>> Dr Jon Blower Tel: +44 118 378 5213 (direct line)
>> Technical Director Tel: +44 118 378 8741 (ESSC)
>> Reading e-Science Centre Fax: +44 118 378 6413
>> ESSC Email: jdb at mail.nerc-essc.ac.uk
>> University of Reading
>> 3 Earley Gate
>> Reading RG6 6AL, UK
>> --------------------------------------------------------------
>>
>>
>> _______________________________________________
>> Users mailing list
>> Users at openlayers.org
>> http://mailman-viper.python-hosting.com/listinfo/users
>>
>
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
----- End forwarded message -----
----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.
More information about the Users
mailing list