在windows下面配置mapserver,用shp做数据源,总是出现如下的错误,
loadLayer(): Unknown identifier. Parsing error near (:):(line 46)
尝试多次也没有找到结果,最后,找到了。
主要是在map的文件
我的错误的配置是:
# Map file generated by QGIS version 0.7.4
# Edit this file to customize for your interface
# Not all sections are complete. See comments for details.
NAME road
STATUS ON
# Map image size. Change size as desired
SIZE 256 256
#
# Start of web interface definition. Only the TEMPLATE parameter
# must be specified to display a map. See Mapserver documentation
#
WEB
# HEADER
# TEMPLATE
# FOOTER
MINSCALE 1
MAXSCALE 8
# Set IMAGEPATH to the path where mapserver should
# write its output
IMAGEPATH 'd:\\tmp\\'
# Set IMAGEURL to the url that points to IMAGEPATH
#IMAGEURL '/map_output/'
END
PROJECTION
"init=epsg:4326"
END
# Extent based on full extent of QGIS view
EXTENT 115.275 39.2204 117.475 40.9462
UNITS METERS
IMAGECOLOR 255 255 255
IMAGETYPE gif
# Projection definition
# Projections are not currenlty supported. If desired, add your own
# projection information based on Mapserver documentation.
#
LAYER
NAME road
TYPE LINE
STATUS ON
DATA d:\\wwwroot\\shp\\Rbeijing.shp CLASS
NAME "ROAD"
# TEMPLATE
OUTLINECOLOR 112 238 238
END
END
END # Map File
正确的配置是:
# Map file generated by QGIS version 0.7.4
# Edit this file to customize for your interface
# Not all sections are complete. See comments for details.
NAME road
STATUS ON
# Map image size. Change size as desired
SIZE 256 256
#
# Start of web interface definition. Only the TEMPLATE parameter
# must be specified to display a map. See Mapserver documentation
#
WEB
# HEADER
# TEMPLATE
# FOOTER
MINSCALE 1
MAXSCALE 8
# Set IMAGEPATH to the path where mapserver should
# write its output
IMAGEPATH 'd:\\tmp\\'
# Set IMAGEURL to the url that points to IMAGEPATH
#IMAGEURL '/map_output/'
END
PROJECTION
"init=epsg:4326"
END
# Extent based on full extent of QGIS view
EXTENT 115.275 39.2204 117.475 40.9462
UNITS METERS
IMAGECOLOR 255 255 255
IMAGETYPE gif
# Projection definition
# Projections are not currenlty supported. If desired, add your own
# projection information based on Mapserver documentation.
#
LAYER
NAME road
TYPE LINE
STATUS ON
DATA "d:\\wwwroot\\shp\\Rbeijing.shp" CLASS
NAME "ROAD"
# TEMPLATE
OUTLINECOLOR 112 238 238
END
END
END # Map File
这个就是正确的配置,仅仅是引号的差别。
|----------------------------------------------------------------------------------------|
版权声明 版权所有 @zhyiwww
引用请注明来源 http://www.blogjava.net/zhyiwww
|----------------------------------------------------------------------------------------|
posted on 2009-02-20 17:40
zhyiwww 阅读(514)
评论(0) 编辑 收藏 所属分类:
gis