UMN MapServer Day 2 - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

UMN MapServer Day 2

Description:

Open TCP PORT 137-139 # nano /etc/sysconfig/iptables. tcp 137:139 ACCEPT ... minx miny maxx maxy. Image coordination. Map coordination. 0,0. 1,1. 1,1. 0,0. Extent. 0,0 ... – PowerPoint PPT presentation

Number of Views:76
Avg rating:3.0/5.0
Slides: 26
Provided by: Fuji217
Category:
Tags: mapserver | umn | day | minx | miny

less

Transcript and Presenter's Notes

Title: UMN MapServer Day 2


1
UMN MapServerDay 2
  • ??.????????? ??????
  • ??????????????

2
System Requirement
  • Linux Fedora Core 6
  • MapServer 4.10.0
  • Folder /ms4

3
Service 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

4
Service samba
  • nano /etc/samba/smb.conf
  • ..
  • security user ? share
  • ..
  • ms4
  • path /ms4
  • writeable yes
  • browseable yes
  • guest ok yes
  • service smb restart

5
Step-1
  • Open Browser ? Address
  • http//host.ip.address/cgi-bin/mapserv
  • No query information to decode.
  • QUERY_STRING is set, but empty

6
Step-2
  • ????? map file
  • /ms4/map/hello1.map

7
Step-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

8
Step-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

9
1 , 1
0 , 0
-1 , -1
10
Co-ordination
  • minx miny maxx maxy

Image coordination
Map coordination
0,0
1,1
1,1
0,0
11
Extent
12
Label Position
UL
UR
UC
CR
cc
CL
LC
LR
LL
Default auto
13
Status ??? Layer ???????
  • DEFAULT ? ???? LAYER ????????
  • on off ? ???? LAYER ????????????????
    mapserv?...layersltlayer namegt
  • LAB
  • 1 ??????? STATUS ??? DEFAULT ???? on off
  • ??????????????????
  • 2 ????? layersh1 ??????? URL
  • ??????????????????

14
LABEL
  • 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

17
SYMBOL
  • 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
18
SYMBOL
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"
19
SYMBOL ??????????
SYMBOL NAME "home" TYPE pixmap IMAGE
"home.gif" END
20
Convert background ??????
??????? backgound ??????? Transparent
convert -transparent white home.gif newhome.gif
21
SYMBOL
??????????? SYMBOL ?????????????????????? SYMBOL
????????? /ms4/symbol/symbol.txt SYMBOL
END SYMBOL END SYMBOL
END
22
SYMBOL
  • ??? TAG SYMBOL ?????? map file
  • ??????????
  • SYMBOLSET "/ms4/symbols/symbol.txt"
  • ????????? layer ??? SYMBOL "home" ?????????

23
BROWSE 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
24
TEMPLATE
  • 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

25
TEMPLATE
  • 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
Write a Comment
User Comments (0)
About PowerShow.com