[OpenLayers-Users] simple gazetteer test with geojson

Gery . gamejihou at hotmail.com
Sat Sep 22 09:59:53 PDT 2012



Thanks for the answer but still I don't get how to do that. It seems to me that the PHP script generates SQL WHERE filters (@params) but I think I have to set that up before the search button is triggered in OL, and what I need is to search for the feature from a search button in OL. I read the filtertoParams but don't get it, do you have some code or example available for this? also, why is this procedure different from XML and GeoJson?




For name__like to be taken into account (1) your postgis_geojson.php script needs to support comparison filters in the requests, and (2) Protocol.HTTP object needs to have a filterToParams format. By default, if no filterToParams format is passed to the constructor, an Protocol.HTTP instance is configured with QueryStringFilter format, which, for example, converts a LIKE filter on attribute "name" into name__like=%value% in the query string.

Hope it helps




-- 
Eric Lemoine

Camptocamp France SAS
Savoie Technolac, BP 352
73377 Le Bourget du Lac, Cedex

Tel : 00 33 4 79 44 44 96
Mail : eric.lemoine at camptocamp.com

http://www.camptocamp.com

 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120922/6c8cbdc1/attachment-0001.html>


More information about the Users mailing list