[OpenLayers-Dev] Buffer/radius in GetFeatureInfo request

Ringdahl Niklas Niklas.Ringdahl at sweco.se
Wed Sep 16 04:28:15 EDT 2009


Hi Björn!

Ok, I might look into the WFS query instead, thanks!

Although I think it feels quite standardized and stable getting the response in GML and letting the control parse it before trigging the event "getfeatureinfo" in this way:
	
var info = new OpenLayers.Control.WMSGetFeatureInfo({
	layers: [queryLayer],
	format: new OpenLayers.Format.GML(),
     	title: 'Identify features',
     	queryVisible: true,
     	eventListeners: {
          	getfeatureinfo: showPopup
     	},
    	infoFormat: 'application/vnd.ogc.gml'
});

This relies on the map server being able to reply in GML, but that is also the case when using WFS, isn't it? Except from the BBOX option (which in it self is great), what are the benefits of using WFS, in your opinion?

- Niklas



-----Ursprungligt meddelande-----
Från: Björn Harrtell [mailto:bjorn.harrtell at gmail.com] 
Skickat: den 15 september 2009 22:06
Till: Andreas Hocevar
Kopia: Ringdahl Niklas; dev at openlayers.org
Ämne: Re: [OpenLayers-Dev] Buffer/radius in GetFeatureInfo request

Another option would be to use a WFS query with a BBOX filter. WMS GetFeatureInfo has other drawbacks than the buffer thing, like that the result isn't guaranteed to look in any standard way so it might vary with data source and software versions and must be manually parsed, compared to WFS where OpenLayers can do both the querying and result parsing.

/Björn

2009/9/15 Andreas Hocevar <ahocevar at opengeo.org>:
> Hi Niklas,
>
> Ringdahl Niklas wrote:
>> I don't know if it's possible to update right now, but this improvement may be the best argument for that. Will it work with external graphics as well? If not, is it possible to set a size in the SLD to mimick this behaviour?
>>
>
> I have not tried if that works. If it does not, you can still set the 
> BUFFER vendorParam. For more details, see
> http://jira.codehaus.org/browse/GEOS-1434 or ask on the 
> geoserver-users list.
>
> Also, i see that this is available since version 1.7.4, not 1.7.6.
>
> Regards,
> Andreas.
>> Regards,
>> - Niklas
>>
>>
>> -----Ursprungligt meddelande-----
>> Från: Andreas Hocevar [mailto:ahocevar at opengeo.org]
>> Skickat: den 15 september 2009 16:35
>> Till: Ringdahl Niklas
>> Kopia: dev at openlayers.org
>> Ämne: Re: [OpenLayers-Dev] Buffer/radius in GetFeatureInfo request
>>
>> Hi,
>>
>> If it is possible for you to upgrade to GeoServer 1.7.6, you will get intelligent point radius selection for free, without the need to provide an extra vendorParam. The way it works is that it analyzes the SLD that created the symbol, and will return all the features that are *visible on the map* at the spot that you clicked.
>>
>> Regards,
>> Andreas.
>>
>> Ringdahl Niklas wrote:
>>
>>> Hi list.
>>>
>>> I'm using the WMSGetFeatureInfo control to query a point layer, and 
>>> would like to increase the area where a point gets hit. Somewhere I 
>>> read about a vendorParam "buffer" or "radius" for Geoserver that 
>>> would do the trick, but I can't seem to get it to work. Does anyone 
>>> have any hints or code?
>>>
>>> I'm using OpenLayers 2.8, Geoserver 1.7.3 and PostGreSQL 8.3.5
>>>
>>> Thanks in advance!
>>> - Niklas
>>> _______________________________________________
>>> Dev mailing list
>>> Dev at openlayers.org
>>> http://openlayers.org/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Andreas Hocevar
>> OpenGeo - http://opengeo.org/
>> Expert service straight from the developers.
>>
>>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
> _______________________________________________
> Dev mailing list
> Dev at openlayers.org
> http://openlayers.org/mailman/listinfo/dev
>



More information about the Dev mailing list