
464
|
Chapter 8, Building the Geospatial Web
#91 Build Interactive Web-Based Map Applications
HACK
Now we can add another layer for our coffee shop, after the coffee_wifi
symbol and before our final end tag:
layer
name beehive
type point
status default
class
color 0 0 255
symbol "coffee_wifi"
size 15
label
position ur
size medium
color 0 0 255
outlinecolor 255 255 255
end
end
feature
points -79.98403 40.42775 end
text "Beehive"
end
end
Note how we use the coffee_wifi symbol that we defined earlier, but we set
the size and color here. We also set the position of the label to
ur, or upper
right of the symbol.
The feature section defines an individual point. We can add multiple fea-
ture blocks, each with the points (longitude first, as usual) and text (name or
label). You should now see a blue dot labeled “Beehive” on the South Side of
Pittsburgh, as shown in Figure 8-12.
MapServer does a heck of a lot more than this: raster layers, on-the-fly
reprojection, automatic labeling, TrueType fonts, layer queries, attribute fil-
tering, database lookups, and more. Obviously, the next step is to tailor the
images to your liking by tweaking your map file and the corresponding
HTML. We’ll look a little more into this in “Map Wardriving (and other!)
Data with MapServer”
[Hack #92].
See Also
http://terrasip.gis.umn.edu/projects/tutorial/
MapServer tutorial
http://mapserver.gis.umn.edu/doc/getstarted-howto.html
Getting ...