Hi, Have you tried "&buffer=xx" as documented in http://docs.geoserver.org/stable/en/user/services/wms/vendor.html#wms-vendor-parameters?
-Jukka Rahkonen- -----Alkuperäinen viesti----- Lähettäjä: David I [mailto:[email protected]] Lähetetty: 5. tammikuuta 2018 15:29 Vastaanottaja: [email protected] Aihe: [Geoserver-users] GetFeatureInfo search radius Hello, We have this Openlayers 4 based application that can use WMS layers. It uses such via a 2.11.2 Geoserver. It has a search function that creates a getFeatureInfocall for search hits. The call is created like so: var mapView = Viewer.getMap().getView(); var url = spec.layer.getSource().getGetFeatureInfoUrl( spec.feature.getGeometry().getFirstCoordinate(), mapView.getResolution(), mapView.getProjection(), { 'INFO_FORMAT': 'text/html', 'feature_count': 1 } ); The thing is that it quite often wants to return several features (of the always one layer being queried) which means it quite often does not return the right one. The features of the layer do not overlap so it seems improbably that the getFeatureInfocall would somehow target an exact intersection between three features (which would likely not return three features anyway). Like this call https://karta.eskilstuna.se/geoserver/wms?SERVICE=WMS&VERSION=1.1.1&REQUEST=GetFeatureInfo&FORMAT=image/png&TRANSPARENT=true&QUERY_LAYERS=sokvyx_fk_ay_esktn&LAYERS=sokvyx_fk_ay_esktn&TILED=true&INFO_FORMAT=text/html&feature_count=12&X=346&Y=237&WIDTH=512&HEIGHT=512&SRS=EPSG:3010&STYLES=&BBOX=150264,6583802.8,150622.4,6584161.2 where I set the feature_count to 12 the features being returned are three, but why? (We would expect one based on spec.feature.getGeometry().getFirstCoordinate() ) It happens for polygon layers as well as point layers. Is there a way to determine and/ or influence the actual search radius of the getfeatureinfo-request? -- Sent from: http://osgeo-org.1560.x6.nabble.com/GeoServer-User-f3786390.html ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Geoserver-users mailing list Please make sure you read the following two resources before posting to this list: - Earning your support instead of buying it, but Ian Turton: http://www.ianturton.com/talks/foss4g.html#/ - The GeoServer user list posting guidelines: http://geoserver.org/comm/userlist-guidelines.html If you want to request a feature or an improvement, also see this: https://github.com/geoserver/geoserver/wiki/Successfully-requesting-and-integrating-new-features-and-improvements-in-GeoServer [email protected] https://lists.sourceforge.net/lists/listinfo/geoserver-users
