[Mapserver-users] PHP_MAPSCRIPT40 ANNOTATION TEXT PROBLEM
llizzff
llizzff
Mon Jun 30 19:57:12 PDT 2003
Hello everyone
I want to get the annotation text by run php_mapscript.
When I use the STYLEITEM "AUTO",The mapsever will render
the annotation text but it's not expected.However,once the
STYLEITEM "AUTO" is annotated,there will be only some dots
displayed.
When the LABLEITEM or CLASSITEM was used in the layer,
The followed will be reported:
Warning: MapServer Error in msDrawMap(): Failed to draw layer named
'text'. in c:\apache\htdocs\temp\index.php on line 8
When I use php_mapscript_37.dll
The error report will be this :
Warning: MapServer Error in msOGRLayerInitItemInfo(): Invalid Field name:
name in c:\apache\htdocs\temp\index.php on line 8
The code is followed.
Is there somebody can help me? Cordially!
TIA
JACK
Mapfile:
NAME FIRSTMAP
SIZE 800 800
STATUS ON
EXTENT 797400.424232 791289.423886 867030.108732 860768.523756
UNITS meters
IMAGECOLOR 255 255 255
INTERLACE ON
FONTSET etc/fonts.txt
WEB
IMAGEPATH "C:\Apache\htdocs\model\map\"
IMAGEURL "/model/map/"
END
LAYER
NAME "text"
TYPE point
STATUS ON
CONNECTIONTYPE OGR
CONNECTION "C:\aa\placenm_text_t7.TAB"
#STYLEITEM "AUTO"
#LABELITEM "name"
#CLASSITEM "NAME"
CLASS
COLOR 110 50 100
OUTLINECOLOR 200 200 200
LABEL
ANGLE AUTO
SIZE 80
TYPE TRUETYPE
COLOR 255 0 0
SHADOWCOLOR 255 255 230
SHADOWSIZE 1 1
FONT fritqat
ANTIALIAS TRUE
POSITION AUTO
BUFFER 10
MINDISTANCE 20
END
END
END
END
index.php:
<?php
dl("php_mapscript_40.dll");
$map_path="C:\Apache\htdocs\\temp\study.map";
$map = ms_newMapObj($map_path);
$image=$map->draw();
$image_url=$image->saveWebImage(MS_PNG,1,1,0);
?>
<HTML>
<HEAD>
<TITLE>Example 1: Displaying a map</TITLE>
</HEAD>
<BODY>
<table border="1" method = "post" action="<?php $PHP_SELF?>">
<tr>
<td width=400 height = 400>
<input type="image" name =first SRC=<?php echo $image_url; ?> >
</td>
</tr>
</table>
</BODY>
</HTML
--http://www.eyou.com
--Îȶ¨¿É¿¿µÄÃâ·Ñµç×ÓÐÅÏä ÓïÒôÓʼþ Òƶ¯ÊéÇ© ÈÕÀú·þÎñ ÍøÂç´æ´¢...ÒÚÓÊδ¾¡
More information about the MapServer-users
mailing list