[OpenLayers-Users] how do i append extra parameters to the outgoing WMS requests from OL client?

Mike Quentel mikequentel at yahoo.com
Fri May 11 13:51:40 EDT 2007


Thank you.  This example works:

var wmsLayer = new OpenLayers.Layer.WMS( "OpenLayers WMS", 
                      "http://labs.metacarta.com/wms/vmap0?", {layers: 'basic'});
 
wmsLayer.mergeNewParams({"beer": "good"});


Resulting output URL:

http://labs.metacarta.com/wms/vmap0?LAYERS=basic&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&FORMAT=image%2Fjpeg&BEER=good&SRS=EPSG%3A4326&BBOX=0%2C0%2C45%2C45&WIDTH=256&HEIGHT=256


----- Original Message ----
From: Bart van den Eijnden (OSGIS) <bartvde at osgis.nl>
To: Mike Quentel <mikequentel at yahoo.com>
Cc: OpenLayers Users <users at openlayers.org>
Sent: Friday, 11 May, 2007 10:44:08 AM
Subject: Re: [OpenLayers-Users] how do i append extra parameters to the outgoing WMS requests from OL client?

Use mergeNewParams on the layer.

Best regards,
Bart

Mike Quentel schreef:
> I'd like to add some extra parameters to the URLs created in the WMS requests from OL client.  What is the easiest way to append new, custom params?
>
> Thank you.
>
> Mike Quentel
>
>
>
>
>
>       ___________________________________________________________ 
> Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
> your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html 
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>
>
>   


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl






		
___________________________________________________________ 
To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre. http://uk.security.yahoo.com



More information about the Users mailing list