PointObj draw labels

Kristjan Annus kristjan at TARKVARASTUUDIO.EE
Wed Feb 2 02:55:20 EST 2005


Hi , try this:

$point = ms_newPointObj();
$point->setXY( $markers_x, $markers_y);

$line = ms_newLineObj();
$line->add( $point);

$shape = ms_newShapeObj( MS_SHAPE_POINT);
$shape->add( $line);
$shape->set( 'text', "this is my label");
$shape->draw( $map, $layer, $image, 0, '');

Kristjan Annus

>I can't seem to be ablt to draw the annotation on the dynamic points added
>using $fPoint->draw($map,$points,$image,$class,"Test");
>I hope I do not need a labelitem, because I am drawing the points on an
>empty point shapefile. Here is the mapfile:
>
>Thanks,
>Rene.
>
>$image = $map->draw();
>$class = 0;
>$points = $map->getLayerByName("FLDCHKPTS");
>$points->set("status", MS_ON);
>$fPoint = ms_newPointObj();
>$fPoint->setXY($fDownX[$i],$fDownY[$i]);
>$rtres = $fPoint->draw($map,$points,$image,$class,"Test");
>$fPoint->free();
>
>
>  LAYER
>    NAME "FLDCHKPTS"
>    STATUS ON
>    TYPE POINT
>    MAXSCALE 500000
>    DATA "D:/forestry/xtras/empty"
>    CLASS
>      NAME "Field Check Points"
>      STYLE
>        SYMBOL 7
>        COLOR 0 150 0
>        OUTLINECOLOR 0 0 0
>        SIZE 10
>        MINSIZE 1
>        #MAXSIZE 100
>      END
>      LABEL
>        TYPE BITMAP
>        SIZE LARGE
>        POSITION CR
>        COLOR 0 0 0
>      END
>    END
>  END
>
>



More information about the mapserver-users mailing list