[OpenLayers-Users] display results of WMSgetfeatureinfo
lissabon at online.de
lissabon at online.de
Fri Oct 28 09:09:03 EDT 2011
Hi Dan,
yes, you're right! I forgot, the port the geoserver is responding to requests is also involved in the domain recognition. Therefore it could help using mod_jk with geoservers jetty engine to be able to omit the port when requesting the FeatureInfos (instead of using ProxyHost).... I've to confess that I'm not sure if the response will have a port number or not, which eventually again could cause the browser security concerns.
João
----- Ursprüngliche Nachricht -----
Von: Dan Lear
Gesendet: 28.10.11 14:56 Uhr
An: lissabon at online.de, openlayers-users at lists.osgeo.org
Betreff: RE: [OpenLayers-Users] display results of WMSgetfeatureinfo
Thanks João,
But geoserver and apache/openlayers are on the same machine, that said, I added the proxy information and it all worked.
Thanks very much for your help,
Dan
-----Original Message-----
From: lissabon at online.de [mailto:lissabon at online.de]
Sent: 28 October 2011 13:45
To: Dan Lear; openlayers-users at lists.osgeo.org
Subject: RE: [OpenLayers-Users] display results of WMSgetfeatureinfo
Hi Dan,
if you try to query data cross-domain you could use a proxy to achieve what you like (or have your service running on the same machine as your geoserver).
look here:
http://docs.openlayers.org/library/request.html
http://trac.osgeo.org/openlayers/wiki/FrequentlyAskedQuestions#ProxyHost
Hope this helps.
João
Hi,
I have code to generate a WMSGetFeatureInfo request which works fine:
getInfo = new OpenLayers.Control.WMSGetFeatureInfo({
url: 'http://MY_URL/geoserver/dassh/wms',
title: 'identify features on click',
layers: [dasshData],
queryVisible: true
});
getInfo.infoFormat = 'text/html';
getInfo.events.register("getfeatureinfo", this, getResults);
map.addControl(getInfo);
getInfo.activate();
function getResults(e) {
document.getElementById('resultTxt').innerHTML = e.text;
}
and I have a div tag "resultTxt" that I want the returned information displayed
in, but it is blank (as is e.text)
I can't capture the response and get it in the div, and looking at Firebug I
can open the getfeatureinfo in a new tab and display the table but the firebug
link is red, even though it reports a 200 OK status.
Any help?
Thanks
Dan
_______________________________________________
Users mailing list
Users at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20111028/69a26edd/attachment-0001.html
More information about the Users
mailing list