[Cartoweb-users] Error when using mapOverlay plugin. (UNCLASSIFIED)

Cowart, Donald Z SAJ Contractor Donald.Z.Cowart at saj02.usace.army.mil
Fri Nov 17 16:01:54 EST 2006


Classification:  UNCLASSIFIED 
Caveats: NONE
 
Problem Solved...

 

It seems that the layer in the mapfile should be of the same 'connectiontype'
as the layer trying to be overlay'ed.  In the mapfile the data statement
pointed to a shapefile.  By removing the 'data' statement in the mapfile and
adding 'connectiontype postgis', it seems to have fixed the problem.

 

--Donald

 

 

Donald Z Cowart

SAJ GIS Web Architect

904-232-1215

Donald.z.cowart at saj02.usace.army.mil

  _____  

From: cartoweb-users-bounces at lists.maptools.org
[mailto:cartoweb-users-bounces at lists.maptools.org] On Behalf Of Cowart,
Donald Z SAJ Contractor
Sent: Friday, November 17, 2006 3:14 PM
To: cartoweb-users at lists.maptools.org
Subject: [Cartoweb-users] Error when using mapOverlay plugin. (UNCLASSIFIED)

 

Classification: UNCLASSIFIED 

Caveats: NONE

Hello All,

 

I am trying to use the mapOverlay plugin to draw data from a SQL query onto a
layer.

 

>From my ServerMyplugin.php:

public function handlePreDrawing($request) {

                        $layer = new LayerOverlay();

                        $layer->name = "block_groups_pl";

                        $layer->connectiontype = "postgis";

                        $layer->connection = "user=USER password=PASSWORD
dbname=DBNAME host=HOSTNAME port=5432";

                        $layer->classitem = "hpdif_class";

                        $layer->data = "shape from ( SELECT mb.shape as
shape, mb.roco as roco_id......

                        $mapOverlay
=$this->serverContext->getPluginManager()->mapOverlay;

                        $mapOverlay->updateMap($layer);

 

The SQL query works if defined in a map file, but I am trying to set several
parts of it as user defined variables.  I edited the connection statement for
public dissemination.

 

However the error message I get is:

 

class:   SoapFaultWrapper

message:   Mapserver error: Error in msDrawMap(): Failed to draw layer named
'block_groups_pl'.

 

Error in msSHPOpenFile():
(/var/www/geoblaze/cartoweb3/projects/c111_sc2/server_conf/c111_sc2/shape
from ( SELECT mb.shape as shape, mb.roco as roco_id,.....

 

 

This does work if I replace the SQL query with the path to a shape file.  Is
there something else I need to do to get this to work?  According to the
documentation it should function as presented.

 

Thank you,

 

--Donald

 

 

Donald Z Cowart

SAJ GIS Web Architect

904-232-1215

Donald.z.cowart at saj02.usace.army.mil

 

Classification: UNCLASSIFIED 

Caveats: NONE

 
Classification:  UNCLASSIFIED 
Caveats: NONE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20061117/61b04fc0/attachment-0001.html


More information about the Cartoweb-users mailing list