5
如何选择GeoServer WMS GetFeatureInfo请求返回的字段?
我正在运行基于PostGIS / GeoServer / OpenLayers堆栈的简单本地地图服务。 在opengeo 教程之后,我使用以下方法将OpenLayers中的click事件绑定到WMS GetFeatureInfo调用: map.events.register('click', map, function (e) { var url = "http://localhost:1979/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/html" + "&QUERY_LAYERS=MYDATA:MYLAYER" + "&LAYERS=MYDATA:MYLAYER" + "&FEATURE_COUNT=5" + "&SRS=EPSG:3857" + "&STYLES=" + "&WIDTH=" + map.size.w + …