[OpenLayers-Users] WMS GetFeatureInfo - difficult to click exactly on a point

Kimball, David (DCR) David.Kimball at state.ma.us
Thu Jan 29 15:58:56 EST 2009


Hi everyone,

I'm using a WMS GetFeatureInfo to simultaneously query the attributes of
a line layer and a point layer (from GeoServer).  Unfortunately you have
to click *exactly* on the center of a point to get it to send you the
point attributes.

http://maps.massgis.state.ma.us/dcr/trails/DCR_RoadTrail10.html


	map.events.register('click', map, function (e) {
		var url =  map.layers[0].getFullRequestString(
		{
			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: map.layers[8].params.LAYERS + ","
+ map.layers[9].params.LAYERS,
			FEATURE_COUNT: 50,
			WIDTH: map.size.w,
			HEIGHT: map.size.h
		},
	
"http://giswebservices.massgis.state.ma.us/geoserver/wms");
		OpenLayers.loadURL(url, '', this, setHTML, setHTML);
		OpenLayers.Event.stop(e);


I searched a bunch for this and all I could find were suggestions to do
a WFS getfeature instead of a WMS GetFeatureInfo, or to set some options
on the server (not an option in this case).  I'd rather use the WMS
request because I'd rather not rewrite all my parsing Javascript, and
there might be a performance hit - some of the lines have hundreds of
vertices, and when I tried a similar approach recently with large
polygons it was slow because of the large amount of data sent back.

So, is there any (client-side) radius/tolerance option for
GetFeatureInfo?

Thanks a lot,

David


||||||| David Kimball
||||||| GIS Specialist
||||||| MA Department of Conservation and Recreation
||||||| http://www.mass.gov/dcr/stewardship/gis/
||||||| david.kimball at state.ma.us
||||||| 617.626.1447 phone
||||||| 617.626.1349 fax



More information about the Users mailing list