Johan,
That's the "classic" way of doing it:
layer 1 (line): line symbology
layer 2 (anno): label with point symbol under the label
The "new" way is to use a STYLE object (referencing the point symbol)
inside the LABEL object of the line layer so only one layer required.
Best Regards,
Brent Fraser
On 6/1/2011 1:15 PM, Johan Forsman wrote:
-Original Message-
From: mapserver-users-boun...@lists.osgeo.org [mailto:mapserver-users-
boun...@lists.osgeo.org] On Behalf Of Fawcett, David (MPCA)
Sent: Wednesday, June 01, 2011 10:50 AM
To: mapserver-users@lists.osgeo.org
Subject: [mapserver-users] Hwy Shields
Does anyone have a highway shield example map file and symbol set that
they are willing to share?
Thanks,
David.
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
I did this as one of the first "advanced" mapfile projects when I started with
MapServer, so it probably is both inelegant and incorrect, but I used a line layer for
the roads and an annotation layer for the labels. I don't recall precisely the reason I
did an annotation layer, but it may have had to do with my preferred positioning of the
labels.
Here's an partial extract from the symbol set and mapfile:
# Highway shields
SYMBOL
NAME 'interstate'
TYPE pixmap
IMAGE "interstate.png"
END
LAYER # Freeways at small scale
DATA 'webmaps_LDOTD_2007_hwys'
name freeways_small
type line
OPACITY 100
status on
labelitem "HWY_NUM"
LABELCACHE on
classitem "SHIELD"
MINSCALEDENOM 250001
class
EXPRESSION "I"
NAME "Interstate highways"
style
color 0 92 230
width 3
antialias true
end
style
color 254 254 254
width 1
antialias true
end
end #class
end #layer freeways_small
LAYER # shields and labels for freeways at small scale
DATA 'webmaps_LDOTD_2007_hwys'
name freeways_small_labels
type annotation
OPACITY 100
status on
labelitem "HWY_NUM"
LABELCACHE on
classitem "SHIELD"
MINSCALEDENOM 250001
class
EXPRESSION "I"
style
SYMBOL 'interstate'
end
label
type truetype
antialias true
font arial
size 8
position cc
ANGLE 0
color 254 254 254
partials false
MINDISTANCE 200
MINFEATURESIZE auto
end #label
end #class
end #layer freeways_small_labels
Hope that helps get you started.
Take care,
Johan Forsman
Geologist
Safe Drinking Water Program
Louisiana Department of Health and Hospitals
Telephone: 225.342.7309
Telefax: 225.342.7303
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users
___
mapserver-users mailing list
mapserver-users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/mapserver-users