[OpenLayers-Users] OpenLayers.Control.GetFeature with diffrent
layers (typenames) and different servers
Bart van den Eijnden
bartvde at osgis.nl
Thu Jul 8 06:55:26 EDT 2010
No sorry this is not possible. Maybe multiple controls will work as a work-around.
Best regards,
Bart
On Jul 8, 2010, at 12:50 PM, Esben Taudorf wrote:
> Hi everybody.
>
> I have been using the OpenLayers.Control.WMSGetFeatureInfo with a drill-down to get featureinfo from diffrent layers on different servers.
> The control which worked fine, was configured like this:
>
> var control = new OpenLayers.Control.WMSGetFeatureInfo(
> {
> url: 'server1',
> layerUrls: ['server2'],
> layers: [Layer1_on_server1, Layer2_on_server1, Layer1_on_server2, Layer2_on_server2],
> title: 'Get Feature Info',
> queryVisible: true,
> drillDown: true,
> infoFormat: 'application/vnd.ogc.gml',
> eventListeners:
> {
> getfeatureinfo: function(event) { handleGetFeatureInfo(event); }
> }
> });
>
>
> But one of the services, that I am using, have suddenly stopped supporting WMS GetFeatureInfo request. So now I have to use their WFS service to get featureinfo.
>
> My question is then can I use the OpenLayers.Control.GetFeature to get featureinfo from diffrent layers (typenames) and different servers?
>
> Below is my code that works with two layers (typenames) on the same server:
>
> var WFScontrol = new OpenLayers.Control.GetFeature({
> protocol:
> OpenLayers.Protocol.WFS({
> readFormat: new OpenLayers.Format.GML(),
> formatOptions: {
> outputFormat: "application/vnd.ogc.gml"
> },
> featureType: ['pdk:theme_pdk_lokalplan_vedtaget_v', 'pdk:theme_pdk_lokalplandelomraade_vedtaget_v'],
> url: 'http://wfs.plansystem.dk/geoserver/wfs?',
> version: '1.0.0',
> geometryName: ['geometri'],
> srsName: 'EPSG:25832'
> }),
> click: true,
> box: true
> });
>
> Is it possible to get the GetFeature control to work like the WMSGetFeatureInfo?
>
> Any help or comment would be appreciated.
>
> Regards Esben
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100708/e9ee2375/attachment.html
More information about the Users
mailing list