[Cartoweb-dev] IDrecentering by name

Fabio D'Ovidio dovidio at planetek.it
Thu Oct 5 08:30:41 EDT 2006


Could help me with cartoweb 3.3 about Location IdRecenter by Name ? 

Thanks in advance ! 

This is my client\location.ini file : 

; if true, shows recenter on (x,y) form 
recenterActive = true 

; if true, shows scale form 
scalesActive = true 

;showRefMarks = true 

; if true, shows shortcuts form 
shortcutsActive = true 

; if true, shows recenter on id form 
idRecenterActive = true 

; the list of layers which will be shown on the recenter selection list 
; if this list is not set, all layers are proposed in the list 
idRecenterLayers = POZZI_S, POZZI_NS 

; if current scale is above this limit, measure unit is km else m 
scaleUnitLimit = 10000 

; ratio for panning, default is 1.0 
panRatio = 0.75 

;tools templating 
groupPlugin = 1 
groupFullextent = 1 


;crosshairSymbol = 1 
;crosshairSymbolSize = 4 
;crosshairSymbolColor= = 255,255,255 


;name search configuration 
dsn = pgsql://postgres:agosto@localhost:5432/edit_db 

;odbc://postgres@/PostgreSQL?cursor=SQL_BINARY 

;dsn = 
pgsql://@DB_USER@:@DB_PASSWD@@@DB_HOST@:@DB_PORT@/@DB_SEARCH
_NAME@ 


;dsn = pgsql://postgres:agosto@tcp(localhost:5432)/edit_db 

;pgsql://demo:demo@localhost/demo_plugins"; 

I have abilitated my cartoclient template like this : 

... 

{if $id_recenter_active|default:''} 
 {$id_recenter} 
 {/if} 
........ 


The MEATADATA in the map file are : 

METADATA 
 "id_attribute_string" "gid|string" 
 "query_returned_attributes" "provincia comune id tipo_pozzo condizioni_manto # 
etcetc... 
 "exported_values" "recenter_name_string,id_attribute_string" 
 "recenter_name_string" "id|string" 
END 


The error is (When I search by id field) : 

Failure 
class: SoapFaultWrapper 
message: Mapserver error: Error in msDrawMap(): Failed to draw 
layer named 'POZZI_S'. 
Error in prepare_database(): Error executing POSTGIS DECLARE (the 
actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT 
gid::text,id::text,asbinary(force_collection(force_2d(the_geom)),'ND
R'),gid::text from pozzi as foo WHERE (gid = 'gid in ('4 AIM')') and 
(the_geom && setSRID( 'BOX3D(561693.836666667 
4562025.38333333,597246.236666666 4586912.06333333)'::BOX3D,-1) )' 


Postgresql reports the error as 'ERROR: syntax error at or near "4" 
at character 166 
'


More Help:


Error with POSTGIS data variable. You specified '<check your .map 
file>'. 
Standard ways of specifiying are : 
(1) 'geometry_column from geometry_table' 
(2) 'geometry_column from (<sub query>) as foo using unique <column 
name> using SRID=<srid#>' 


Make sure you put in the 'using unique <column name>' and 'using 
SRID=#' clauses in. 



For more help, please see 
http://postgis.refractions.net/documentation/ 



Mappostgis.c - version of Jan 23/2004. 


Backtrace: 

file: 222 - 
c:\Inetpub\wwwroot\cartoweb3\coreplugins\images\server\ServerImages.
php 
call: ServerContext->checkMsErrors() 

file: 305 - c:\Inetpub\wwwroot\cartoweb3\server\Cartoserver.php 
call: ServerImages->drawMainmap(Object(Images)) 

file: 337 - c:\Inetpub\wwwroot\cartoweb3\server\Cartoserver.php 
call: Cartoserver->doGetMap(Object(MapRequest)) 

file: 358 - c:\Inetpub\wwwroot\cartoweb3\server\Cartoserver.php 
call: Cartoserver->callWithExceptionCheck("doGetMap", 
Object(MapRequest)) 

file: 81 - c:\Inetpub\wwwroot\cartoweb3\server\MapResultCache.php 
call: Cartoserver->cacheGetMap(Object(MapRequest)) 

file: 186 - c:\Inetpub\wwwroot\cartoweb3\server\MapResultCache.php 
call: MapResultCache->getMapResultFromServer(Object(MapRequest)) 

file: 368 - c:\Inetpub\wwwroot\cartoweb3\server\Cartoserver.php 
call: MapResultCache->getMap(Object(MapRequest)) 

file: 104 - 
c:\Inetpub\wwwroot\cartoweb3\client\CartoserverService.php 
call: Cartoserver->getMap(Object(MapRequest)) 

file: 158 - 
c:\Inetpub\wwwroot\cartoweb3\client\CartoserverService.php 
call: CartoserverService->callDirect("getMap", Object(MapRequest)) 

file: 226 - 
c:\Inetpub\wwwroot\cartoweb3\client\CartoserverService.php 
call: CartoserverService->callFunction("getMap", Object(MapRequest)) 

file: 776 - c:\Inetpub\wwwroot\cartoweb3\client\Cartoclient.php 
call: CartoserverService->getMap(Object(MapRequest)) 

file: 892 - c:\Inetpub\wwwroot\cartoweb3\client\Cartoclient.php 
call: Cartoclient->getMapResultFromRequest(Object(MapRequest)) 

file: 1027 - c:\Inetpub\wwwroot\cartoweb3\client\Cartoclient.php 
call: Cartoclient->doMain() 

file: 38 - c:\Inetpub\wwwroot\cartoweb3\htdocs\client.php 
call: Cartoclient->main() 

file: 3 - c:\Inetpub\wwwroot\cartoweb3\htdocs\Pozzi.php 
call: require_once("c:\Inetpub\wwwroot\cartoweb3\htdocs\client.php") 

Why ?? 


Thank you !! 
******************************************************************************************** 


Ing. Fabio D'Ovidio 
WebGIS Staff 
Planetek Italia Srl 
via Massaua, 12 - 70123 Bari - Italy 
web : http ://www.planetek.it 
e-mail : dovidio at planetek.it 

******************************************************************************************** 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: WPM$3C3A.PM$
Type: application/octet-stream
Size: 24621 bytes
Desc: Mail message body
Url : http://lists.maptools.org/pipermail/cartoweb-dev/attachments/20061005/2c7b6efd/WPM3C3A-0001.obj


More information about the Cartoweb-dev mailing list