[OpenLayers-Users] split WMS GetFeatureInfo results

stash st.sonstiges at web.de
Mon Nov 2 09:30:57 EST 2009


hello,

I have the following code, which shows me featureinfo of a map:

map.events.register('click', map, function(e) {
var url = "http://...:8080/geoserver/wms" + "?REQUEST=GetFeatureInfo" +
"&EXCEPTIONS=application/vnd.ogc.se_xml"
                            + "&BBOX=" + map.getExtent().toBBOX()
                            + "&X=" + e.xy.x
                            + "&Y=" + e.xy.y
                            + "&INFO_FORMAT=text/plain"
                            + "&QUERY_LAYERS=topp_mylayer"
                            + "&LAYERS=topp:topp_mylayer"
                            + "&FEATURE_COUNT=50"
                            + "&SRS=EPSG:4326"
                            + "&STYLES="
                            + "&WIDTH=" + map.size.w
                            + "&HEIGHT=" + map.size.h;

                    window.open(url, "getfeatureinfo",
"location=0,status=0,scrollbars=1,width=800,height=400");

This is working fine so far. But there is one thing I dont like. With this
code I get every feature of the clicked entry on the map (every entry in my
database like id, name, date, coordinates...). 

Is it possible, that I only get back a certain value like only the name of
the clicked entry or only the coordinates?

Furthermore is it possible, that i can store the getfeatureinfo request in a
variable?

Thanks for your help.

Regards
stash
 
-- 
View this message in context: http://n2.nabble.com/split-WMS-GetFeatureInfo-results-tp3932043p3932043.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list