[Mapserver-users] ArcView created layer not working in mapscript

Murat Isik muratisik at megatek.com.tr
Thu Dec 18 05:46:01 EST 2003


This is a multi-part message in MIME format.

------=_NextPart_000_07B9_01C3C564.E4909D30
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,
I am trying to make my own tiny, amatuer layer in ArcView 3.x and =
display it in mapscript but I am failing, I will be very glad if anyone =
can help...

This alyer of mine is just a single point at a certain coordinate, with =
a single label. I had learned how to make point layers from this list =
before but when it comes to adding label, I am stuck.

What I do in ArcView 3.x is:

1. Export data into a textfile
2. Choose Table->Add and select your Textfile
3. Choose View->Add Event Theme and select txt-table, the X- and=20
the Y-field.
4. Choose Theme->Convert to shapefile

My text file is:

"X","Y","NAME"
29.0708,40.9678,HELLO

So it is supposed to print thi point at the X and Y and also label it =
with HELLO

The shapefile I create works in Arcview itself but not under =
php/mapscript with this layer definition in the mapfile:

LAYER
  NAME mylayer
  TYPE point
  STATUS ON
  DATA mylayer
  LABELCACHE ON
  LABELITEM 'NAME'
  CLASS
   NAME 'NAME'
   SYMBOL 'circle'
   SIZE 5
   COLOR 64 0 64
    LABEL
      TYPE truetype
#      FORCE true
      FONT arial
      COLOR 64 0 64
      ANGLE AUTO
      POSITION AUTO
      MINSIZE 2
      SIZE 6
   END
  END
END

It gives an error about the NAME column.=20

Any ideas on creating a simple, labelled point layer?

Have a nice day.

Murat Isik

------=_NextPart_000_07B9_01C3C564.E4909D30
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3700.6699" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I am trying to make my own tiny, =
amatuer layer in=20
ArcView 3.x and display it in mapscript but I am failing, I will be very =
glad if=20
anyone can help...</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>This alyer of mine is just a single =
point at a=20
certain coordinate, with a single label. I had learned how to make point =
layers=20
from this list before but when it comes to adding label, I am=20
stuck.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>What I do in ArcView 3.x =
is:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>1. Export data into a textfile<BR>2. =
Choose=20
Table-&gt;Add and select your Textfile<BR>3. Choose View-&gt;Add Event =
Theme and=20
select txt-table, the X- and <BR>the Y-field.<BR>4. Choose =
Theme-&gt;Convert to=20
shapefile</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>My text file is:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial=20
size=3D2>"X","Y","NAME"<BR>29.0708,40.9678,HELLO</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>So it is supposed to print thi point at =
the X and Y=20
and also label it with HELLO</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>The shapefile I create works in Arcview =
itself but=20
not under php/mapscript with this layer definition in the =
mapfile:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>&nbsp; =
NAME&nbsp;mylayer<BR>&nbsp; TYPE=20
point<BR>&nbsp; STATUS ON<BR>&nbsp; DATA mylayer<BR>&nbsp; LABELCACHE=20
ON<BR>&nbsp; LABELITEM 'NAME'<BR>&nbsp; CLASS<BR>&nbsp;&nbsp; NAME=20
'NAME'<BR>&nbsp;&nbsp; SYMBOL 'circle'<BR>&nbsp;&nbsp; SIZE =
5<BR>&nbsp;&nbsp;=20
COLOR 64 0 64<BR>&nbsp;&nbsp;&nbsp; =
LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; TYPE=20
truetype<BR>#&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FORCE=20
true<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FONT=20
arial<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 64 0=20
64<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANGLE=20
AUTO<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION=20
AUTO<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; MINSIZE=20
2<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE 6<BR>&nbsp;&nbsp; END<BR>&nbsp; =

END<BR>END<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It gives an error about the NAME =
column.=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Any ideas on creating a simple, =
labelled point=20
layer?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Have a nice day.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Murat Isik</FONT></DIV></BODY></HTML>

------=_NextPart_000_07B9_01C3C564.E4909D30--




More information about the mapserver-users mailing list