[mapserver-users] How to display WGS84 map in ka-map applicaiton?
devmail at sina.com
devmail at sina.com
Wed Apr 14 03:16:54 PDT 2010
Hi, I am new to mapserver.
I have a mapinfo data file(.tab) in WGS84. After using QGIS export .map file and change layer connect parameter in .map file, I successfully display map using following url.
http://127.0.0.1:8080/cgi-bin/mapserv.exe?MAP=F:/ms4w/apps/testmap/htdocs/testmap.map&SERVICE=WMS&LAYERS=ALL&MODE=MAP
I edit config.php in ka-map application, it can not be displayed correctly. And I convert the mapinfo .tab file into shape file, it failed too.
It seems that ka-map uses non-earth projection . How to display WGS84 data in ka-map? Modify ka-map source code? Or some parameter setup can do?
Thanks.
Following is the .map for shapefile generated by QGIS
# Map file created from QGIS project file F:/Program Files/Quantum GIS Enceladus/myproj/shandong.qgs
# Edit this file to customize for your map interface
# (Created with PyQgis MapServer Export plugin)
MAP
NAME "testmap"
# Map image size
SIZE 500 500
UNITS meters
EXTENT -33.774149 16.403951 71.578722 97.850893
FONTSET '../etc/fonts.txt'
SYMBOLSET '../etc/symbols.txt'
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
END
# Background color for the map canvas -- change as desired
IMAGECOLOR 255 255 255
IMAGEQUALITY 95
IMAGETYPE png
OUTPUTFORMAT
NAME png
DRIVER 'GD/PNG'
MIMETYPE 'image/png'
IMAGEMODE RGBA
EXTENSION 'png'
END
# Legend
LEGEND
IMAGECOLOR 255 255 255
STATUS ON
KEYSIZE 18 12
LABEL
TYPE BITMAP
SIZE MEDIUM
COLOR 0 0 89
END
END
# Web interface definition. Only the template parameter
# is required to display a map. See MapServer documentation
WEB
# Set IMAGEPATH to the path where MapServer should
# write its output.
IMAGEPATH '/tmp/'
# Set IMAGEURL to the url that points to IMAGEPATH
# as defined in your web server configuration
IMAGEURL '/tmp/'
# WMS server settings
METADATA
'ows_title' 'testmap'
'ows_onlineresource' 'http://127.0.0.1:8080/cgi-bin/mapserv.exe?map=F:/ms4w/apps/testmap/htdocs/testmap.map'
'ows_srs' 'EPSG:4326'
END
#Scale range at which web interface will operate
# Template and header/footer settings
# Only the template parameter is required to display a map. See MapServer documentation
TEMPLATE 'fooOnlyForWMSGetFeatureInfo'
END
LAYER
NAME 'test'
TYPE POLYGON
DUMP true
TEMPLATE fooOnlyForWMSGetFeatureInfo
EXTENT -33.774149 16.403951 71.578722 97.850893
DATA 'F:/ms4w/apps/testmap/htdocs/testmap.shp|layerid=0'
METADATA
'ows_title' 'test'
END
STATUS ON
TRANSPARENCY 100
PROJECTION
'proj=longlat'
'ellps=WGS84'
'datum=WGS84'
'no_defs'
END
CLASS
NAME 'test'
STYLE
SYMBOL 0
SIZE 7.0
OUTLINECOLOR 0 0 0
COLOR 4 24 93
END
END
END
END
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100414/19cc8865/attachment.htm>
More information about the MapServer-users
mailing list