[Mapserver-users] no labels on dynamic layer
Frieso ter Haseborg
ter-haseborg at sf-datentechnik.de
Fri Sep 12 02:55:31 PDT 2003
Hi,
I'm just doing some experiments with dynamic layers. Drawing points and
lines works fine, but I don't get any annotations/labels displayed in my
map.
I used the map from the europe-mapscript-example and the code-examples
from postings like
http://mapserver.gis.umn.edu/wilma/mapserver-users/0007/msg00096.html
http://mapserver.gis.umn.edu/data2/wilma/mapserver-users/0203/msg00319.h
tml
Any ideas what I'm doing wrong?
My PHP/MapScript-Code looks like this:
-----------------------------------
[...]
$image=$map->draw();
$layer = $map->getLayerByName( "p" );
$layer->set('status', MS_ON);
$pt = ms_newPointObj();
$pt->setXY( -4100000, 10100000 );
$pt->draw($map, $layer, $image, 0, "Pt1"); // isn't "Pt1" the label to
be drawn????
$pt = ms_newPointObj();
$pt->setXY( 4400000, 10000000 );
$pt->draw($map, $layer, $image, 0, "Pt2");
$image_url=$image->saveWebImage(MS_GIF,1,1,0);
[...]
-----------------------------------
and here the map-file:
-----------------------------------
[...]
LAYER
NAME world
TYPE POLYGON
STATUS ON
DATA europa
LABELITEM "name"
CLASS
OUTLINECOLOR 200 200 200
LABEL
COLOR 0 0 0
POSITION AUTO
END
END
TOLERANCE 10
END
LAYER
NAME p
TYPE POINT
STATUS ON
CLASS
SYMBOL 15
COLOR 255 0 0
SIZE 20
LABEL
COLOR 0 0 0
END
END
END
[...]
-----------------------------------
TIA,
Frieso ter Haseborg
- Software Development -
--
--------------------------------------------------
S&F Datentechnik GmbH&Co.KG
Reimersstr. 41b
26789 Leer, Germany
More information about the MapServer-users
mailing list