[Cartoweb-dev] Extention to the locate plugin

Dirk Jesko ml.dje at geocontent.de
Thu Feb 22 11:57:35 EST 2007


Hello,

I had to provide multiple locate entries for the same layer (one for 
company name, one for ident number and one on type of business). This 
did not work with the current locate plugin, since the layername is the 
id. Therefore, I added a new configuration option and changed the 
ClientLocation.php (changed version and example ini are attached). 
Maybe, this change is of general interest. However, please be aware that 
I did not test it completely yet. Please let me know, what you think 
about it.


Regards,
Dirk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-dev/attachments/20070222/b4ff1433/ClientLocate.html
-------------- next part --------------
locate.0.id = cities
locate.0.layer = cities
locate.0.label = "Cities"
locate.0.sql= "SELECT gid, c_name FROM cities WHERE c_name ~* '%s' order by c_name LIMIT 10"

locate.1.id = comp_identnr
locate.1.layer = comp
locate.1.label = "Identnr"
locate.1.sql= "SELECT gid, identnr FROM companies WHERE identnr ~* '^%s' order by identnr LIMIT 10"

locate.2.id = comp_name
locate.2.layer = comp
locate.2.label = "Name"
locate.2.sql= "SELECT gid, comp_name FROM companies WHERE comp_name ~* '%s' order by firma LIMIT 10"


More information about the Cartoweb-dev mailing list