Flavio,
Thanks for the example!
As I wrote to Daniel (I replied to him, instead of the list, sorry):
This works, sometimes. I know get this nice error:
msDrawMap(): Image handling error. Failed to draw layer named 'topo'.
msOGRGetValues(): OGR error. Invalid field index!?!
For *some* layers. Others do seem to work...
Any ideas?
--
Jelmer
Example, if those are MapInfo Text Features (see LABELITEM and
LABELANGLEITEM):
LAYER
NAME "Streets fro Labeling"
TYPE ANNOTATION
MINSCALE 0
MAXSCALE 300
SYMBOLSCALE 2000
STATUS ON
CONNECTIONTYPE OGR
CONNECTION "..\data\streets.TAB"
LABELITEM "OGR:LabelText"
LABELANGLEITEM "OGR:LabelAngle"
CLASS
NAME "Street Labels"
COLOR -1 -1 -1
LABEL
ANTIALIAS TRUE
TYPE TRUETYPE
FONT arial
MINSIZE 1
SIZE 2
COLOR 0 0 0
END
END
END
Mit freundlichem Gruss / Best Regards
Flavio Hendry
----------------------------------------------------------------
TYDAC Web-Site: http://www.tydac.ch
TYDAC MapServer: http://www.mapserver.ch
----------------------------------------------------------------
############ Mit freundlichen Gruessen / Kind Regards
############ mailto:[EMAIL PROTECTED]
############ TYDAC AG - http://www.tydac.ch
#### #### Geographic Information Solutions
#### #### Luternauweg 12 -- CH-3006 Bern
############ Tel +41 (0)31 368 0180 - Fax +41 (0)31 368 1860
----------------------------------------------------------------
-----Original Message-----
From: Jelmer Baas <[EMAIL PROTECTED]>
To: MAPSERVER-USERS@LISTS.UMN.EDU
Date: Thu, 13 Sep 2007 12:10:16 +0200
Subject: [UMN_MAPSERVER-USERS] Question about Labels
Hello everyone,
It's been quite a while since I posted here, everything went pretty
smooth so far.
Now I have a small problem with labels. We have MapInfo .TAB files,
which are converted from AutoCAD drawings (meaning everything is in
one
layer).
When I open one of these files in MapInfo, I can see labels on some
places. When I draw the map with MapServer, I see only the
(poly)lines.
So, I added an extra layer of type Annotation. This, by default,
doesn't
show me any layers. So I need to add LABELITEM, but I have no idea
what
layers need to be labeled. Also, this changes with every file that's
being drawn.
Does anyone know how to tell MapServer to draw labels "The MapInfo"
way?
My current layer definition:
LAYER
NAME topo
MINSCALE 1
MAXSCALE 3000
STATUS ON
Type LINE
CONNECTIONTYPE OGR
CONNECTION "e:\topo.tab"
STYLEITEM "AUTO"
Class
End #CLASS
End #LAYER
LAYER
NAME topo
MINSCALE 1
MAXSCALE 3000
LABELMAXSCALE 50000
STATUS ON
Type ANNOTATION
CONNECTIONTYPE OGR
CONNECTION "e:\topo.tab"
CLASS
LABEL
COLOR 100 0 0
POSITION LR
SIZE MEDIUM
END #label
END #CLASS
End #LAYER
Any help would be greatly appreciated!
With kind regards,
Jelmer Baas
Speer IT B.V.