[mapserver-users] on Mapserver and php5_MapScript

Eduardo Arévalo earevaloch at gmail.com
Fri Jan 9 14:27:12 EST 2009


As I write this line is highlighted in black php5_MapScript


code in mapfile
LAYER
    NAME        Peru_dep
    DATA        "departamentos.shp"
    STATUS      ON
    TYPE        POLYGON
    CLASSITEM   NOMB_DEP

      CLASS
        NAME            "LIMA"
        *EXPRESSION      /LIMA/*
        STYLE
        COLOR   200 150 2
        OUTLINECOLOR    0 0 0
      END
    END
y los quiero pasar a PHP
version php


coce
// Creamos un Layer dentro de nuestro MapObj y seteamos sus propiedades
 $jLayer = ms_newLayerObj($jMap);
 $jLayer->set( "name", "Peru_dep");
 $jLayer->set( "type", MS_LAYER_POLYGON);
 $jLayer->set( "status", MS_ON);
 $jLayer->set( "data", "departamentos.shp");
 $jLayer->set( "classitem", "NOMB_DEP");

 //Creamos un classObj dentro del LayerObj
 $jClass = ms_newClassObj($jLayer);
 $jClass->set( "name", "LIMA");
 *$jClass->set( "Expression", "/LIMA/");*

 //Creamos un styleObj dentro del classObj
 $jStyle = ms_newStyleObj($jClass);
 $jStyle->color->setRGB(200, 150, 2);
 $jStyle->outlinecolor->setRGB(200, 200, 200);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/mapserver-users/attachments/20090109/3ae4445e/attachment-0001.html


More information about the mapserver-users mailing list