[Users] WMSCapabilities loading in a tree problem
geographika
geographika at gmail.com
Sun Apr 10 21:01:31 CEST 2011
Hi,
This is due to the same origin policy in browsers that means you can't
access data from a URL on a different server.
You can set up a proxy, or you can use a technique described here -
http://geographika.co.uk/accessing-cross-domain-data-with-yql
Regards,
Seth
--
web:http://geographika.co.uk
twitter: @geographika
On 01/04/2011 13:47, Sukuchha Shrestha wrote:
> Dear all,
>
> I want your help in solving this issue of populating WMS capabilities
> in a Tree in GeoEXT. I want to populate a WMS layers name in a
> tree.There is an example about it in
> http://api.geoext.org/1.0/examples/wms-tree.html.
>
> var root = new Ext.tree.AsyncTreeNode({
> text: 'GeoServer Demo WMS',
> loader: new GeoExt.tree.WMSCapabilitiesLoader({
> url: 'capabilities.xml',
> autoload:true,
> layerOptions: {buffer: 0, singleTile: true, ratio: 1},
> layerParams: {'TRANSPARENT': 'TRUE'},
> // customize the createNode method to add a checkbox to nodes
> createNode: function(attr) {
> attr.checked = attr.leaf ? false : undefined;
> return
> GeoExt.tree.WMSCapabilitiesLoader.prototype.createNode.apply(this,
> [attr]);
> }
> })
> });
>
> I have a capabilites XML in a local folder. I set the relative path
> but nothing happens? When i see in firebug, it is firing with options
> without with GET and hence no XML is read ! I tried with absoulute
> path as well for one of the website
> (http://www.lv-bw.de/dv/capabilities.xml) but no avail.
>
> Even in the examples in geoext.org if i change url of
> data(wmscap.xml): to absoulute URL
> http://api.geoext.org/1.0/examples/data/wmscap.xml, layers are not
> loaded in the tree. i scramble a bit in the mail list, and saw some
> people were talking about this type of problem and were saying it
> might be due to some proxy stuff. But i still dont have a clear clue,
> why this is not working?
>
> Any input would be greatly appreciated.
>
> Regards
> Sukuchha
>
>
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.geoext.org/pipermail/users/attachments/20110410/d594a0af/attachment.htm
More information about the Users
mailing list