[OpenLayers-Users] WMSGetFeatureInfo eventListener resolving dependencies
Hi All, I have a WMS layer with a popup control for feature info: var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo( { url: http://localhost/geoserver/wms;, hover:false, maxFeatures:5, layers: [wmsLayer], queryVisible: true, eventListeners: { getfeatureinfo: function(event) { if(event.text){ //add openlayers popup window map.addPopup(new OpenLayers.Popup.FramedCloud( geoserver_info, map.getLonLatFromPixel(event.xy), null, event.text, null, true ) ); } } } }, { radius: 50} ); map.addControl(featureInfo); featureInfo.activate(); Which works fine with the full build of Openlayers.js. However, it stops working when using a custom lite build of Openlayers, the response from feature info request is there but the popup window dosn't show up. Obviously I have missed some classes in building Openlayers.js but I could not figure out whats needed as there is no error message on firebug. My build config is as follows: [first] OpenLayers/SingleFile.js OpenLayers.js OpenLayers/BaseTypes.js OpenLayers/BaseTypes/Class.js OpenLayers/Util.js Rico/Corner.js OpenLayers/Console.js [last] [include] OpenLayers/Bounds.js OpenLayers/Map.js OpenLayers/Layer/WMS.js OpenLayers/Ajax.js OpenLayers/Events.js OpenLayers/Layer.js OpenLayers/Layer/Grid.js OpenLayers/Layer/HTTPRequest.js OpenLayers/Layer/WMS.js OpenLayers/Layer/WMS/Untiled.js OpenLayers/Tile.js OpenLayers/Tile/Image.js OpenLayers/Popup.js OpenLayers/Popup/Anchored.js OpenLayers/Popup/Framed.js OpenLayers/Popup/FramedCloud.js OpenLayers/Control.js OpenLayers/Control/Navigation.js OpenLayers/Control/MousePosition.js OpenLayers/Control/LayerSwitcher.js OpenLayers/Control/PanZoom.js OpenLayers/Control/ArgParser.js OpenLayers/Control/Attribution.js OpenLayers/Control/Scale.js OpenLayers/Control/WMSGetFeatureInfo.js OpenLayers/Format.js OpenLayers/Format/XML.js OpenLayers/Format/WMSGetFeatureInfo.js OpenLayers/Request.js OpenLayers/Request/XMLHttpRequest.js OpenLayers/Events.js OpenLayers/Handler.js OpenLayers/Handler/Click.js OpenLayers/Handler/Hover.js Anybody knows the dependencies for the WMSGetFeatureInfo popup and the class of the eventListeners ? Thanks, Sige -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMSGetFeatureInfo-eventListener-resolving-dependencies-tp5459621p5459621.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo eventListener resolving dependencies
On Wednesday, August 25, 2010, Sige sig...@yahoo.co.nz wrote: Hi All, I have a WMS layer with a popup control for feature info: var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo( { url: http://localhost/geoserver/wms;, hover:false, maxFeatures:5, layers: [wmsLayer], queryVisible: true, eventListeners: { getfeatureinfo: function(event) { if(event.text){ //add openlayers popup window map.addPopup(new OpenLayers.Popup.FramedCloud( geoserver_info, map.getLonLatFromPixel(event.xy), null, event.text, null, true ) ); } } } }, { radius: 50} ); map.addControl(featureInfo); featureInfo.activate(); Which works fine with the full build of Openlayers.js. However, it stops working when using a custom lite build of Openlayers, the response from feature info request is there but the popup window dosn't show up. Obviously I have missed some classes in building Openlayers.js but I could not figure out whats needed as there is no error message on firebug. My build config is as follows: [first] OpenLayers/SingleFile.js OpenLayers.js OpenLayers/BaseTypes.js OpenLayers/BaseTypes/Class.js OpenLayers/Util.js Rico/Corner.js OpenLayers/Console.js [last] [include] OpenLayers/Bounds.js OpenLayers/Map.js OpenLayers/Layer/WMS.js OpenLayers/Ajax.js OpenLayers/Events.js OpenLayers/Layer.js OpenLayers/Layer/Grid.js OpenLayers/Layer/HTTPRequest.js OpenLayers/Layer/WMS.js OpenLayers/Layer/WMS/Untiled.js OpenLayers/Tile.js OpenLayers/Tile/Image.js OpenLayers/Popup.js OpenLayers/Popup/Anchored.js OpenLayers/Popup/Framed.js OpenLayers/Popup/FramedCloud.js OpenLayers/Control.js OpenLayers/Control/Navigation.js OpenLayers/Control/MousePosition.js OpenLayers/Control/LayerSwitcher.js OpenLayers/Control/PanZoom.js OpenLayers/Control/ArgParser.js OpenLayers/Control/Attribution.js OpenLayers/Control/Scale.js OpenLayers/Control/WMSGetFeatureInfo.js OpenLayers/Format.js OpenLayers/Format/XML.js OpenLayers/Format/WMSGetFeatureInfo.js OpenLayers/Request.js OpenLayers/Request/XMLHttpRequest.js OpenLayers/Events.js OpenLayers/Handler.js OpenLayers/Handler/Click.js OpenLayers/Handler/Hover.js Anybody knows the dependencies for the WMSGetFeatureInfo popup and the class of the eventListeners ? you probably need to include OpenLayers/Format/GML.js, but I'm not sure this is your problem since you aren't seeing errors in the FB console. -- 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.lemo...@camptocamp.com http://www.camptocamp.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] wmsGetFeatureInfo with Mapserver
Hi, I am trying to get the Feature Info - PopUp example (http://dev.openlayers.org/releases/OpenLayers-2.9.1/examples/getfeatureinfo-popup.html) working, but I am encountering some problems with it. When i click on the map nothing happens. I tried to search for the problem with firebug, but i cant find anything. As you can see in the following code i was just changing the url: info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://localhost/cgi-bin/mapserv?map=/Library/WebServer/Documents/webmap/mapfiles/gorjanci.map', title: 'Identify features by clicking', queryVisible: true, eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( chicken, map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } }); map.addControl(info); info.activate(); So I thought maybe the mapfile is the problem. But I dont know why, because a manual request works perfect. Here is a part of my mapfile: LAYER NAMEvsa_imena STATUSON TRANSPARENCY100 TYPEPOINT DATAnamen_point.shp LABELITEMTextString MAXSCALEDENOM51000 MINSCALEDENOM2000 TOLERANCE100 TOLERANCEUNITSpixels METADATA WMS_TITLEvsa ledinska imena WMS_SRSepsg:31258 WMS_INCLUDE_ITEMSall END #METADATA PROJECTION init=epsg:31258 END #PROJECTION CLASS NAMEvsa_imena TEMPLATE /Library/WebServer/Documents/webmap/templates/content.html STYLE COLOR0 0 0 END #STYLE #Beschriftung LABEL TYPETRUETYPE ANTIALIASTRUE ENCODINGUTF-8 FONTcalibri_a COLOR0 0 0 OUTLINECOLOR255 255 255 #BUFFER4 #OUTLINEWIDTH5 POSITIONcc SIZE12 ANGLE[Angle] END#LABEL END #CLASS END #LAYER I think I have done everything right and cant find nothing wrong. I would appreciate any help! Cheers, Benjamin ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] WMSGetFeatureInfo
Hi All I'm so Sorry if the my question will be trivial but a tried to find some thing in the mail list archive but it doesn't work! I'm very new bie in OpenLayers and I have a problem with WMSGetFeatureInfo. With GeoExt I try to use the control in order to get some information about WMS Services and display it in a Cloud: var popup; //Feture info info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://160.97.133.1:8080/geoserver/wms', title: 'Identify features by clicking', queryVisible: true, eventListeners: { getfeatureinfo: function(evento) { mymap.addPopup(new OpenLayers.Popup.FramedCloud( chicken, mymap.getLonLatFromPixel(evento.xy), null, evento.text, null, true )); } } }); mymap.addControl(info); info.activate(); Where a click in the map, the call crash because no default Style is defined in the Service called I use Geoserver and all style are defined for each services deployed. With firebug I cached the GetFeatureInfo request: http://160.97.133.1:8080/geoserver/wms?service=WMSversion=1.1.0request=GetFeatureInfolayers=IIA%3Ait_province,IIA%3Ait_comuniquery_layers=IIA%3Ait_province,IIA%3Ait_comunistyles=undefined,undefinedbbox=-1167350.587686%2C4784467.947295%2C3827350.587686%2C5415532.052705srs=EPSG%3A900913feature_count=10x=482y=84height=129width=1021info_format=text%2Fhtml and the response is: ?xml version=1.0 encoding=UTF-8 standalone=no?!DOCTYPE ServiceExceptionReport SYSTEM http://schemas.opengis.net/wms/1.1.1/WMS_exception_1_1_1.dtd; ServiceExceptionReport version=1.1.1ServiceException code=StyleNotDefined No default style has been defined for IIA:it_province /ServiceException/ServiceExceptionReport In the request the style is undefined.. this is very strange because I thing that that style must setted to null. some think like Stile=... and not undefined. In the OpenLayer examples coming in the downloaded package, the reguest is without any style and the systems works. Any suggestions How can I get the request string without Style undefined? -- Ing. Francesco D'Amore blog: www.marinajonica.org linkedin: http://www.linkedin.com/in/francescodamore Consiglio Nazionale delle Ricerche - Istituto di Inquinamento Atmosferico (IIA) Ph. D. Student at University of Calabria - DEIS ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo
On Tuesday, March 23, 2010, Francesco D'Amore francesco.dam...@gmail.com wrote: Hi All I'm so Sorry if the my question will be trivial but a tried to find some thing in the mail list archive but it doesn't work! I'm very new bie in OpenLayers and I have a problem with WMSGetFeatureInfo. With GeoExt I try to use the control in order to get some information about WMS Services and display it in a Cloud: var popup; //Feture info info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://160.97.133.1:8080/geoserver/wms', title: 'Identify features by clicking', queryVisible: true, eventListeners: { getfeatureinfo: function(evento) { mymap.addPopup(new OpenLayers.Popup.FramedCloud( chicken, mymap.getLonLatFromPixel(evento.xy), null, evento.text, null, true )); } } }); mymap.addControl(info); info.activate(); Where a click in the map, the call crash because no default Style is defined in the Service called I use Geoserver and all style are defined for each services deployed. With firebug I cached the GetFeatureInfo request: http://160.97.133.1:8080/geoserver/wms?service=WMSversion=1.1.0request=GetFeatureInfolayers=IIA%3Ait_province,IIA%3Ait_comuniquery_layers=IIA%3Ait_province,IIA%3Ait_comunistyles=undefined,undefinedbbox=-1167350.587686%2C4784467.947295%2C3827350.587686%2C5415532.052705srs=EPSG%3A900913feature_count=10x=482y=84height=129width=1021info_format=text%2Fhtml and the response is: ?xml version=1.0 encoding=UTF-8 standalone=no?!DOCTYPE ServiceExceptionReport SYSTEM http://schemas.opengis.net/wms/1.1.1/WMS_exception_1_1_1.dtd; ServiceExceptionReport version=1.1.1 ServiceException code=StyleNotDefined No default style has been defined for IIA:it_province /ServiceException/ServiceExceptionReport In the request the style is undefined.. this is very strange because I thing that that style must setted to null. some think like Stile=... and not undefined. In the OpenLayer examples coming in the downloaded package, the reguest is without any style and the systems works. Any suggestions How can I get the request string without Style undefined? Hi. It sounds to me that this is a problem with your GeoServer configuration. Make sure you set a default style for your featuretype. Cheers, -- 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.lemo...@camptocamp.com http://www.camptocamp.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo, missing geometry type ‘box’
Hi, can you try with trunk, IIRC this has been fixed. Best regards, Bart On Feb 13, 2010, at 7:23 PM, Stefanie Weykam wrote: Hi again, My problem still continues but I have been able to trace down the error … Seems that OpenLayers actually tries to parse the data – I got as far as to the parseFeature function in Format/GML.js. Here, the geometry type is read (‘Box’) and then the parseGeometry function is called. This is where the trouble starts since ‘box’ is missing here and thus not recognized as a valid geometry… I can hardly believe that I am the only one here struggling with MapServer GetFeatureInfo responses in GML format. Is there any workaround? By the way, I am not really interested in the geometry itself, what matters is the attribute. Thanks for any advice 12.1.1020:WMSGetFeatureInfo not working as expected with msGMLoutput Hi list members, I have a problem with my Mapserver WMS server and the OpenLayers.Control.WMSGetFeatureInfo. According to wmsOptions.params.info_format in the WMSGetFeatureInfo.js request function is 'application/vnd.ogc.gml' (this is what I want) In the WMSGetFeatureInfo.js handleResponse function request.responseXML is null and request.responseText contains the data (see below). Is this the normal behaviour? ?xml version=1.0 encoding=ISO-8859-1? msGMLOutput xmlns:gml=http://www.opengis.net/gml; xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; geo_sardina_layer geo_sardina_feature gml:boundedBy gml:Box srsName=EPSG:4326 gml:coordinates-5.13,43.58 -5.13,43.58/gml:coordinates /gml:Box /gml:boundedBy nombre_estacion50/nombre_estacion latitud43.58/latitud longitud-5.13/longitud abundancia_sardina0.854413312/abundancia_sardina /geo_sardina_feature /geo_sardina_layer /msGMLOutput I then get an error message saying “Geometry Type not supported: Box” How do I get my GML response parsed correctly? Related Software: OpenLayers 2.8 Firefox 3.5.7 on Windows with Firebug UMN Mapserver 5.2.1 as WMS Server ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] WMSGetFeatureInfo, missing geometry type ‘box’
Hi again, My problem still continues but I have been able to trace down the error … Seems that OpenLayers actually tries to parse the data – I got as far as to the parseFeature function in Format/GML.js. Here, the geometry type is read (‘Box’) and then the parseGeometry function is called. This is where the trouble starts since ‘box’ is missing here and thus not recognized as a valid geometry… I can hardly believe that I am the only one here struggling with MapServer GetFeatureInfo responses in GML format. Is there any workaround? By the way, I am not really interested in the geometry itself, what matters is the attribute. Thanks for any advice 12.1.1020:WMSGetFeatureInfo not working as expected with msGMLoutput Hi list members, I have a problem with my Mapserver WMS server and the OpenLayers.Control.WMSGetFeatureInfo. According to wmsOptions.params.info_format in the WMSGetFeatureInfo.js request function is 'application/vnd.ogc.gml' (this is what I want) In the WMSGetFeatureInfo.js handleResponse function request.responseXML is null and request.responseText contains the data (see below). Is this the normal behaviour? ?xml version=1.0 encoding=ISO-8859-1? msGMLOutput xmlns:gml=http://www.opengis.net/gml; xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; geo_sardina_layer geo_sardina_feature gml:boundedBy gml:Box srsName=EPSG:4326 gml:coordinates-5.13,43.58 -5.13,43.58/gml:coordinates /gml:Box /gml:boundedBy nombre_estacion50/nombre_estacion latitud43.58/latitud longitud-5.13/longitud abundancia_sardina0.854413312/abundancia_sardina /geo_sardina_feature /geo_sardina_layer /msGMLOutput I then get an error message saying “Geometry Type not supported: Box” How do I get my GML response parsed correctly? Related Software: OpenLayers 2.8 Firefox 3.5.7 on Windows with Firebug UMN Mapserver 5.2.1 as WMS Server ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] WMSGetFeatureInfo not working as expected with msGMLoutput
Hi list members, I have a problem with my Mapserver WMS server and the OpenLayers.Control.WMSGetFeatureInfo. According to wmsOptions.params.info_format in the WMSGetFeatureInfo.js request function is 'application/vnd.ogc.gml' (this is what I want) In the WMSGetFeatureInfo.js handleResponse function request.responseXML is null and request.responseText contains the data (see below). Is this the normal behaviour? ?xml version=1.0 encoding=ISO-8859-1? msGMLOutput xmlns:gml=http://www.opengis.net/gml; xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; geo_sardina_layer geo_sardina_feature gml:boundedBy gml:Box srsName=EPSG:4326 gml:coordinates-5.13,43.58 -5.13,43.58/gml:coordinates /gml:Box /gml:boundedBy nombre_estacion50/nombre_estacion latitud43.58/latitud longitud-5.13/longitud abundancia_sardina0.854413312/abundancia_sardina /geo_sardina_feature /geo_sardina_layer /msGMLOutput I then get an error message saying “Geometry Type not supported: Box” How do I get my GML response parsed correctly? Related Software: OpenLayers 2.8 Firefox 3.5.7 on Windows with Firebug UMN Mapserver 5.2.1 as WMS Server ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] WMSGetFeatureInfo - speed of 'text/html' vs 'application/vnd.ogc.gml'
Hi group. I was just wondering, why is the speed between 'text/html' and 'application/vnd.ogc.gml' infoFormat so different? If I select text/html and click on an area, it takes about 1 second to return. If I select application/vnd.ogc.gml and click on an area, it takes about 20 second to return. About +- 10 features is selected. Is there something that i can do to speed up the application/vnd.ogc.gml? Regards, Herman ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo: find out layer names
Hi Frank, the feature.type property has the name of the layer. Best regards, Bart On Jan 5, 2010, at 11:22 AM, Frank Broniewski wrote: Hello list, I am using the WMSGetFeatureInfo function for querying my WMS layers. Works like a charm. In my map I have the possibility to query more than one layer for information. And now I search for a solution to find out for what layer the response was returned. Looking at the returned result from Firebug I can see that the common structure for the response is msGMLOutput and the next node child contains the layer name with the extension _layer. How can I access this node? Right now I use the following approach to work with the reponse: var reader = new OpenLayers.Format.WMSGetFeatureInfo(); var features = reader.read(response.text); Does the read_msGMLOutput give me more options to work with the returned XML? Or do I need to convert the response to an OpenLayers.Format.XML first? Many thanks Frank Frank Broniewski Metrico s.àr.l. ( http://www.metrico.lu ) 36, rue des Romains L-5433 Niederdonven Luxembourg Fon: +352 26 74 94 28 Fax: +352 26 74 94 99 ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] WMSGetFeatureInfo: find out layer names
Hello list, I am using the WMSGetFeatureInfo function for querying my WMS layers. Works like a charm. In my map I have the possibility to query more than one layer for information. And now I search for a solution to find out for what layer the response was returned. Looking at the returned result from Firebug I can see that the common structure for the response is msGMLOutput and the next node child contains the layer name with the extension _layer. How can I access this node? Right now I use the following approach to work with the reponse: var reader = new OpenLayers.Format.WMSGetFeatureInfo(); var features = reader.read(response.text); Does the read_msGMLOutput give me more options to work with the returned XML? Or do I need to convert the response to an OpenLayers.Format.XML first? Many thanks Frank Frank Broniewski Metrico s.àr.l. ( http://www.metrico.lu ) 36, rue des Romains L-5433 Niederdonven Luxembourg Fon: +352 26 74 94 28 Fax: +352 26 74 94 99 ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] WMSGetFeatureInfo Format - get bounds
Hi list, I'm using Format.WMSGetFeatureInfo.read_msGMLOutput() for getFeatureInfo requests. In the response, I can see the bbox of the feature returned [1]. That would be enough to be able to recenter on the feature. The only problem is : vector features created from read_msGMLOutput don't have the bound read from [1] (it remains 'null'). Is there a way to accomplish this with the trunk version of OL ? Anyone already accomplished this ? Any hints ? Thanks a lot, Alexandre [1] |gml:boundedBy || gml:Box srsName=EPSG:32198 ||gml:coordinates-189513.106700,493755.024100 -185697.319000,495686.861800/gml:coordinates || /gml:Box ||/gml:boundedBy | -- Alexandre Dubé Mapgears www.mapgears.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format - get bounds
Hi Alexandre, so you only have the boundedBy element and not the actual geometry in the output? If so, I don't think this is currently possible, can you please file an enhancement bug in Trac? The parsing of the geometry was added in: http://trac.openlayers.org/changeset/9178 Best regards, Bart Hi list, I'm using Format.WMSGetFeatureInfo.read_msGMLOutput() for getFeatureInfo requests. In the response, I can see the bbox of the feature returned [1]. That would be enough to be able to recenter on the feature. The only problem is : vector features created from read_msGMLOutput don't have the bound read from [1] (it remains 'null'). Is there a way to accomplish this with the trunk version of OL ? Anyone already accomplished this ? Any hints ? Thanks a lot, Alexandre [1] |gml:boundedBy || gml:Box srsName=EPSG:32198 ||gml:coordinates-189513.106700,493755.024100 -185697.319000,495686.861800/gml:coordinates || /gml:Box ||/gml:boundedBy | -- Alexandre Dubé Mapgears www.mapgears.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format - get bounds
Hi Bart, bart...@osgis.nl wrote: Hi Alexandre, so you only have the boundedBy element and not the actual geometry in the output? Yep, no geom is needed for my case. The bbox is enough. If so, I don't think this is currently possible, can you please file an enhancement bug in Trac? Done : http://trac.openlayers.org/ticket/2329 Many thanks, -- Alexandre Dubé Mapgears www.mapgears.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format - get bounds
On Thursday, October 29, 2009, Alexandre Dube ad...@mapgears.com wrote: Hi Bart, bart...@osgis.nl wrote: Hi Alexandre, so you only have the boundedBy element and not the actual geometry in the output? Yep, no geom is needed for my case. The bbox is enough. If so, I don't think this is currently possible, can you please file an enhancement bug in Trac? Done : http://trac.openlayers.org/ticket/2329 Hi. I think there already is a ticket for this. IIRC we had some discussion about this a while ago, it was initiated by François Vanderbiest. I'm interested in discussing this again. Sorry I can't look up the ticket and the discussion at the moment. Cheers, -- 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.lemo...@camptocamp.com http://www.camptocamp.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format - get bounds
Eric, are you referring to: http://trac.openlayers.org/ticket/2255 ? I think that's a different issue since it deals with the new GML parser, while the GetFeatureInfo format uses the old GML parser. Best regards, Bart Eric Lemoine wrote: On Thursday, October 29, 2009, Alexandre Dube ad...@mapgears.com wrote: Hi Bart, bart...@osgis.nl wrote: Hi Alexandre, so you only have the boundedBy element and not the actual geometry in the output? Yep, no geom is needed for my case. The bbox is enough. If so, I don't think this is currently possible, can you please file an enhancement bug in Trac? Done : http://trac.openlayers.org/ticket/2329 Hi. I think there already is a ticket for this. IIRC we had some discussion about this a while ago, it was initiated by François Vanderbiest. I'm interested in discussing this again. Sorry I can't look up the ticket and the discussion at the moment. Cheers, -- Bart van den Eijnden OSGIS, Open Source GIS bart...@osgis.nl http://www.osgis.nl ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format - get bounds
On Thursday, October 29, 2009, Bart van den Eijnden (OSGIS) bart...@osgis.nl wrote: Eric, are you referring to: http://trac.openlayers.org/ticket/2255 ? I think that's a different issue since it deals with the new GML parser, while the GetFeatureInfo format uses the old GML parser. you're right. Yet, the discussion on what strategy to use for features w/o geometries but w/ bounds should still apply. Cheers, -- 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.lemo...@camptocamp.com http://www.camptocamp.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo not firing
Hi, the one advice I can give you is: ask on the list or on irc before you struggle for two days. This time, the answer would have been simple: either do as you discovered, or set the vendorParams option of the WMS GetFeatureInfo control (http://dev.openlayers.org/releases/OpenLayers-2.8/doc/devdocs/files/OpenLayers/Control/WMSGetFeatureInfo-js.html#OpenLayers.Control.WMSGetFeatureInfo.vendorParams) Regards, Andreas. P Kishor wrote: On Sat, Sep 19, 2009 at 7:47 PM, P Kishor punk.k...@gmail.com wrote: I have a bizarre problem that I can't debug. My code is var info = new OpenLayers.Control.WMSGetFeatureInfo({ url: http://localhost/cgi-bin/mapserv?map=/path/to/my.map;, maxFeatures: 12, title: 'Identify features by clicking', queryVisible: true, layers: [wms_cds_stands], infoFormat: text/plain, eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( ... ), true); } } }); map.addControl(info); info.activate(); If I change the url to http://localhost/cgi-bin/mapserv; it fires correctly on click, and a framed cloud pops up with the error message that CGI variable map is not declared. However, if I add the map variable to the query string as shown above, then the event doesn't fire on click at all. There is no proxy nor remote host involved. Everything is on localhost. Doesn't matter if the url starts with http://localhost/cgi-bin//mapserv; or just /cgi-bin//mapserv, it is the presence of the url query string that seems to cause the click event to not fire at all. What could I do to correct this? So, after two days of struggling with this, I figured it out. Turns out, my layer was defined like so... var wms_cds_stands = new OpenLayers.Layer.WMS( CDS Stands, http://localhost/cgi-bin/mapserv;, { map: /path/to/my.map, layers : cds_stands, map_imagetype: agga, transparent: true }, { reproject: true, singleTile: true } ); and my WMSGetFeatureInfo control had url set like so url: http://localhost/cgi-bin/mapserv?map=/Users/punkish/Data/cnnf/cnnf.map; Well, the urlMatches() function in WMSGetFeatureInfo class was causing my control to fail. The url for my layer definition did not have the map parameter attached as a query string. Instead, it was provided as a separate parameter in the params hash supplied to the object constructor. However, the control constructor does not provide a similar facility to supply the map value separately. I changed my mapserver url in the layer constructor to http://localhost/cgi-bin/mapserv?map=/Users/punkish/Data/cnnf/cnnf.map; and now since urlMatches() returns true for the two urls, the click event fires and I get a popup bubble. Once again, I ask, was there a more efficient and obvious way for me to discover this? OpenLayers is an absolutely fantastic piece of work which is severely hampered by its documentation, UNLESS, there is a strategy to discovering how it works that I am completely missing. I am determined to using OL and making it a showcase in my work, so I can also evangelize it to others as a replacement for Google or Yahoo maps. But, right now, either its documentation, or the way I am going about it, is tripping me up severely. Any advice from you more seasoned folks is very welcome. -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] WMSGetFeatureInfo not firing
I have a bizarre problem that I can't debug. My code is var info = new OpenLayers.Control.WMSGetFeatureInfo({ url: http://localhost/cgi-bin/mapserv?map=/path/to/my.map;, maxFeatures: 12, title: 'Identify features by clicking', queryVisible: true, layers: [wms_cds_stands], infoFormat: text/plain, eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( ... ), true); } } }); map.addControl(info); info.activate(); If I change the url to http://localhost/cgi-bin/mapserv; it fires correctly on click, and a framed cloud pops up with the error message that CGI variable map is not declared. However, if I add the map variable to the query string as shown above, then the event doesn't fire on click at all. There is no proxy nor remote host involved. Everything is on localhost. Doesn't matter if the url starts with http://localhost/cgi-bin//mapserv; or just /cgi-bin//mapserv, it is the presence of the url query string that seems to cause the click event to not fire at all. What could I do to correct this? -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu --- Assertions are politics; backing up assertions with evidence is science === Sent from Madison, WI, United States ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo not firing
On Sat, Sep 19, 2009 at 7:47 PM, P Kishor punk.k...@gmail.com wrote: I have a bizarre problem that I can't debug. My code is var info = new OpenLayers.Control.WMSGetFeatureInfo({ url: http://localhost/cgi-bin/mapserv?map=/path/to/my.map;, maxFeatures: 12, title: 'Identify features by clicking', queryVisible: true, layers: [wms_cds_stands], infoFormat: text/plain, eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( ... ), true); } } }); map.addControl(info); info.activate(); If I change the url to http://localhost/cgi-bin/mapserv; it fires correctly on click, and a framed cloud pops up with the error message that CGI variable map is not declared. However, if I add the map variable to the query string as shown above, then the event doesn't fire on click at all. There is no proxy nor remote host involved. Everything is on localhost. Doesn't matter if the url starts with http://localhost/cgi-bin//mapserv; or just /cgi-bin//mapserv, it is the presence of the url query string that seems to cause the click event to not fire at all. What could I do to correct this? So, after two days of struggling with this, I figured it out. Turns out, my layer was defined like so... var wms_cds_stands = new OpenLayers.Layer.WMS( CDS Stands, http://localhost/cgi-bin/mapserv;, { map: /path/to/my.map, layers : cds_stands, map_imagetype: agga, transparent: true }, { reproject: true, singleTile: true } ); and my WMSGetFeatureInfo control had url set like so url: http://localhost/cgi-bin/mapserv?map=/Users/punkish/Data/cnnf/cnnf.map; Well, the urlMatches() function in WMSGetFeatureInfo class was causing my control to fail. The url for my layer definition did not have the map parameter attached as a query string. Instead, it was provided as a separate parameter in the params hash supplied to the object constructor. However, the control constructor does not provide a similar facility to supply the map value separately. I changed my mapserver url in the layer constructor to http://localhost/cgi-bin/mapserv?map=/Users/punkish/Data/cnnf/cnnf.map; and now since urlMatches() returns true for the two urls, the click event fires and I get a popup bubble. Once again, I ask, was there a more efficient and obvious way for me to discover this? OpenLayers is an absolutely fantastic piece of work which is severely hampered by its documentation, UNLESS, there is a strategy to discovering how it works that I am completely missing. I am determined to using OL and making it a showcase in my work, so I can also evangelize it to others as a replacement for Google or Yahoo maps. But, right now, either its documentation, or the way I am going about it, is tripping me up severely. Any advice from you more seasoned folks is very welcome. -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu --- Assertions are politics; backing up assertions with evidence is science === Sent from Madison, WI, United States ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] WMSGetFeatureInfo and proxy
Hi, I'm using WMSGetFeatureInfo to query a specific layer. The information is retrieved from the same server/domain where the application and mapserver are installed. The answer I get is The requested URL /cgi-bin/proxy.cgi was not found on this server. I read this http://faq.openlayers.org/proxyhost/all/ and I already set a proxy on another server for another project. But in this case my understanding was that I don't need a proxy since I'm not querying a remote server. I can't see why my code is requesting /cgi-bin/proxy. It should call directly cgi-bin/mapserver? isn'it? Here is my code infoControls = { click: new OpenLayers.Control.WMSGetFeatureInfo({ //url: 'http://IP address/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante_hlm.map', maxFeatures: 12, title: 'Identify features by clicking', layers: [overlays['HLM']], queryVisible: true, infoFormat:'text/html' }) } infoControls['click'].events.register(getfeatureinfo, this, showInfo); map.addControl(infoControls['click']); infoControls['click'].activate(); If I uncomment the url parameter I got the same result. What could be the reason why it is looking for a proxy? This line IS NOT in my code OpenLayers.ProxyHost = /cgi-bin/proxy.cgi?url=; thanks Steve ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo and proxy
On Fri, Sep 18, 2009 at 09:27:15AM -0400, steve.tout...@inspq.qc.ca wrote: Hi, I'm using WMSGetFeatureInfo to query a specific layer. The information is retrieved from the same server/domain where the application and mapserver are installed. The answer I get is The requested URL /cgi-bin/proxy.cgi was not found on this server. I read this http://faq.openlayers.org/proxyhost/all/ and I already set a proxy on another server for another project. But in this case my understanding was that I don't need a proxy since I'm not querying a remote server. I can't see why my code is requesting /cgi-bin/proxy. It should call directly cgi-bin/mapserver? isn'it? Here is my code infoControls = { click: new OpenLayers.Control.WMSGetFeatureInfo({ //url: 'http://IP address/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante_hlm.map', maxFeatures: 12, title: 'Identify features by clicking', layers: [overlays['HLM']], queryVisible: true, infoFormat:'text/html' }) } infoControls['click'].events.register(getfeatureinfo, this, showInfo); map.addControl(infoControls['click']); infoControls['click'].activate(); If I uncomment the url parameter I got the same result. What could be the reason why it is looking for a proxy? This line IS NOT in my code OpenLayers.ProxyHost = /cgi-bin/proxy.cgi?url=; If you type OpenLayers.ProxyHost into Firebug or some other debugging tool, what does it tell you? -- Chris thanks Steve ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo and proxy
firebug found OpenLayers.ProxyHost into example.js That is a script from mapfish used for the print widget example. Just removed it and now it is working with or without specifying the url in the parameters list of WMSGetFeatureInfo. Thanks for your help, Steve Steve Toutant, M. Sc. Analyste en géomatique Secteur environnement Direction des risques biologiques, environnementaux et occupationnels Institut national de santé publique du Québec 945, avenue Wolfe Québec, Qc G1V 5B3 Tél.: (418) 650-5115 #5281 Fax.: (418) 654-3144 steve.tout...@inspq.qc.ca http://www.inspq.qc.ca Christopher Schmidt crschm...@metacarta.com@openlayers.org Envoyé par : users-boun...@openlayers.org 18/09/2009 10:05 AM A steve.tout...@inspq.qc.ca cc users@openlayers.org Objet Re: [OpenLayers-Users] WMSGetFeatureInfo and proxy On Fri, Sep 18, 2009 at 09:27:15AM -0400, steve.tout...@inspq.qc.ca wrote: Hi, I'm using WMSGetFeatureInfo to query a specific layer. The information is retrieved from the same server/domain where the application and mapserver are installed. The answer I get is The requested URL /cgi-bin/proxy.cgi was not found on this server. I read this http://faq.openlayers.org/proxyhost/all/ and I already set a proxy on another server for another project. But in this case my understanding was that I don't need a proxy since I'm not querying a remote server. I can't see why my code is requesting /cgi-bin/proxy. It should call directly cgi-bin/mapserver? isn'it? Here is my code infoControls = { click: new OpenLayers.Control.WMSGetFeatureInfo({ //url: 'http://IP address/cgi-bin/mapserv.exe?map=/ms4w/paccSante/map/paccsante_hlm.map', maxFeatures: 12, title: 'Identify features by clicking', layers: [overlays['HLM']], queryVisible: true, infoFormat:'text/html' }) } infoControls['click'].events.register(getfeatureinfo, this, showInfo); map.addControl(infoControls['click']); infoControls['click'].activate(); If I uncomment the url parameter I got the same result. What could be the reason why it is looking for a proxy? This line IS NOT in my code OpenLayers.ProxyHost = /cgi-bin/proxy.cgi?url=; If you type OpenLayers.ProxyHost into Firebug or some other debugging tool, what does it tell you? -- Chris thanks Steve ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Christopher Schmidt MetaCarta ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo with IE
Very strange. I have been investigating in the OpenLayers code and I have seen that the wms petition for the same point generate two diferent url. For FireFox respond with data and for IExplorer 7 not. The unique diference between both is the bbox. I dont understand anything. FF: http://192.168.11.159:8090/geoserver/wms?service=WMSversion=1.1.0request=GetFeatureInfolayers=osmius%3Ausuarios_instancias,osmius%3Ausuarios_serviciosquery_layers=osmius%3Ausuarios_instancias,osmius%3Ausuarios_serviciosstyles=,bbox=-403214.87876%2C4928941.87%2C-393278.065085%2C4934387.582751srs=EPSG%3A900913feature_count=10x=520y=283height=570width=1040info_format=application%2Fvnd.ogc.gmlcql_filter=IDN_USER%3D'ROOThttp://192.168.11.159:8090/geoserver/wms?service=WMSversion=1.1.0request=GetFeatureInfolayers=osmius%3Ausuarios_instancias,osmius%3Ausuarios_serviciosquery_layers=osmius%3Ausuarios_instancias,osmius%3Ausuarios_serviciosstyles=,bbox=-403214.87876%2C4928941.87%2C-393278.065085%2C4934387.582751srs=EPSG%3A900913feature_count=10x=520y=283height=570width=1040info_format=application%2Fvnd.ogc.gmlcql_filter=IDN_USER%3D%27ROOT ' IE: http://192.168.11.159:8090/geoserver/wms?service=WMSversion=1.1.0request=GetFeatureInfolayers=osmius%3Ausuarios_instancias,osmius%3Ausuarios_serviciosquery_layers=osmius%3Ausuarios_instancias,osmius%3Ausuarios_serviciosstyles=,bbox=-403195.769503%2C4928941.87%2C-393297.174342%2C4934387.582751srs=EPSG%3A900913feature_count=10x=504y=283height=570width=1036info_format=application%2Fvnd.ogc.gmlcql_filter=IDN_USER%3D'ROOThttp://192.168.11.159:8090/geoserver/wms?service=WMSversion=1.1.0request=GetFeatureInfolayers=osmius%3Ausuarios_instancias,osmius%3Ausuarios_serviciosquery_layers=osmius%3Ausuarios_instancias,osmius%3Ausuarios_serviciosstyles=,bbox=-403195.769503%2C4928941.87%2C-393297.174342%2C4934387.582751srs=EPSG%3A900913feature_count=10x=504y=283height=570width=1036info_format=application%2Fvnd.ogc.gmlcql_filter=IDN_USER%3D%27ROOT ' 2009/9/3 Micho Gar micho...@gmail.com Here the control creation and activation in the init ... infoControls = { clickInstance: new OpenLayers.Control.WMSGetFeatureInfo({ url: context + '/geoserver/wms', title: 'Identifica las features por click', infoFormat: 'application/vnd.ogc.gml', layers: [Instancias,Servicios], queryVisible: true, vendorParams:{ cql_filter: IDN_USER=' + user + '} }) }; map.addLayers([Instancias,Servicios,MapnikLayer,OSMLayer]); infoControls['clickInstance'].events.register(getfeatureinfo, this, getObject); map.addControl(infoControls['clickInstance']); infoControls['clickInstance'].activate(); map.addControl(new OpenLayers.Control.Navigation()); map.addControl(new OpenLayers.Control.PanPanel()); map.addControl(new OpenLayers.Control.ZoomPanel()); var layerSwitcher = new OpenLayers.Control.LayerSwitcher(); layerSwitcher.activeColor='#E3F6CE'; map.addControl(layerSwitcher); map.addControl(new OpenLayers.Control.Scale); map.addControl(new OpenLayers.Control.MousePosition); ... and here the method is execute by control function getObject(evt){ /* * */ g = new OpenLayers.Format.WMSGetFeatureInfo(); var features = g.read(evt.text); if (features.length==0) return; if (features.length1){ if (repeats(features)==false){ alert(msgOverObject); return; } } var idFeature=features[0].attributes['IDN_INSTANCE']; if (idFeature!=null){ xyInfo = evt.xy; idObject=idFeature; var _url = context + /geoserver/wfs?VERSION=1.1.0SERVICE=WFSREQUEST=GetFeatureTYPENAME=instancias_informacionFilter=FilterPropertyIsEqualToPropertyNameIDN_INSTANCE/PropertyNameLiteral + idFeature + /Literal/PropertyIsEqualTo/Filter; OpenLayers.loadURL(_url, , null, showInstanceInfo, isError); }else{ var idService=features[0].attributes['IDN_SERVICE']; xyInfo= (new OpenLayers.LonLat(features[0].geometry.x,features[0].geometry.y)).transform(proj4326,proj900913); idObject=idService; var _url = context + /geoserver/wfs?VERSION=1.1.0SERVICE=WFSREQUEST=GetFeatureTYPENAME=usuarios_instanciasFilter=FilterAndPropertyIsEqualToPropertyNameIDN_SERVICE/PropertyNameLiteral + idService + /Literal/PropertyIsEqualToPropertyIsEqualToPropertyNameIDN_USER/PropertyNameLiteral + user + /Literal/PropertyIsEqualTo/And/Filter; OpenLayers.loadURL(_url, , null, showServiceInstance, isError); } } the evt param in the getObject method is empty in IE. Thanks to all. 2009/9/2 Eric Lemoine eric.lemo...@camptocamp.com On Wed, Sep 2, 2009 at 7:13 PM, Micho Garmicho...@gmail.com wrote: Hi all, I have a code to realise a GetFeatureInfo and runs well on Firefox but not
Re: [OpenLayers-Users] WMSGetFeatureInfo doesnt seem to work
I think Andreas meant { layers: 'topp:Studentenwohnheime', transparent: 'true', format: 'image/gif' } ,{srs: 'EPSG:31467'} See the constructor parameters http://dev.openlayers.org/apidocs/files/OpenLayers/Layer/WMS-js.html#OpenLayers.Layer.WMS.OpenLayers.Layer.WMS Also, you can try putting this line map.addLayers([wms, studiwohn]); after the var info statement. For some reason it worked for me but I have no explanation. I'd like to know why. Also, do you use mapserver? do you have a template key define in your layers? Steve Steve Toutant, M. Sc. Analyste en géomatique Secteur environnement Direction des risques biologiques, environnementaux et occupationnels Institut national de santé publique du Québec 945, avenue Wolfe Québec, Qc G1V 5B3 Tél.: (418) 650-5115 #5281 Fax.: (418) 654-3144 steve.tout...@inspq.qc.ca http://www.inspq.qc.ca Dominik Wiedner dominikwied...@web.de@openlayers.org Envoyé par : users-boun...@openlayers.org 03/09/2009 12:19 PM A users@openlayers.org cc Objet Re: [OpenLayers-Users] WMSGetFeatureInfo doesnt seem to work Hi Andreas, So in what part of my code would this definition have to be made? Kind regards, Dominik -- View this message in context: http://n2.nabble.com/WMSGetFeatureInfo-doesnt-seem-to-work-tp3561729p3574372.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo with IE
On Wed, Sep 2, 2009 at 7:13 PM, Micho Garmicho...@gmail.com wrote: Hi all, I have a code to realise a GetFeatureInfo and runs well on Firefox but not return any result in IE. Reading the documentation I have not seen nothing about this. I think it work the same for both. Something about this?? Some code to show the list? -- 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.lemo...@camptocamp.com http://www.camptocamp.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo doesnt seem to work
Hi, just a guess: try specifying the srs as projection property in the layer option, not as (commented out) srs property in the layer params. Regards, Andreas. Dominik Wiedner wrote: Hi guys, Currently I try to find my way in to OpenLayers. The problem, I'm currently facing, is that this code: function load () { var map = new OpenLayers.Map('map'); var wms = new OpenLayers.Layer.WMS( OpenLayers WMS, http://labs.metacarta.com/wms/vmap0;, { layers: 'basic', //srs: 'EPSG:31467', format: 'image/gif' } ); var studiwohn = new OpenLayers.Layer.WMS( Studentenwohnheime , http://localhost:8080/geoserver/wms;, { layers: 'topp:Studentenwohnheime', //srs: 'EPSG:31467', transparent: 'true', format: 'image/gif' } ); map.addLayers([wms, studiwohn]); map.zoomToMaxExtent(); var info = new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://localhost:8080/geoserver/wms', title: 'Identify features by clicking', queryVisible: true, eventListeners: { getfeatureinfo: function(event) { map.addPopup(new OpenLayers.Popup.FramedCloud( chicken, map.getLonLatFromPixel(event.xy), null, event.text, null, true )); } } }); map.addControl(info); info.activate(); map.addControl(new OpenLayers.Control.LayerSwitcher()); } doesn't work very well, when I click on one of my features in the Layer Studentenwohnheime, i can see that a query is submitted to the server, but no result is being sent back. Kind regards, Dominik -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo - page not found-message
Thanks for the answer. After some more testing and reading I've fond that I need a ProxyHost as described in http://faq.openlayers.org/proxyhost/ /Per S -- View this message in context: http://n2.nabble.com/WMSGetFeatureInfo---page-not-found-message-tp3230272p3236161.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] WMSGetFeatureInfo - page not found-message
When I use WMSGetFeatureInfo I get a page not found message (HTTP 404) from IIS, but when I paste the Url params below in the address field of a browser (Firefox or IE) a get a correct response. Part of the code (coming from Open Layers Feature Info Example): var infoControls = { click: new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://pc00013:8080/geoserver/wms', title: 'Identify features by clicking', layers: [dp_polygoner], queryVisible: true }), ... Some info from Firebug: Url params: http://pc00013:8080/geoserver/wms?service=WMSversion=1.1.0request=GetFeatureInfolayers=Kba%3Adetaljplaner query_layers=Kba%3Adetaljplanerstyles=bbox=158948.95%2C6357669.1%2C163988.95%2C6359701.1srs=EPSG %3A3007feature_count=10x=447y=107height=508width=1260info_format=text%2Fhtml Response Headers: Server Microsoft-IIS/5.1 DateThu, 09 Jul 2009 07:16:06 GMT Connection close Content-Length 4072 Content-Typetext/html Request Headers: Hostpc00013 User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language sv-se,sv;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding gzip,deflate Accept-Charset UTF-8,* Keep-Alive 300 Connection keep-alive Referer http://pc00013/openlayers/openlayers_gs.html Any ideas? /Per S -- View this message in context: http://n2.nabble.com/WMSGetFeatureInfo---page-not-found-message-tp3230272p3230272.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo - page not found-message
from: http://docs.openlayers.org/library/request.html In general, all communication initiated by OpenLayers.Request methods is restricted to the same origin policy: requests may only be issued with the same protocol, to the same domain, and through the same port as the document the code is running from. you're trying a different port. On Thu, Jul 9, 2009 at 1:41 AM, Per Sper.soderst...@kungsbacka.se wrote: When I use WMSGetFeatureInfo I get a page not found message (HTTP 404) from IIS, but when I paste the Url params below in the address field of a browser (Firefox or IE) a get a correct response. Part of the code (coming from Open Layers Feature Info Example): var infoControls = { click: new OpenLayers.Control.WMSGetFeatureInfo({ url: 'http://pc00013:8080/geoserver/wms', title: 'Identify features by clicking', layers: [dp_polygoner], queryVisible: true }), ... Some info from Firebug: Url params: http://pc00013:8080/geoserver/wms?service=WMSversion=1.1.0request=GetFeatureInfolayers=Kba%3Adetaljplaner query_layers=Kba%3Adetaljplanerstyles=bbox=158948.95%2C6357669.1%2C163988.95%2C6359701.1srs=EPSG %3A3007feature_count=10x=447y=107height=508width=1260info_format=text%2Fhtml Response Headers: Server Microsoft-IIS/5.1 Date Thu, 09 Jul 2009 07:16:06 GMT Connection close Content-Length 4072 Content-Type text/html Request Headers: Host pc00013 User-Agent Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.9.0.4) Gecko/2008102920 Firefox/3.0.4 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language sv-se,sv;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding gzip,deflate Accept-Charset UTF-8,* Keep-Alive 300 Connection keep-alive Referer http://pc00013/openlayers/openlayers_gs.html Any ideas? /Per S -- View this message in context: http://n2.nabble.com/WMSGetFeatureInfo---page-not-found-message-tp3230272p3230272.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo not working as expected with ESRI ArcGIS server
On Tue, Jun 9, 2009 at 3:56 PM, Linde Ackermansroselinda.ackerm...@ec.europa.eu wrote: Sorry, please ignore. This question was meant for the MapFish mailing list. The problems are in the their control which has exactly the same name Which control? WMSGetFeatureInfo comes from OpenLayers. Cheers, -- Eric ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo not working as expected with ESRI ArcGIS server
Yes, sorry again, total confusion here. It is indeed an openlayers control. Nevertheless, it fails to work correctly with ArcGIS server Rgrds, Linde Eric Lemoine-2-2 wrote: On Tue, Jun 9, 2009 at 3:56 PM, Linde Ackermansroselinda.ackerm...@ec.europa.eu wrote: Sorry, please ignore. This question was meant for the MapFish mailing list. The problems are in the their control which has exactly the same name Which control? WMSGetFeatureInfo comes from OpenLayers. Cheers, -- Eric ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- View this message in context: http://n2.nabble.com/WMSGetFeatureInfo-not-working-as-expected-with-ESRI-ArcGIS-server-tp3042742p3060809.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo not working as expected with ESRI ArcGIS server
Sorry, please ignore. This question was meant for the MapFish mailing list. The problems are in the their control which has exactly the same name -- View this message in context: http://n2.nabble.com/WMSGetFeatureInfo-not-working-as-expected-with-ESRI-ArcGIS-server-tp3042742p3049540.html Sent from the OpenLayers Users mailing list archive at Nabble.com. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format
Hi Andreas, Here's the ticket: http://trac.openlayers.org/ticket/2002 Sorry it took so long. Regards, Alexandre Andreas Hocevar wrote: Hi Alexandre, if you can create a ticket with this patch and set it to Review, I'd be willing to commit this since it does not break any unit tests. It would be good if you could add a test in your patch to show the problem. Thanks! Andreas. -- Alexandre Dubé Mapgears www.mapgears.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format
On Mon, Mar 23, 2009 at 01:53:05PM -0400, Alexandre Dube wrote: Andreas Hocevar wrote: Alexandre, it seems we don't have a CLA from you or Mapgears yet. Is this correct? If so, please follow the instructions on http://trac.openlayers.org/wiki/HowToContribute Thanks! Andreas. Daniel took care of that this morning. Confirmed; MapGears is now on the CLA list, thanks. -- Christopher Schmidt MetaCarta ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format
Thanks Alexandre, your patch is already committed! Regards, Andreas. On Mon, Mar 23, 2009 at 6:52 PM, Alexandre Dube ad...@mapgears.com wrote: Hi Andreas, Here's the ticket: http://trac.openlayers.org/ticket/2002 Sorry it took so long. Regards, Alexandre Andreas Hocevar wrote: Hi Alexandre, if you can create a ticket with this patch and set it to Review, I'd be willing to commit this since it does not break any unit tests. It would be good if you could add a test in your patch to show the problem. Thanks! Andreas. -- Alexandre Dubé Mapgears www.mapgears.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format
Hi Alexandre, if you can create a ticket with this patch and set it to Review, I'd be willing to commit this since it does not break any unit tests. It would be good if you could add a test in your patch to show the problem. Thanks! Andreas. On Wed, Mar 4, 2009 at 2:13 PM, Alexandre Dube ad...@mapgears.com wrote: We found out what was not working for us. I've prepared a patch that solved the problem. Could anyone confirm that there is a bug in the original version, please ? Kind regards, Alexandre Alexandre Dube wrote: Hi users, I'm having a hard time using the WMSGetFeatureInfo format. Instead of explaining, below's snippet (1). Because I currently can't have a response from my server since I have problems with HTTPS and proxy, I load a xml (see attached) instead ( it's a msGMLOutput XML from MapServer ). I get an empty features array. Any clue what I'm doing wrong ? (1) /*-snippet-*/ showResult: function(response){ var oFeatures; var oFormat = new OpenLayers.Format.WMSGetFeatureInfo(); if(!response){ var xmlDoc=document.implementation.createDocument(,,null); xmlDoc.async=false; xmlDoc.load(response.xml); oFeatures = oFormat.read_msGMLOutput(xmlDoc); } else { oFeatures = oFormat.read_msGMLOutput(response.responseXML || response.responseText); } ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Alexandre Dubé Mapgears www.mapgears.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format
Alexandre, it seems we don't have a CLA from you or Mapgears yet. Is this correct? If so, please follow the instructions on http://trac.openlayers.org/wiki/HowToContribute Thanks! Andreas. On Wed, Mar 4, 2009 at 2:13 PM, Alexandre Dube ad...@mapgears.com wrote: We found out what was not working for us. I've prepared a patch that solved the problem. Could anyone confirm that there is a bug in the original version, please ? Kind regards, Alexandre Alexandre Dube wrote: Hi users, I'm having a hard time using the WMSGetFeatureInfo format. Instead of explaining, below's snippet (1). Because I currently can't have a response from my server since I have problems with HTTPS and proxy, I load a xml (see attached) instead ( it's a msGMLOutput XML from MapServer ). I get an empty features array. Any clue what I'm doing wrong ? (1) /*-snippet-*/ showResult: function(response){ var oFeatures; var oFormat = new OpenLayers.Format.WMSGetFeatureInfo(); if(!response){ var xmlDoc=document.implementation.createDocument(,,null); xmlDoc.async=false; xmlDoc.load(response.xml); oFeatures = oFormat.read_msGMLOutput(xmlDoc); } else { oFeatures = oFormat.read_msGMLOutput(response.responseXML || response.responseText); } ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Alexandre Dubé Mapgears www.mapgears.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Andreas Hocevar OpenGeo - http://opengeo.org/ Expert service straight from the developers. ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format
Andreas, I'll take care of this and the patch during the following days. Thanks to you for your interests, Alexandre Andreas Hocevar wrote: Alexandre, it seems we don't have a CLA from you or Mapgears yet. Is this correct? If so, please follow the instructions on http://trac.openlayers.org/wiki/HowToContribute Thanks! Andreas. -- Alexandre Dubé Mapgears www.mapgears.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format
We found out what was not working for us. I've prepared a patch that solved the problem. Could anyone confirm that there is a bug in the original version, please ? Kind regards, Alexandre Alexandre Dube wrote: Hi users, I'm having a hard time using the WMSGetFeatureInfo format. Instead of explaining, below's snippet (1). Because I currently can't have a response from my server since I have problems with HTTPS and proxy, I load a xml (see attached) instead ( it's a msGMLOutput XML from MapServer ). I get an empty features array. Any clue what I'm doing wrong ? (1) /*-snippet-*/ showResult: function(response){ var oFeatures; var oFormat = new OpenLayers.Format.WMSGetFeatureInfo(); if(!response){ var xmlDoc=document.implementation.createDocument(,,null); xmlDoc.async=false; xmlDoc.load(response.xml); oFeatures = oFormat.read_msGMLOutput(xmlDoc); } else { oFeatures = oFormat.read_msGMLOutput(response.responseXML || response.responseText); } ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users -- Alexandre Dubé Mapgears www.mapgears.com Index: WMSGetFeatureInfo.js === --- WMSGetFeatureInfo.js (revision 8947) +++ WMSGetFeatureInfo.js (working copy) @@ -177,27 +177,27 @@ if (node node.hasChildNodes()) { children = node.childNodes; n = children.length; -child = children[0]; -while (child child.nodeType != 1) { -child = child.nextSibling; -} -tagName = (child ? child.nodeName : ''); -if (tagName.length 0 tagName.indexOf(criteria) -1) { -for (var i = 0; i n; i++) { -child = children[i]; -if (child.nodeType == 1) { -nodes.push(child); -} + +for(var k=0; kn; k++){ +child = children[k]; +while (child child.nodeType != 1) { +child = child.nextSibling; +k++; } -} -else { -for (var i = 0; i n; i++) { +tagName = (child ? child.nodeName : ''); +if (tagName.length 0 tagName.indexOf(criteria) -1) { +nodes.push(child); +} else { matchNodes = this.getSiblingNodesByTagCriteria( -children[i], criteria); -(nodes.length == 0) ? -nodes = matchNodes : nodes.push(matchNodes); +child, criteria); + +if(matchNodes.length 0){ +(nodes.length == 0) ? +nodes = matchNodes : nodes.push(matchNodes); +} } } + } return nodes; }, ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
[OpenLayers-Users] WMSGetFeatureInfo Format
Hi users, I'm having a hard time using the WMSGetFeatureInfo format. Instead of explaining, below's snippet (1). Because I currently can't have a response from my server since I have problems with HTTPS and proxy, I load a xml (see attached) instead ( it's a msGMLOutput XML from MapServer ). I get an empty features array. Any clue what I'm doing wrong ? (1) /*-snippet-*/ showResult: function(response){ var oFeatures; var oFormat = new OpenLayers.Format.WMSGetFeatureInfo(); if(!response){ var xmlDoc=document.implementation.createDocument(,,null); xmlDoc.async=false; xmlDoc.load(response.xml); oFeatures = oFormat.read_msGMLOutput(xmlDoc); } else { oFeatures = oFormat.read_msGMLOutput(response.responseXML || response.responseText); } -- Alexandre Dubé Mapgears www.mapgears.com ?xml version=1.0 encoding=ISO-8859-1? msGMLOutput xmlns:gml=http://www.opengis.net/gml; xmlns:xlink=http://www.w3.org/1999/xlink; xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance; gml:description/gml:description LIEU_PG_layer LIEU_PG_feature gml:boundedBy gml:Box srsName=EPSG:2036 gml:coordinates-229507.624989,514030.124988 -229507.624989,514030.124988/gml:coordinates /gml:Box /gml:boundedBy id32/id nomgouv/nom lat48.5808437055365/lat lon-71.6251187337262/lon l_date2008-08-20/l_date /LIEU_PG_feature /LIEU_PG_layer /msGMLOutput ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users
Re: [OpenLayers-Users] WMSGetFeatureInfo Format
Hi Alexandre, I would suggest, you have to use xml as parameter and not an xml object. oFeatures = oFormat.read_msGMLOutput(response.xml); Arnd Wippermann -Ursprüngliche Nachricht- Von: users-boun...@openlayers.org [mailto:users-boun...@openlayers.org] Im Auftrag von Alexandre Dube Gesendet: Dienstag, 3. März 2009 21:21 An: OpenLayers users mailing list Betreff: [OpenLayers-Users] WMSGetFeatureInfo Format Hi users, I'm having a hard time using the WMSGetFeatureInfo format. Instead of explaining, below's snippet (1). Because I currently can't have a response from my server since I have problems with HTTPS and proxy, I load a xml (see attached) instead ( it's a msGMLOutput XML from MapServer ). I get an empty features array. Any clue what I'm doing wrong ? (1) /*-snippet-*/ showResult: function(response){ var oFeatures; var oFormat = new OpenLayers.Format.WMSGetFeatureInfo(); if(!response){ var xmlDoc=document.implementation.createDocument(,,null); xmlDoc.async=false; xmlDoc.load(response.xml); oFeatures = oFormat.read_msGMLOutput(xmlDoc); } else { oFeatures = oFormat.read_msGMLOutput(response.responseXML || response.responseText); } -- Alexandre Dubé Mapgears www.mapgears.com ___ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users