[OpenLayers-Users] What is the easiest way to grab the URL string being sent to a WMS server?

Jon Blower jdb at mail.nerc-essc.ac.uk
Tue Feb 6 16:53:21 EST 2007


Hi,

Yet another suggestion (which might not be quite what you want) is to
use the getURL(bounds) method:

var my_wms = new OpenLayers.Layer.WMS(...);
...
alert(my_wms.getURL(new OpenLayers.Bounds(...)));

This will use the BBOX specified by the Bounds object that you pass in
but will preserve all the other parameters of the URL.

HTH,
Jon

On 2/6/07, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> On Tue, Feb 06, 2007 at 05:16:22PM +0000, Mike Quentel wrote:
> > For debug purposes, I would like to be able to examine
> > the URL string that OpenLayers is sending to a WMS
> > server.  What is the easiest way to examine this?  Not
> > sure what method of what class in the API would return
> > this string.  Thank you.
>
> This depends what you want to do with it.
>
> Grid layers have a grid property, which contains an array of an array of
> tiles. These tiles each have a 'url' object, which is the URL of the
> requested tile.
>
> If you just want to determine a single URL, you can right click on an
> image in the interface, and 'copy image URL' or similar in whatever
> other browser you care about. Firebug or other debugging tools may make
> this process easier for many-layer situations.
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>



-- 
--------------------------------------------------------------
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
--------------------------------------------------------------



More information about the Users mailing list