[OpenLayers-Users] GetCapabilities

Andreas Hocevar ahocevar at opengeo.org
Tue Jul 28 11:13:03 EDT 2009


Raul David Orozco wrote:
> Hi. I'm trying to make a GetCapabilities request to a server, using a
> couple of examples that I found in OpenLayers documentation.
>
> In the first case I tried something like this:
>
> var url = map.getFullRequestString({
>         REQUEST: "Getcapabilities"},
>                 "http://192.168.1.5:9090/smms/wms.php"); //URL of the
> server
>  OpenLayers.loadURL(url, '', this, setHTML);
>

getFullRequestString is a method of the layer, not the map.

>
> but I get a error message saying that function getFullRequestString
> doesn't exists.
>
> In my second try, I used this code:
> this.request = OpenLayers.Request.GET({
>     url: "http://192.168.1.5:9090/smms/wms.php",
>     success: function(response)
>  {
>         var XMLformat = new OpenLayers.Format.XML();
>         xml = XMLformat.read(response.responseText);
>         
>         var CAPformat = new OpenLayers.Format.WMSCapabilities();
>         capabilities = CAPformat.read(xml);
>         
>         window.console.log(capabilities);
>     }
> });
>
> But I get the error related to the proxy:
>
> Access to restricted URI denied"  code: "1012"
>

See http://docs.openlayers.org/library/request.html, especially the note
about proxy.

Regards,
Andreas.

>
> Now I'm out of ideas, I don't know how to capture the GetCapabilities request. 
> Thanks for any help, I'll appreciate it.
>
>
>
> ------------------------------------------------------------------------
>
> ¡Obtén la mejor experiencia en la web!
> Descarga gratis el nuevo Internet Explorer 8
> http://downloads.yahoo.com/ieak8/?l=e1
> ------------------------------------------------------------------------
>
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
>   


-- 
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.




More information about the Users mailing list