[mapserver-users] inserting features by mapscript_php
Michel M. dos Santos
michel at omnisystem.com.br
Tue Apr 23 07:40:51 PDT 2002
Hello,
I have been inserting features inside layers in file .map and it working
well. See:
LAYER #dash
CLASS
NAME "dash"
COLOR 0 0 255
SIZE 1
SYMBOL "dash-long"
END
NAME "dash"
STATUS ON
TYPE LINE
FEATURE
POINTS -49.257175 -25.476774 -49.257644 -25.479567
-49.253964 -25.479262 -49.253644 -25.477567
END
END #dash
When I try do it by mapscript_php , it doesn't work. See:
$figura2 = ms_newShapeObj(MS_SHAPE_LINE); <--- here
for($i=0;$i<$N;$i++){
$figura = ms_newShapeObj(MS_SHAPE_POINT);
$ponto_obj = ms_newLineObj();
$ponto_obj->add($ponto[$i]);
$figura->add($ponto_obj);
$figura->set("text",$label[$i]);
$layer_rota = $map->getLayerByName("rota");
$layer_rota->addFeature($figura);
// adicionando tracejado
$figura2->add($ponto_obj); <--- here
}
$layer_dash = $map->getLayerByName("dash"); <---- here
$layer_dash->addFeature($figura2); <----- here
The problem is the TYPE LINE, with TYPE POINT works.
Thanks for any help,
--
[]'s
Michel M. dos Santos
More information about the MapServer-users
mailing list