Title: UMN MapServer Day 2
1UMN MapServerDay 2
- ??.????????? ??????
- ??????????????
2System Requirement
- Linux Fedora Core 6
- MapServer 4.10.0
- Folder /ms4
3Service samba
- Open TCP PORT 137-139
- nano /etc/sysconfig/iptables
- ..
- tcp 137139 ACCEPT
- ..
- service iptables restart
- chmod ow -R /ms4
- Map Network Drive M
- \\host.ip.address\ms4
4Service samba
- nano /etc/samba/smb.conf
- ..
- security user ? share
- ..
- ms4
- path /ms4
- writeable yes
- browseable yes
- guest ok yes
- service smb restart
5Step-1
- Open Browser ? Address
- http//host.ip.address/cgi-bin/mapserv
- No query information to decode.
- QUERY_STRING is set, but empty
6Step-2
- ????? map file
- /ms4/map/hello1.map
-
-
7Step-2
/ms4/map/hello1.map
- MAP
- NAME "Hello1_"
- SIZE 400 400
- IMAGECOLOR 200 200 200
- IMAGETYPE png
- EXTENT -1 -1 1 1
- LAYER
- NAME "h1"
- STATUS default
- TYPE point
- FEATURE
- POINTS 0 0 END
- TEXT "Hello, world"
- END
8Step-2
/ms4/map/hello1.map
- CLASS
- STYLE
- COLOR 255 0 0
- END
- LABEL
- TYPE bitmap
- END
- END
- END
- END
- Open Browser ? http//host.ip.address/cgibin/mapse
rv?map/ms4/map/hello1.mapmodemap -
91 , 1
0 , 0
-1 , -1
10Co-ordination
Image coordination
Map coordination
0,0
1,1
1,1
0,0
11Extent
12Label Position
UL
UR
UC
CR
cc
CL
LC
LR
LL
Default auto
13Status ??? Layer ???????
- DEFAULT ? ???? LAYER ????????
- on off ? ???? LAYER ????????????????
mapserv?...layersltlayer namegt - LAB
- 1 ??????? STATUS ??? DEFAULT ???? on off
- ??????????????????
- 2 ????? layersh1 ??????? URL
- ??????????????????
-
14LABEL
- COLOR R G B
- OUTLINECOLOR R G B
-
LABEL TYPE truetype FONT
"arial" SIZE 7 COLOR 0 0
200 POSITION auto END
15???? LABEL ???????????
- /ms4/font/tahoma.ttf
- ????? font.list
- ?????????? map file
- MAP Object
- FONTSET /ms4/font/font.list
- LABEL Object
-
LABEL TYPE truetype FONT
tahoma" SIZE 18 COLOR 0 0
200 POSITION auto END
ENCODING tis-620 ANGLE 45,-45,90,90
16???? LABEL ???????????
- ls /ms4/fonts
- tahoma.ttf
- nano /ms4/fonts/fonts.list
- tahoma tahoma.ttf
17SYMBOL
- POINTS 0 0 END
- ???????????????? ??? SYMBOL ?????????
SYMBOL NAME "circle" FILLED true TYPE
ellipse POINTS 1 1 END END STYLE SYMBOL
"circle" SIZE 30 COLOR 255 0 0 END
18SYMBOL
SYMBOL NAME "triangle" TYPE vector POINTS 0 2
1 0 2 2 0 2 END END STYLE SYMBOL "triangle"
COLOR 255 0 0 END
??? SYMBOL "triangle" ??? "circle"
19SYMBOL ??????????
SYMBOL NAME "home" TYPE pixmap IMAGE
"home.gif" END
20Convert background ??????
??????? backgound ??????? Transparent
convert -transparent white home.gif newhome.gif
21SYMBOL
??????????? SYMBOL ?????????????????????? SYMBOL
????????? /ms4/symbol/symbol.txt SYMBOL
END SYMBOL END SYMBOL
END
22SYMBOL
- ??? TAG SYMBOL ?????? map file
- ??????????
- SYMBOLSET "/ms4/symbols/symbol.txt"
- ????????? layer ??? SYMBOL "home" ?????????
23BROWSE MODE
- http//localhost/cgi-bin/mapserv?maphello1.mapmo
debrowse
Browse mode ???????????? .png ???? .jpg
?????????????? folder ?????????? WEB
IMAGEPATH '/ms4/tmp/' IMAGEURL '/ms4/tmp/'
TEMPLATE '/hello-templ.html' END
24TEMPLATE
- hello-templ.html (Version 1)
- lthtml gt
- ltheadgt
- lttitlegttemplate for map browse modelt/titlegt
- lt/headgt
- ltbodygt
- ltimg src img /gt
- lt/bodygt
- lt/htmlgt
25TEMPLATE
- hello-templ.html (Version 2)
- lthtml gt
- ltheadgt
- lttitlegttemplate for map browse modelt/titlegt
- lt/headgt
- ltbodygt
- ltimg src img /gt
- ltbrgt
- Scale scale
- lt/bodygt
- lt/htmlgt