Hello,
I want to have a Shapefile (as a WFS Layer) on an OpenStreetMap Map.
I achieved to have the display of the world map with OpenStreetMap alone on my browser, and the display of the Shapefile on my browser as a PNG (non-dynamic).
But I don't manage to have the Shapefile on the OpenStreetMap background. I tried to reproject and change the syntax but it hasn't resolve my problem.
I show you my last codes.
HTML and OpenLayers Code :
Hello World #map{ height:900px; width:100%; }
Mapfile code :
MAP NAME "WFS_server" STATUS ON SIZE 800 800 #SYMBOLSET "../etc/symbols.txt" EXTENT 479515.146494 5565299.24155 488590.154172 5575171.20542 UNITS meters SHAPEPATH "/home/clem/Desktop/alloc" #IMAGECOLOR 255 255 255 #FONTSET "../etc/fonts.txt" # # Start of web interface definition # WEB IMAGEPATH "/home/clem/Desktop/mapwfs/outputs/" IMAGEURL "/outputs/" #TEMPLATE '/home/clem/Desktop/mapwfs/launcher2.html' METADATA "wfs_title" "WFS_test" ## REQUIRED #"wfs_onlineresource" "http://boss/cgi-bin/mapserv?map=mywfs.map&" ## Recommended "wfs_srs" "EPSG:3857" ## Recommended "wfs_abstract" "This text describes my WFS service." ## Recommended "wfs_enable_request" "*" # necessary END END PROJECTION "init=epsg:3857" END # # Start of layer definitions # LAYER NAME "ma_layer" TYPE LINE STATUS ON #CONNECTION "http://boss/cgi-bin/wfs?" #CONNECTIONTYPE WFS METADATA "wfs_title" "layerWFS" ##REQUIRED "wfs_srs" "EPSG:3857" ## REQUIRED "wfs_extent" "479515.146494 5565299.24155 488590.154172 5575171.20542" "gml_include_items" "all" ## Optional (serves all attributes for layer) #"gml_featureid" "ID" "wfs_enable_request" "*" "wfs_maxfeatures" "10000" END DATA "alloc_3857" PROJECTION "init=epsg:3857" END CLASS NAME 'ma_class' STYLE COLOR 255 255 0 OUTLINECOLOR 255 255 0 END END END #layerEND #mapfileThank you early for your help.
أكثر...
I want to have a Shapefile (as a WFS Layer) on an OpenStreetMap Map.
I achieved to have the display of the world map with OpenStreetMap alone on my browser, and the display of the Shapefile on my browser as a PNG (non-dynamic).
But I don't manage to have the Shapefile on the OpenStreetMap background. I tried to reproject and change the syntax but it hasn't resolve my problem.
I show you my last codes.
HTML and OpenLayers Code :
Hello World #map{ height:900px; width:100%; }
Mapfile code :
MAP NAME "WFS_server" STATUS ON SIZE 800 800 #SYMBOLSET "../etc/symbols.txt" EXTENT 479515.146494 5565299.24155 488590.154172 5575171.20542 UNITS meters SHAPEPATH "/home/clem/Desktop/alloc" #IMAGECOLOR 255 255 255 #FONTSET "../etc/fonts.txt" # # Start of web interface definition # WEB IMAGEPATH "/home/clem/Desktop/mapwfs/outputs/" IMAGEURL "/outputs/" #TEMPLATE '/home/clem/Desktop/mapwfs/launcher2.html' METADATA "wfs_title" "WFS_test" ## REQUIRED #"wfs_onlineresource" "http://boss/cgi-bin/mapserv?map=mywfs.map&" ## Recommended "wfs_srs" "EPSG:3857" ## Recommended "wfs_abstract" "This text describes my WFS service." ## Recommended "wfs_enable_request" "*" # necessary END END PROJECTION "init=epsg:3857" END # # Start of layer definitions # LAYER NAME "ma_layer" TYPE LINE STATUS ON #CONNECTION "http://boss/cgi-bin/wfs?" #CONNECTIONTYPE WFS METADATA "wfs_title" "layerWFS" ##REQUIRED "wfs_srs" "EPSG:3857" ## REQUIRED "wfs_extent" "479515.146494 5565299.24155 488590.154172 5575171.20542" "gml_include_items" "all" ## Optional (serves all attributes for layer) #"gml_featureid" "ID" "wfs_enable_request" "*" "wfs_maxfeatures" "10000" END DATA "alloc_3857" PROJECTION "init=epsg:3857" END CLASS NAME 'ma_class' STYLE COLOR 255 255 0 OUTLINECOLOR 255 255 0 END END END #layerEND #mapfileThank you early for your help.
أكثر...