[Chameleon] LocateByAttribute in Postgis

Bart van den Eijnden (OSGIS) bartvde at osgis.nl
Tue Oct 31 12:03:43 EST 2006


Just noticed something else, you are using a string column as the unique 
column. I believe Mapserver cannot deal with this.

Try USING UNIQUE oid instead

Best regards,
Bart

Bart van den Eijnden (OSGIS) schreef:
> Hi Fons,
>
> Jacob can probably answer this one best, but I'll give it a try.
>
> First of all, which version of PHP/Mapscript are you currently running?
>
> Secondly, try and log the query that Mapscript sends to PostGIS at the 
> database, see for instance:
>
> http://www.databasejournal.com/features/postgresql/article.php/3323561
>
> Best regards,
> Bart
>
> Fons Arts schreef:
>>
>> Hi list,
>>
>> I am added the latest widget (from CVS) locatebyattribute to zoom to 
>> values stored in a Postgis database.
>>
>> In this test I’m searching for the value OLO00 A 1037 witch exist in 
>> a view. After clicking the search button I get no results.
>>
>> /Warning: [MapServer Error]: msQueryByAttributes(): No matching 
>> record(s) found. in 
>> E:\ms4w\chameleon\htdocs\widgets\LocateByAttribute\searchresults.phtml 
>> on line 361/
>>
>> /No results found for 'OLO00 A 1037'/
>>
>> /--------------------------------------------------------------------------------/ 
>>
>>
>> / kadastraal nummer aanduid Find /
>>
>> /Limit search to current map extents /
>>
>> My Map file looks like;
>>
>> /LAYER/
>>
>> / CONNECTIONTYPE postgis/
>>
>> / NAME "kadastraal nummer"/
>>
>> / GROUP "Eigendommen"/
>>
>> / CONNECTION 
>> *************************************************************/
>>
>> / DATA "wkb_geometry from (select oid, aanduid, eigenaar, 
>> wkb_geometry from public.v_kadaster where aanduid = 'OLO00 A 1037') 
>> as foo using srid=-1 using unique aanduid"/
>>
>> / TEMPLATE "dummy.htm"/
>>
>> / TOLERANCE 10/
>>
>> / MINSCALE 0/
>>
>> / MAXSCALE 20000/
>>
>> / STATUS default/
>>
>> / TYPE polygon/
>>
>> / METADATA /
>>
>> / SPATIALSEARCH "aanduid"/
>>
>> / END/
>>
>> / CLASS/
>>
>> / NAME 'string'/
>>
>> / SIZE 22/
>>
>> / COLOR 253 239 221 /
>>
>> / outlineCOLOR 255 255 0 /
>>
>> / MINSCALE 0/
>>
>> / END/
>>
>> / END /
>>
>> / END # LAYER/
>>
>> / /
>>
>> Anybody tips
>>
>> Thanks
>>
>> Fons
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Chameleon mailing list
>> Chameleon at lists.maptools.org
>> http://lists.maptools.org/mailman/listinfo/chameleon
>>   
>
>


-- 
Bart van den Eijnden
OSGIS, Open Source GIS
bartvde at osgis.nl
http://www.osgis.nl



More information about the Chameleon mailing list