[OpenLayers-Users] Several URL's in my getFeatureInfo

Juan Jesús Cremades Monserrat relicary at gmail.com
Tue Jan 31 06:43:01 EST 2012


Hi,

I have created one OpenLayer script with several layers. One of this layers
comes from a remote Map Server. Now, I have achieve show all the layers,
but when I try obtain information from the remote layer, the function do
not returns anything.

Exists some meaning to read two or more url's at the same time? Thanks

My code is like this,

var RemoteLayer =
   new OpenLayers.Layer.WMS("Remote",
              "http://ovc.catastro.meh.es/Cartografia/WMS/ServidorWMS.aspx
?",
              {layers : 'Catastro',
                                               format : 'image/png',
                         transparent : true},
             {isBaseLayer : false,
              singleTile:true,
             ratio: 1});

...

info = new OpenLayers.Control.WMSGetFeatureInfo({
                  url : '/cgi-bin/mapserv.exe',
  title : 'Info',
  layers : [ LocalLayer1, LocalLayer2, RemoteLayer],
queryVisible : true,
vendorParams : {map : 'mapfile'},
eventListeners : {'getfeatureinfo' : function(event) {
     if(event.text!="")
     {
 var popup = new OpenLayers.Popup.FramedCloud("Datos",
    map.getLonLatFromPixel(event.xy),
 null,
 event.text,
 null,
 true);

popup.autoSize = true;

map.addPopup(popup, true);
}
}
}});
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120131/d024d6de/attachment-0001.html


More information about the Users mailing list