zhyiwww
          用平實的筆,記錄編程路上的點點滴滴………
          posts - 536,comments - 394,trackbacks - 0
          在windows下面配置mapserver,用shp做數(shù)據(jù)源,總是出現(xiàn)如下的錯誤,
          loadLayer(): Unknown identifier. Parsing error near (:):(line 46)
          嘗試多次也沒有找到結(jié)果,最后,找到了。
          主要是在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

          這個就是正確的配置,僅僅是引號的差別。




          |----------------------------------------------------------------------------------------|
                                     版權(quán)聲明  版權(quán)所有 @zhyiwww
                      引用請注明來源 http://www.aygfsteel.com/zhyiwww   
          |----------------------------------------------------------------------------------------|
          posted on 2009-02-20 17:40 zhyiwww 閱讀(526) 評論(0)  編輯  收藏 所屬分類: gis
          主站蜘蛛池模板: 灵石县| 什邡市| 大洼县| 宿州市| 平阳县| 墨玉县| 阿拉善右旗| 金川县| 平遥县| 吉林省| 平顶山市| 九寨沟县| 大方县| 高要市| 邵阳县| 祁阳县| 阳春市| 武宁县| 淮滨县| 江西省| 九台市| SHOW| 巴塘县| 霍山县| 大港区| 蕉岭县| 定襄县| 普宁市| 静乐县| 京山县| 额尔古纳市| 绥芬河市| 两当县| 双鸭山市| 绥宁县| 茂名市| 龙州县| 镇宁| 绥棱县| 宝清县| 威海市|