[Users] WMSGetFeatureInfo() issue
Kris Nackaerts
knackaerts at gmx.net
Mon Mar 22 23:09:46 CET 2010
Dear,
Yes, I forgot the same origin policy on this one. Solved now, thank's!
For who's interested. I run the demo I'm developing from Xampp (on USB disk).
Edited two files:
\xampp\apache\conf\httpd.conf
Unchecked the following:
LoadModule proxy_module modules/mod_proxy.so
LoadModule proxy_http_module modules/mod_proxy_http.so
\xampp\apache\conf\extra\httpd-proxy.conf
ProxyPass /dmt/ http://mygeoserverurl/dmt/
In the js code, I use localhost now.
Many thank's,
Kris
-------- Original-Nachricht --------
> Datum: Mon, 22 Mar 2010 14:51:52 -0600
> Von: Tim Schaub <tschaub at opengeo.org>
> An: users at geoext.org
> Betreff: Re: [Users] WMSGetFeatureInfo() issue
> Kris Nackaerts wrote:
> > Hi All,
> >
> > First, I'm new to geoExt, apologies when this is a trivial issue.
> >
>
> Welcome!
>
> > The following code is not working correctly. When using firebug, the
> request that is send to Geoserver is correct, and geoserver returns the
> expected data. e.text however remains empty. Note the datalayer queried is a 16
> bit raster dataset.
> >
> > var featureInfo = new OpenLayers.Control.WMSGetFeatureInfo();
> > featureInfo.events.on({
> > getfeatureinfo: function(e) {
> > alert(e.text);
> > }
> > });
> >
> >
> > map.addControl(featureInfo);
> > featureInfo.layers = [bathy];
> > featureInfo.activate();
> >
> > The issue: e.text remains empty.
> >
> > Some additional info:
> >
> > * e.request.statusText='OK'
> > * e.request.status=0
> > * e.request.readyState=4
> > * e.request.responseText=""
> >
>
> Do you know about the same origin policy?
>
> http://en.wikipedia.org/wiki/Same_origin_policy
>
> If your map is served up from http://localhost/path/to/map and you're
> trying to make a request to http://localhost:8080/geoserver/... then
> you're violating the same origin policy.
>
> If this is your issue, see the following:
>
> http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost
>
> If this is not your issue, it would be easiest to help debug if your
> application was accessible. (And an OpenLayers list would probably be a
> better fit.)
>
> Tim
>
> > Based on Firebug, I can discover that Geoserver returns the following
> (by manually copying/pasting the URL request into a new page):
> >
> > <html>
> > <head>
> > <title>Geoserver GetFeatureInfo output</title>
> > </head>
> > <style type="text/css"> ... </style>
> > <body>
> >
> > <table class="featureInfo">
> > <caption class="featureInfo">DMT:dmt_original_values_proto</caption>
> >
> > <tr>
> > <th>fid</th>
> > <th >GRAY_INDEX</th>
> > </tr>
> >
> > <tr>
> >
> > <td></td>
> > <td>1558.0</td>
> >
> > </tr>
> > </table>
> > <br/>
> >
> > </body>
> > </html>
> >
> > Any ideas, comments ware welcome,
> >
> > Kris
>
>
> --
> Tim Schaub
> OpenGeo - http://opengeo.org
> Expert service straight from the developers.
> _______________________________________________
> Users mailing list
> Users at geoext.org
> http://www.geoext.org/cgi-bin/mailman/listinfo/users
--
Sicherer, schneller und einfacher. Die aktuellen Internet-Browser -
jetzt kostenlos herunterladen! http://portal.gmx.net/de/go/atbrowser
More information about the Users
mailing list