You are right that there is no generic version that works with every type of layer source. One of the reasons why it is like it is was that I first started with the function for "SELECT OPTIONS" and added suggest functions later. And for SELECT it was necessary to specify that list independent of layer data.
A second reason is that I needed a flexible solution for the suggest working with regex'es. And the regex of Mapserver is both limited and missing documentation (it might be basic Posix regex). Since I only use shapefiles and PostGIS layers for vectors I kept it like that. Just to give you a real world example of Italian street names: you can have the data like via Roma piazza Roma via Mario Rosetti via Ferogato the current function allows to fairly easy specify the search in a way that the user types in 'ro' and just finds the first 2, but not 3 and 4, or the first 3 and not the 4th. That's more difficult to achieve with MS regex where already the case insensitive search is a nightmare. If you would like to add a generic possibility doing all search through Mapscript functions then I can have a look for the basic requirements and you can add the function in suggest.php. I will see when I will find time to have a look at it since I first have to understand again the logic behind that all... If you need to have it already now you could just have a batch/cron job running that every night converts the mapinfo to a shapefile using ogr2ogr, and use the dbf of this shape. Just an idea for a quick workaround. For large datasets I think the only viable solution is a PostGIS table anyway, since parsing through shapes or mapinfo via Mapscript sequentially (for every typing of the user...) will be a bit slow. armin Alessandro Pasotti wrote: > Il 19:39, giovedì 22 marzo 2007, Armin Burger ha scritto: >> Alessandro >> >> What you ask for is possible with the current code, one has to specify >> the dBase file (usually the dbf part of a shapefile), > > In my case it is a mapinfo file (not my choice :( ), I don't think the DBF > will work (without conversion, but this would mean forcing the customer to do > this conversion and another file upload each time the mapinfo file changes, > this upload is done from the customer with a GUI at the moment). > > Don't you think that a more "abstract" function based on mapscript (that can > read all its supported file formats) could do the trick for most mapserver > supported file types? > > I volunteer to write this function if you think it is worth. > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ pmapper-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pmapper-users
