[Chameleon] LocateByAttribute in Postgis

Delfos, Jacob Jacob.Delfos at maunsell.com
Tue Oct 31 19:28:09 EST 2006


Hi Fons,
 
I have only implemented the functionality with PostGIS recently, but I
do believe it should work the way you are using it.
There were some issues with Mapserver queries to PostGIS and quotes in
version 4.10, but I have put a fix in for that last week (additional
quotes around query). On my end, I can do a query on a string attribute
without problems (partial match also works, e.g. 'OLO00' in your case).
But my data statements are very simple. There have been several messages
lately about quotes, and things that don't work like before, so perhaps
it is related somehow..... Try putting quotes everywhere :)
 
Make sure you have the latest version of the widget (> 25 Oct), because
this is when I applied the quote fix.
 
Try what Bart said (capturing the query), and let me know what it says.
By the way, do any queries work for you with this widget?
 
regards,

Jacob
 
 
 
 


________________________________

	From: chameleon-bounces at lists.maptools.org
[mailto:chameleon-bounces at lists.maptools.org] On Behalf Of Fons Arts
	Sent: 31 October 2006 23:08
	To: chameleon at lists.maptools.org
	Subject: [Chameleon] LocateByAttribute in Postgis
	
	

	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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/chameleon/attachments/20061101/6999909e/attachment-0001.html


More information about the Chameleon mailing list