[Users] WMSCapabilitesStore with proxy

Eric Lemoine eric.lemoine at camptocamp.com
Mon Mar 15 17:07:11 CET 2010


On Mon, Mar 15, 2010 at 5:02 PM, Alexandre Dube <adube at mapgears.com> wrote:
> Eric,
>
> Eric Lemoine wrote:
>>
>> Hi Alexandre. In a store the proxy is the object through which the
>> data is retrieved. For example one uses an HttpProxy to retrieve data
>> with Ajax. By default a WMSCapabilitiesStore uses an HttpProxy
>> configured with the provided url. I'm not sure I'm answering the
>> question though
>>
>
> Thanks for the answer.
>
> My problem is that when I use an external server (other than 127.0.0.1) it
> doesn't work (no request is sent at all if I look at the Console tag in
> Firebug).  Loading from my local WMS server works (same layer, same
> mapfile).
>
> My guess was it had something to proxy stuff, I'm pretty much clueless from
> there...
>
> The store is created with :
>
>       var url = Ext.getCmp('wms_url').value;
>
>       if(!url) {
>           alert(OpenLayers.i18n('Please, enter an url in the textbox
> above'));
>           return;
>       }
>
>       var params =
> OpenLayers.Util.getParameterString(this.capabilitiesParams);
>  url = OpenLayers.Util.urlAppend(url, params);
>
>       this.WMSCapabilitiesStore =
>           new GeoExt.data.WMSCapabilitiesStore({'url': url});
>       this.WMSCapabilitiesStore.load();
>
> Do you see anything obvious ?

Aren't you just facing the Same Origin Policy issue when sending a
GetCaps request to a remote WMS?



-- 
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.lemoine at camptocamp.com
http://www.camptocamp.com


More information about the Users mailing list