Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#243 closed defect (invalid)

WMSGetFeatureInfo() seems not working for rasters

Reported by: knacky Owned by:
Priority: trivial Milestone:
Component: GeoExt Version: 0.6
Keywords: Cc:
State: None

Description

Hi All,

First, I'm new to geoExt, appologies when this is a trivial issue.

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=""

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>

Change History (3)

comment:1 Changed 8 years ago by elemoine

  • Milestone 0.7 deleted

comment:2 Changed 8 years ago by knacky

  • Resolution set to invalid
  • Status changed from new to closed

comment:3 Changed 8 years ago by knacky

I forgot the "same origin policy" on this one. Solved now.

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.

Note: See TracTickets for help on using tickets.