From: Federica De M. <fde...@tp...> - 2011-06-06 10:55:48
|
Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. |
From: Federica De M. <fde...@tp...> - 2011-06-06 11:05:49
|
Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. |
From: Lukas J. <luk...@de...> - 2011-06-06 20:36:29
|
You should set the layer(s) that you want to query with: options.setLayers() //layer or array of layers /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 6 juni 2011 12:33 Till: gwt...@li... Ämne: [Gwt-openlayers-users] WMSGetFeatureInfo not working Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Federica De M. <fde...@tp...> - 2011-06-07 06:53:59
|
Thank you Lukas for the answer. I tried to add the line of code you suggest me but the method is not included in my gwt-openlayers version, is it possible? I include the gwt-openlayers with maven: <dependency> <groupId>org.gwtopenmaps.openlayers</groupId> <artifactId>gwt-openlayers-client</artifactId> <version>0.5</version> </dependency> Is there another version I should have to include, or something else I have to add? Thank you again, Federica ----- Original Message ----- From: "Lukas Johansson" <luk...@de...> To: "Federica De Martin" <fde...@tp...>; <gwt...@li...> Sent: Monday, June 06, 2011 10:32 PM Subject: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working You should set the layer(s) that you want to query with: options.setLayers() //layer or array of layers /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 6 juni 2011 12:33 Till: gwt...@li... Ämne: [Gwt-openlayers-users] WMSGetFeatureInfo not working Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Lukas J. <luk...@de...> - 2011-06-07 12:51:20
|
That's because that specific code did not make it into the 0.5build. I don't know how far away the next release is but one way of getting a working gwt-ol is to download and build your own version. /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 7 juni 2011 08:54 Till: Lukas Johansson; gwt...@li... Ämne: Re: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working Thank you Lukas for the answer. I tried to add the line of code you suggest me but the method is not included in my gwt-openlayers version, is it possible? I include the gwt-openlayers with maven: <dependency> <groupId>org.gwtopenmaps.openlayers</groupId> <artifactId>gwt-openlayers-client</artifactId> <version>0.5</version> </dependency> Is there another version I should have to include, or something else I have to add? Thank you again, Federica ----- Original Message ----- From: "Lukas Johansson" <luk...@de...> To: "Federica De Martin" <fde...@tp...>; <gwt...@li...> Sent: Monday, June 06, 2011 10:32 PM Subject: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working You should set the layer(s) that you want to query with: options.setLayers() //layer or array of layers /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 6 juni 2011 12:33 Till: gwt...@li... Ämne: [Gwt-openlayers-users] WMSGetFeatureInfo not working Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Federica De M. <fde...@tp...> - 2011-06-07 09:43:47
|
I'have changed my gwt-openlayesrs dependencies to: <dependency> <groupId>org.gwtopenmaps.openlayers</groupId> <artifactId>gwt-openlayers-client</artifactId> <version>0.6-SNAPSHOT</version> </dependency> and I'have added the SNAPSHOT version repository: <repository> <id>sonatype-nexus-snapshots</id> <name>Repository for gwt-openlayers snapshot</name> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </repository> Now I could add this code line: options.setLayers(new WMS[] {waterBodies, stateBoundaries}); But I keep on getting an empty result when I query the map, any other idea? Federica ----- Original Message ----- From: "Lukas Johansson" <luk...@de...> To: "Federica De Martin" <fde...@tp...>; <gwt...@li...> Sent: Monday, June 06, 2011 10:32 PM Subject: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working You should set the layer(s) that you want to query with: options.setLayers() //layer or array of layers /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 6 juni 2011 12:33 Till: gwt...@li... Ämne: [Gwt-openlayers-users] WMSGetFeatureInfo not working Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Federica De M. <fde...@tp...> - 2011-06-07 13:58:42
|
I tried to have a look with firebug, and when I click on the map there is a GET request as follows: GET http://localhost:9090/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=topp%3Atasmania_water_bodies,topp%3Atasmania_state_boundaries,gimovit%3Areg_tmp&QUERY_LAYERS=topp%3Atasmania_water_bodies,topp%3Atasmania_state_boundaries,gimovit%3Areg_tmp&STYLES=,,&BBOX=-64.789268%2C5.300572%2C115.562294%2C75.613072&FEATURE_COUNT=10&HEIGHT=400&WIDTH=1026&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=445&Y=188 200 OK 312ms OpenLayers.js (riga 1188) Intestazioni BBOX -64.789268,5.300572,115.562294,75.613072 FEATURE_COUNT 10 FORMAT image/png HEIGHT 400 INFO_FORMAT text/html LAYERS topp:tasmania_water_bodies,topp:tasmania_state_boundaries,gimovit:reg_tmp QUERY_LAYERS topp:tasmania_water_bodies,topp:tasmania_state_boundaries,gimovit:reg_tmp REQUEST GetFeatureInfo SERVICE WMS SRS EPSG:4326 STYLES ,, VERSION 1.1.1 WIDTH 1026 X 445 Y 188 Intestazioni di rispostaVisualizza come testo semplice Content-Type text/html; charset=utf-8 Content-Length 890 Content-Encoding gzip Server Jetty(6.1.8) Intestazioni di richiestaVisualizza come testo semplice Host localhost:9090 User-Agent Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.2.10) Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language it-it,it;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Referer http://localhost:8080/gimovit-gwt/ Origin http://localhost:8080 If I copy the address of the request in my browser I can see the HTML response right as it should appear, but in firebug I find the Answer and HTML tabs completly empty! What else can I check? Thank you for the help... Federica ----- Original Message ----- From: "Lukas Johansson" <luk...@de...> To: "Federica De Martin" <fde...@tp...> Sent: Tuesday, June 07, 2011 11:44 AM Subject: SV: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working Install firebug and see if the request is made and if so what attributes that are being sent. -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 7 juni 2011 11:44 Till: Lukas Johansson; gwt...@li... Ämne: Re: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working I'have changed my gwt-openlayesrs dependencies to: <dependency> <groupId>org.gwtopenmaps.openlayers</groupId> <artifactId>gwt-openlayers-client</artifactId> <version>0.6-SNAPSHOT</version> </dependency> and I'have added the SNAPSHOT version repository: <repository> <id>sonatype-nexus-snapshots</id> <name>Repository for gwt-openlayers snapshot</name> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </repository> Now I could add this code line: options.setLayers(new WMS[] {waterBodies, stateBoundaries}); But I keep on getting an empty result when I query the map, any other idea? Federica ----- Original Message ----- From: "Lukas Johansson" <luk...@de...> To: "Federica De Martin" <fde...@tp...>; <gwt...@li...> Sent: Monday, June 06, 2011 10:32 PM Subject: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working You should set the layer(s) that you want to query with: options.setLayers() //layer or array of layers /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 6 juni 2011 12:33 Till: gwt...@li... Ämne: [Gwt-openlayers-users] WMSGetFeatureInfo not working Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Lukas J. <luk...@de...> - 2011-06-08 11:03:22
|
Might it bee that you need to proxy your result as the application resides on port 8080 and the geoserver on 9090. That would explain why it works in the browser but not in the application. I think that you should get an error in that case though, something like "forbidden location" or the like. /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 7 juni 2011 15:59 Till: Lukas Johansson; gwt...@li... Ämne: Re: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working I tried to have a look with firebug, and when I click on the map there is a GET request as follows: GET http://localhost:9090/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=topp%3Atasmania_water_bodies,topp%3Atasmania_state_boundaries,gimovit%3Areg_tmp&QUERY_LAYERS=topp%3Atasmania_water_bodies,topp%3Atasmania_state_boundaries,gimovit%3Areg_tmp&STYLES=,,&BBOX=-64.789268%2C5.300572%2C115.562294%2C75.613072&FEATURE_COUNT=10&HEIGHT=400&WIDTH=1026&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=445&Y=188 200 OK 312ms OpenLayers.js (riga 1188) Intestazioni BBOX -64.789268,5.300572,115.562294,75.613072 FEATURE_COUNT 10 FORMAT image/png HEIGHT 400 INFO_FORMAT text/html LAYERS topp:tasmania_water_bodies,topp:tasmania_state_boundaries,gimovit:reg_tmp QUERY_LAYERS topp:tasmania_water_bodies,topp:tasmania_state_boundaries,gimovit:reg_tmp REQUEST GetFeatureInfo SERVICE WMS SRS EPSG:4326 STYLES ,, VERSION 1.1.1 WIDTH 1026 X 445 Y 188 Intestazioni di rispostaVisualizza come testo semplice Content-Type text/html; charset=utf-8 Content-Length 890 Content-Encoding gzip Server Jetty(6.1.8) Intestazioni di richiestaVisualizza come testo semplice Host localhost:9090 User-Agent Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.2.10) Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language it-it,it;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Referer http://localhost:8080/gimovit-gwt/ Origin http://localhost:8080 If I copy the address of the request in my browser I can see the HTML response right as it should appear, but in firebug I find the Answer and HTML tabs completly empty! What else can I check? Thank you for the help... Federica ----- Original Message ----- From: "Lukas Johansson" <luk...@de...> To: "Federica De Martin" <fde...@tp...> Sent: Tuesday, June 07, 2011 11:44 AM Subject: SV: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working Install firebug and see if the request is made and if so what attributes that are being sent. -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 7 juni 2011 11:44 Till: Lukas Johansson; gwt...@li... Ämne: Re: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working I'have changed my gwt-openlayesrs dependencies to: <dependency> <groupId>org.gwtopenmaps.openlayers</groupId> <artifactId>gwt-openlayers-client</artifactId> <version>0.6-SNAPSHOT</version> </dependency> and I'have added the SNAPSHOT version repository: <repository> <id>sonatype-nexus-snapshots</id> <name>Repository for gwt-openlayers snapshot</name> <url>https://oss.sonatype.org/content/repositories/snapshots</url> </repository> Now I could add this code line: options.setLayers(new WMS[] {waterBodies, stateBoundaries}); But I keep on getting an empty result when I query the map, any other idea? Federica ----- Original Message ----- From: "Lukas Johansson" <luk...@de...> To: "Federica De Martin" <fde...@tp...>; <gwt...@li...> Sent: Monday, June 06, 2011 10:32 PM Subject: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working You should set the layer(s) that you want to query with: options.setLayers() //layer or array of layers /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fde...@tp...] Skickat: den 6 juni 2011 12:33 Till: gwt...@li... Ämne: [Gwt-openlayers-users] WMSGetFeatureInfo not working Hi everybody. I'm trying to implement the WMSGetFeatureInfo listner in my gwt-openlayers map but I cannot make it work. I recive no result in the alert window; Now I'm using che sample geoserver layer (Tasmania boundary and waters) but I keep on getting no results. My application runs at localhost:8080 on jboss and geoserver is running with Jetty at localhost:9090. This is my code: <code> String wmsurl=http://localhost:9090/geoserver/wms; WMSGetFeatureInfoOptions options = new WMSGetFeatureInfoOptions(); options.setInfoFormat("text/html"); options.setURL(wmsurl); options.setTitle("Query visible layers"); options.setQueryVisible(true); WMSGetFeatureInfo info = new WMSGetFeatureInfo(options); info.addGetFeatureListener(new GetFeatureInfoListener(){ public void onGetFeatureInfo(GetFeatureInfoEvent eo) { Window.alert(eo.getType() + " - " + eo.getText()); } }); map.addControl(info); info.activate(); </code> Do you have any idea on how to make it work. I think I'm missing something but I really cannot understand what, please help me. Thank you, Federica. ------------------------------------------------------------------------------ Simplify data backup and recovery for your virtual environment with vRanger. Installation's a snap, and flexible recovery options mean your data is safe, secure and there when you need it. Discover what all the cheering's about. Get your free trial download today. http://p.sf.net/sfu/quest-dev2dev2 _______________________________________________ Gwt-openlayers-users mailing list Gwt...@li... https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users |
From: Dave P. <dav...@pi...> - 2011-06-20 06:48:11
|
Hi List Was a solution ever found for this problem, because I seem to be getting the same issue. I attempt to make a request to geoserver instance running on the same tomcat webserver with a valid layer name via a wmsgetfeature request, I get callback with an empty result. I lhave ooked at the geoserver logs and can see geoserver getting the request from the gwt-openlayers program and see the request to my postgis database. Feeding the same sql request into the database, generates data. Using firebug and copying the text of the feature requests, results in to firefox returns a result. Using firebug of the gwt-program, shows the reques set to geoserver. A callback is received but the results section is empty. I do not think it is a proxy issue because both my instance of geoserver and my gwt-program are bothing running on the same server. I have tried the example from showcase which works correctly. AS far as I can make out the showcase example and my owner server are setting the same param strings so I should receive a result. It is possible to use the 'internal version of openlayers' in the layer preview option to look at the data and everything seem to be correct. I just wondering what is going wrong! If geoserver was not processing the request I should not receive a callback, but I do. If the feature request was invalid I would not see geoserver accessing my database, but it does. (There is no logging to say what geoserver actuall generated, even at the finest setting) If there was something wrong with the request, I would not see a correct result from geoserver when I make the same request directly via firefox, but I do. Does anybody known any method of seeing what geoserver generates for an gwt-openlayers program ? I do not suspect a bug, I suspect a projection issue i.e. my program has said something like give give me all the information about features near point x/y. Geoserver has generated a null request because it could not find anything because its concept of X/Y is different to my program concept of X/Y.(Firebug and Geosever both claim to be using the same srs value) Dave. ------------------------------------------------------------------------ Might it bee that you need to proxy your result as the application resides on port 8080 and the geoserver on 9090. That would explain why it works in the browser but not in the application. I think that you should get an error in that case though, something like "forbidden location" or the like. /Lukas -----Ursprungligt meddelande----- Från: Federica De Martin [mailto:fdemartin@...] Skickat: den 7 juni 2011 15:59 Till: Lukas Johansson; gwt-openlayers-users@... Ämne: Re: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working I tried to have a look with firebug, and when I click on the map there is a GET request as follows: GET http://localhost:9090/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=topp%3Atasmania_water_bodies,topp%3Atasmania_state_boundaries,gimovit%3Areg_tmp&QUERY_LAYERS=topp%3Atasmania_water_bodies,topp%3Atasmania_state_boundaries,gimovit%3Areg_tmp&STYLES=,,&BBOX=-64.789268%2C5.300572%2C115.562294%2C75.613072&FEATURE_COUNT=10&HEIGHT=400&WIDTH=1026&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=445&Y=188 200 OK 312ms OpenLayers.js (riga 1188) Intestazioni BBOX -64.789268,5.300572,115.562294,75.613072 FEATURE_COUNT 10 FORMAT image/png HEIGHT 400 INFO_FORMAT text/html LAYERS topp:tasmania_water_bodies,topp:tasmania_state_boundaries,gimovit:reg_tmp QUERY_LAYERS topp:tasmania_water_bodies,topp:tasmania_state_boundaries,gimovit:reg_tmp REQUEST GetFeatureInfo SERVICE WMS SRS EPSG:4326 STYLES ,, VERSION 1.1.1 WIDTH 1026 X 445 Y 188 Intestazioni di rispostaVisualizza come testo semplice Content-Type text/html; charset=utf-8 Content-Length 890 Content-Encoding gzip Server Jetty(6.1.8) Intestazioni di richiestaVisualizza come testo semplice Host localhost:9090 User-Agent Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.2.10) Gecko/20100915 Ubuntu/10.04 (lucid) Firefox/3.6.10 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language it-it,it;q=0.8,en-us;q=0.5,en;q=0.3 Accept-Encoding gzip,deflate Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive 115 Connection keep-alive Referer http://localhost:8080/gimovit-gwt/ Origin http://localhost:8080 If I copy the address of the request in my browser I can see the HTML response right as it should appear, but in firebug I find the Answer and HTML tabs completly empty! What else can I check? Thank you for the help... Federica ----- Original Message [Truncated]----- ------------------------------------------------------------------------- Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the Pinan Software |
From: Dave P. <dav...@pi...> - 2011-06-26 12:21:16
|
I have spent some more time look at this problem, I have tried looking at the conversation between my open layers program and my web server with stace. It seems that WMSGEtFeatureInfo reply from the web server is being encode in a gzip format? ie 28754 send(14, "HTTP/1.1 200 OK\r\nServer: Apache-"..., 562, 0) = 562 | 00000 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d HTTP/1.1 200 OK. | | 00010 0a 53 65 72 76 65 72 3a 20 41 70 61 63 68 65 2d .Server: Apache- | | 00020 43 6f 79 6f 74 65 2f 31 2e 31 0d 0a 43 6f 6e 74 Coyote/1 .1..Cont | | 00030 65 6e 74 2d 45 6e 63 6f 64 69 6e 67 3a 20 67 7a ent-Enco ding: gz | | 00040 69 70 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70 65 ip..Cont ent-Type | | 00050 3a 20 74 65 78 74 2f 68 74 6d 6c 0d 0a 43 6f 6e : text/h tml..Con | | 00060 74 65 6e 74 2d 4c 65 6e 67 74 68 3a 20 34 30 39 tent-Len gth: 409 | | 00070 0d 0a 44 61 74 65 3a 20 53 75 6e 2c 20 32 36 20 ..Date: Sun, 26 | | 00080 4a 75 6e 20 32 30 31 31 20 31 31 3a 34 36 3a 31 Jun 2011 11:46:1 | dumping the conversation between example WMSGEtFeatureInfo, shows following 28754 send(14, "HTTP/1.1 200 OK\r\nServer: Apache-"..., 1244, 0) = 1244 | 00000 48 54 54 50 2f 31 2e 31 20 32 30 30 20 4f 4b 0d HTTP/1.1 200 OK. | | 00010 0a 53 65 72 76 65 72 3a 20 41 70 61 63 68 65 2d .Server: Apache- | | 00020 43 6f 79 6f 74 65 2f 31 2e 31 0d 0a 43 6f 6e 74 Coyote/1 .1..Cont | | 00030 65 6e 74 2d 54 79 70 65 3a 20 74 65 78 74 2f 68 ent-Type : text/h | | 00040 74 6d 6c 0d 0a 54 72 61 6e 73 66 65 72 2d 45 6e tml..Tra nsfer-En | | 00050 63 6f 64 69 6e 67 3a 20 63 68 75 6e 6b 65 64 0d coding: chunked. | | 00060 0a 44 61 74 65 3a 20 53 75 6e 2c 20 32 36 20 4a .Date: S un, 26 J | | 00070 75 6e 20 32 30 31 31 20 31 31 3a 34 34 3a 30 36 un 2011 11:44:06 | | 00080 20 47 4d 54 0d 0a 0d 0a 34 34 64 0d 0a 3c 68 74 GMT.... 44d..<ht | | 00090 6d 6c 3e 0d 0a 20 20 3c 68 65 61 64 3e 0d 0a 20 ml>.. < head>.. | | 000a0 20 20 20 3c 74 69 74 6c 65 3e 47 65 6f 73 65 72 <titl e>Geoser | | 000b0 76 65 72 20 47 65 74 46 65 61 74 75 72 65 49 6e ver GetF eatureIn | > Hi List > > Was a solution ever found for this problem, because I seem to be getting > the same issue. > > I attempt to make a request to geoserver instance running on the same > tomcat webserver with a valid layer name via a wmsgetfeature request, I > get callback with an empty result. > > I lhave ooked at the geoserver logs and can see geoserver getting the > request from the gwt-openlayers program and see the request to my postgis > database. > > Feeding the same sql request into the database, generates data. > > Using firebug and copying the text of the feature requests, results in to > firefox returns a result. > > Using firebug of the gwt-program, shows the reques set to geoserver. A > callback is received but the results section is empty. > > I do not think it is a proxy issue because both my instance of geoserver > and my gwt-program are bothing running on the same server. > > I have tried the example from showcase which works correctly. AS far as I > can make out the showcase example and my owner server are setting the same > param strings so I should receive a result. > > It is possible to use the 'internal version of openlayers' in the layer > preview option to look at the data and everything seem to be correct. > > I just wondering what is going wrong! If geoserver was not processing the > request I should not receive a callback, but I do. If the feature request > was invalid I would not see geoserver accessing my database, but it does. > (There is no logging to say what geoserver actuall generated, even at the > finest setting) > > If there was something wrong with the request, I would not see a correct > result from geoserver when I make the same request directly via firefox, > but I do. > > Does anybody known any method of seeing what geoserver generates for an > gwt-openlayers program ? > > I do not suspect a bug, I suspect a projection issue i.e. my program has > said something like give give me all the information about features near > point x/y. Geoserver has generated a null request because it could not > find anything because its concept of X/Y is different to my program > concept of X/Y.(Firebug and Geosever both claim to be using the same srs > value) > > Dave. > ------------------------------------------------------------------------ > > > > > Might it bee that you need to proxy your result as the application resides > on port 8080 and the geoserver on 9090. That would explain why it works in > the browser but not in the application. I think that you should get an > error in that case though, something like "forbidden location" or the > like. > /Lukas > > -----Ursprungligt meddelande----- > Från: Federica De Martin [mailto:fdemartin@...] > Skickat: den 7 juni 2011 15:59 > Till: Lukas Johansson; gwt-openlayers-users@... > Ämne: Re: [SPAM] SV: [Gwt-openlayers-users] WMSGetFeatureInfo not working > > I tried to have a look with firebug, and when I click on the map there is > a > GET request as follows: > > GET > http://localhost:9090/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&LAYERS=topp%3Atasmania_water_bodies,topp%3Atasmania_state_boundaries,gimovit%3Areg_tmp&QUERY_LAYERS=topp%3Atasmania_water_bodies,topp%3Atasmania_state_boundaries,gimovit%3Areg_tmp&STYLES=,,&BBOX=-64.789268%2C5.300572%2C115.562294%2C75.613072&FEATURE_COUNT=10&HEIGHT=400&WIDTH=1026&FORMAT=image%2Fpng&INFO_FORMAT=text%2Fhtml&SRS=EPSG%3A4326&X=445&Y=188 > 200 OK 312ms OpenLayers.js (riga 1188) > Intestazioni > BBOX -64.789268,5.300572,115.562294,75.613072 > FEATURE_COUNT 10 > FORMAT image/png > HEIGHT 400 > INFO_FORMAT text/html > LAYERS > topp:tasmania_water_bodies,topp:tasmania_state_boundaries,gimovit:reg_tmp > QUERY_LAYERS > topp:tasmania_water_bodies,topp:tasmania_state_boundaries,gimovit:reg_tmp > REQUEST GetFeatureInfo > SERVICE WMS > SRS EPSG:4326 > STYLES ,, > VERSION 1.1.1 > WIDTH 1026 > X 445 > Y 188 > Intestazioni di rispostaVisualizza come testo semplice > Content-Type text/html; charset=utf-8 > Content-Length 890 > Content-Encoding gzip > Server Jetty(6.1.8) > Intestazioni di richiestaVisualizza come testo semplice > Host localhost:9090 > User-Agent Mozilla/5.0 (X11; U; Linux i686; it; rv:1.9.2.10) > Gecko/20100915 > Ubuntu/10.04 (lucid) Firefox/3.6.10 > Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 > Accept-Language it-it,it;q=0.8,en-us;q=0.5,en;q=0.3 > Accept-Encoding gzip,deflate > Accept-Charset ISO-8859-1,utf-8;q=0.7,*;q=0.7 > Keep-Alive 115 > Connection keep-alive > Referer http://localhost:8080/gimovit-gwt/ > Origin http://localhost:8080 > > If I copy the address of the request in my browser I can see the HTML > response right as it should appear, but in firebug I find the Answer and > HTML tabs completly empty! What else can I check? > > Thank you for the help... > Federica > > > ----- Original Message [Truncated]----- > > > > ------------------------------------------------------------------------- > Any views expressed in this message are those of the individual sender, > except where the sender specifically states them to be the views of the > Pinan Software > > > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > ------------------------------------------------------------------------- Any views expressed in this message are those of the individual sender, except where the sender specifically states them to be the views of the Pinan Software |