<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<META http-equiv=Content-Type content=text/html;charset=iso-8859-1>
<META content="MSHTML 6.00.6000.16764" name=GENERATOR>
<DIV><FONT face=Arial size=2>I have added it to my sandbox, opened a ticket and
submitted patch.</FONT></DIV>
<DIV><FONT face=Arial size=2>The patch has been reviewed and modified and you
can see the current progress of it at:</FONT></DIV>
<DIV><A href="http://trac.openlayers.org/ticket/1812" target="_top" rel="nofollow">http://trac.openlayers.org/ticket/1812</A></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>glad to know that others are in someway interested
in this.</FONT></DIV>
<DIV><FONT face=Arial size=2>Matt Priour</FONT> </DIV>
<DIV style="FONT: 10pt Tahoma">
<DIV><BR></DIV>
<DIV style="BACKGROUND: #f5f5f5">
<DIV style="font-color: black"><B>From:</B> <a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1834153&i=0" target="_top" rel="nofollow">ml-user+64477-1516779769@...</a> </DIV>
<DIV><B>Sent:</B> Thursday, December 25, 2008 10:43 PM</DIV>
<DIV><B>To:</B> <a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1834153&i=1" target="_top" rel="nofollow">mpriour@...</a> </DIV>
<DIV><B>Subject:</B> Re: Difficulties with GetFeatureInfo</DIV></DIV></DIV>
<DIV><BR></DIV>Matt, i had never tried Format.GML with GetFeatureInfo responses.
And <BR>indeed that'd be great to have support for this. Do you plan to
<BR>contribute your work for integration into OpenLayers? Thanks. Eric
<BR><BR>2008/7/9, mpriour <<a href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1834153&i=2" target="_top" rel="nofollow">mpriour@...</a>>:
<DIV class=shrinkable-quote><div class='shrinkable-quote'><BR>> <BR>> I was actually struggling with
this same problem this past month. <BR>> You should use: <BR>> <BR>>
var xmlResponse = new OpenLayers.Format.XML().read(response.responseText);
<BR>> <BR>> this will convert the text into a valid xml object. <BR>>
>From there you can do whatever you want to it. <BR>> <BR>> I am writing
some convience methods that extend OpenLayers.Format.GML to <BR>> parse the
GML GetFeatureInfo response into predictable js objects. The <BR>> current
methods for Format.GML & Format.WFS are not designed to correctly <BR>>
parse the entire GML GetFeatureInfo response. They can parse some geometry
<BR>> or features from portions of the response. <BR>> <BR>> Matt
Priour <BR>> Kestrel Computer Consulting <BR>> www.kestrelcompter.com -
homepage <BR>> priour.wordpress.com - blog <BR>> <BR>> <BR>> Eric
Lemoine-3 wrote: <BR>>> <BR>>> Hi. Have you tried using
OpenLayers.Format.GML for de-serializing the <BR>>> response text into
feature objects? Eric <BR>>> <BR>>> 2008/7/8, Rick Wayne <<A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1829677&i=1" target=_top rel="nofollow">fewayne@...</A>>: <BR>>>> Hullo all,
<BR>>>> <BR>>>> I'm using OpenLayers and GeoServer, and am
having some trouble with <BR>>>> getting XML data out of
GetFeatureInfo. If I ask GeoServer for <BR>>>> INFO_FORMAT of
application/vnd.ogc.gml, I get a response back, and it <BR>>>> has the
data I desire. But I cannot access those data as XML. I have <BR>>>> to
get them via responseText and parse that looking for angle brackets
<BR>>>> and the like, which is all very boring, not to say fragile as a
dried <BR>>>> leaf. <BR>>>> <BR>>>> Of course, I
should be able to make use of the responseXML property, <BR>>>> but
that obstinately persists in being NULL, even when the text <BR>>>>
response is fine. In fact, the text response is perfectly good XML. As
<BR>>>> a big honkin' string. <BR>>>> <BR>>>> I'm
using GeoServer 1.5.3 and, er, whichever OL version came with <BR>>>>
that. :-) <BR>>>> <BR>>>> Below are the relevant calls. If
anyone can assuage my ignorance, good <BR>>>> cheer to them!
<BR>>>> <BR>>>> TIA, <BR>>>> <BR>>>> Rick
Wayne <BR>>>> UW Soil Science <BR>>>> <BR>>>>
[...] <BR>>>> map.events.register('click',
map, function (e) { <BR>>>> var url =
map.baseLayer.getFullRequestString({ <BR>>>> REQUEST:
"GetFeatureInfo", <BR>>>> EXCEPTIONS: "application/vnd.ogc.se_xml",
<BR>>>> BBOX: map.getExtent().toBBOX(), <BR>>>> X: e.xy.x,
<BR>>>> Y: e.xy.y, <BR>>>> INFO_FORMAT:
'application/vnd.ogc.gml', <BR>>>> // INFO_FORMAT: 'text/plain',
<BR>>>> QUERY_LAYERS: map.baseLayer.params.LAYERS, <BR>>>>
FEATURE_COUNT: 1, <BR>>>> srs: 'EPSG:26916', <BR>>>> styles:
'', <BR>>>> layers: 'mmas:civil', <BR>>>> WIDTH: map.size.w,
<BR>>>> HEIGHT: map.size.h}, <BR>>>> "/geoserver/wms"
<BR>>>> ); <BR>>>> OpenLayers.loadURL(url, '', this,
zoomToFeature, zoomToFeature); <BR>>>> Event.stop(e); <BR>>>>
}); <BR>>>> <BR>>>> function zoomToFeature(response) {
<BR>>>> // lines = response.responseText.split('\n'); <BR>>>>
var txt; <BR>>>> var tag; <BR>>>> var coord_index;
<BR>>>> var rest; <BR>>>> var coord_text; <BR>>>> var
coords; <BR>>>> var coord_pairs,ll,ur; <BR>>>>
<BR>>>> txt = response.responseText; // here should be xml =
<BR>>>> response.responseXML; <BR>>>> tag = 'gml:coordinates
decimal="." cs="," ts=" ">'; <BR>>>> coord_index = txt.indexOf(tag);
<BR>>>> rest = txt.substr(coord_index + tag.length); <BR>>>>
end_coord_index = rest.indexOf('<'); <BR>>>>
// And so on, too ugly to reveal the rest! <BR>>>>
<BR>>>> <BR>>>>
_______________________________________________ <BR>>>> Users mailing
list <BR>>>> <A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1829677&i=2" target=_top rel="nofollow">Users@...</A> <BR>>>> <A href="http://openlayers.org/mailman/listinfo/users" target=_top rel="nofollow">http://openlayers.org/mailman/listinfo/users</A><BR>>>>
<BR>>> _______________________________________________ <BR>>> Users
mailing list <BR>>> <A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1829677&i=3" target=_top rel="nofollow">Users@...</A> <BR>>> <A href="http://openlayers.org/mailman/listinfo/users" target=_top rel="nofollow">http://openlayers.org/mailman/listinfo/users</A><BR>>>
<BR>>> <BR>> <BR>> -- <BR>> View this message in context:
<BR>> <A href="http://www.nabble.com/Difficulties-with-GetFeatureInfo-tp18347813p18353488.html" target=_top rel="nofollow">http://www.nabble.com/Difficulties-with-GetFeatureInfo-tp18347813p18353488.html</A><BR>>
Sent from the OpenLayers Users mailing list archive at Nabble.com. <BR>>
<BR>> _______________________________________________ <BR>> Users mailing
list <BR>> <A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1829677&i=4" target=_top rel="nofollow">Users@...</A> <BR>> <A href="http://openlayers.org/mailman/listinfo/users" target=_top rel="nofollow">http://openlayers.org/mailman/listinfo/users</A><BR>>
</DIV>_______________________________________________ </div>Users mailing list
<BR><A href="http://n2.nabble.com/user/SendEmail.jtp?type=node&node=1829677&i=5" target=_top rel="nofollow">Users@...</A> <BR><A href="http://openlayers.org/mailman/listinfo/users" target=_top rel="nofollow">http://openlayers.org/mailman/listinfo/users</A><BR>
<br><hr align="left" width="300">
View this message in context: <a href="http://n2.nabble.com/Difficulties-with-GetFeatureInfo-tp1829674p1834153.html">Re: Difficulties with GetFeatureInfo</a><br>
Sent from the <a href="http://n2.nabble.com/OpenLayers-Users-f1822463.html">OpenLayers Users mailing list archive</a> at Nabble.com.<br>