[mapserver-users] problem with mapscript/php
Stepan Kafka
stepan.kafka at centrum.cz
Thu Apr 25 23:00:41 PDT 2002
You make only a one-point line object for each line. Try to change the
script as follows:
$figura = ms_newShapeObj(MS_SHAPE_LINE); <-- shape type LINE
$ponto_obj = ms_newLineObj(); <- object line
for($i=0;$i<$N;$i++){
$ponto_obj->add($ponto[$i]); <- get the point
}
$figura->add($ponto_obj); <- put in the shape
$layer = $map->getLayerByName("dash"); <- get the layer to put shape
$layer->addFeature($figura); <- put shape in layer
Stepan Kafka
>
>
> Can anyone help me ?
>
> I'm get crazy with this !!!
>
> --
> []'s
> Michel M. dos Santos
>
>
> Em Qua 24 Abr 2002 16:08, Michel M. dos Santos escreveu:
> > Hi,
> >
> > I'm with a problem with mapscript php. I try putting a
> shape line, but it
> > doesn't draw. If I change the type to POINT, the points are draw, when I
> > put the type to LINE , the line aren't draw.
> >
> > Can anyone help me.
> >
> > Map file:
> >
> > ##################################### OK dash
> > LAYER #dash
> >
> > CLASS
> > NAME "dash"
> > COLOR 0 0 255
> > SIZE 5
> > SYMBOL "dash-long"
> > END
> >
> > NAME "dash"
> > STATUS ON
> > TYPE LINE <--- if I change to POINT , the points are draw.
> >
> > END #dash
> > #################################### OK dash
> >
> > code php:
> >
> > -----------8<--------------------------------------
> > $figura = ms_newShapeObj(MS_SHAPE_LINE); <-- shape type LINE
> >
> > for($i=0;$i<$N;$i++){
> >
> > $ponto_obj = ms_newLineObj(); <- object point
> > $ponto_obj->add($ponto[$i]); <- get the point
> > $figura->add($ponto_obj); <- put in the shape
> > }
> >
> > $layer = $map->getLayerByName("dash"); <- get the layer to put shape
> > $layer->addFeature($figura); <- put shape in layer
> >
> > ----------8<--------------------------------------
> >
> > --
> > []'s
> > Michel M. dos Santos
>
>
More information about the MapServer-users
mailing list