adding point on-line

Javier Mart ín javiermartin at NETSYSTEMSI.COM
Tue Nov 30 05:37:10 EST 2004


Hi all,
   I'm working with phpMapScript 4.2.5, maplab 2.2 and gmapfactory. I'm
trying to add a point in my map, but it is no showed.
   My Map File:

   LAYER
    NAME "puntos"
    STATUS ON
    TYPE POINT
    CLASS
      NAME "puntos"
      STYLE
        SYMBOL 2
        COLOR 0 0 0
        SIZE 10
        MINSIZE 10
        MAXSIZE 100
      END
    END
  END

   And my Code:
        $mapa = $oMapSession->oMap;
 $capa = $mapa->getLayerByName("puntos");
 $img = $mapa->draw();
 $punto = ms_newPointObj();
 $punto->setXY($pxX,$pyY);
 $punto->draw($mapa,$capa,$img,0,'');
 $szCurrentState = $oMapSession->saveState();

    What wrong in than code???

     If i do:
        $mapa = $oMapSession->oMap;
 $capa = $mapa->getLayerByName("puntos");
 $img = $mapa->draw();
 $punto = ms_newPointObj();
 $punto->setXY($pxX,$pyY);
 $punto->draw($mapa,$capa,$img,0,'hola');
 echo $img->saveWebImage();

      the image generated by: $img->saveWebImage(); not show either the
point. why???????
       Thanks to all.



More information about the mapserver-users mailing list