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

Cowart, Donald Z SAJ Contractor Donald.Z.Cowart at saj02.usace.army.mil
Fri Nov 17 15:13:40 EST 2006

Classification:  UNCLASSIFIED 
Caveats: NONE
Hello All,


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


>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......




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


Error in msSHPOpenFile():
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 Z Cowart

SAJ GIS Web Architect


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


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

More information about the Cartoweb-users mailing list