This is pretty much related to the question asked in the following link
How to add Mapserver WMS to Openlayers 3
I followed the example in
http://openlayers.org/en/master/examples/wms-image-custom-proj.html
This is the mapfile i used
MAP NAME "QGIS-MAP" SIZE 600 450 UNITS meters EXTENT 79.4571 5.92011 81.8442 9.8252 PROJECTION "init=epsg:4326" END IMAGECOLOR 255 255 255 IMAGEQUALITY 95 IMAGETYPE png OUTPUTFORMAT NAME png DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE PC256 EXTENSION "png" END WEB TEMPLATE 'C:/ms4w/Apache/htdocs/ex10.html' IMAGEPATH 'C:/ms4w/Apache/htdocs/output/img' IMAGEURL 'http://localhost/output/img' METADATA'wms_title' 'QGIS-MAP' 'wms_onlineresource' 'http://localhost/cgi-bin/mapserv.exe? map=C:/ms4w/Apache/htdocs/mapfilen.map&' 'wms_srs' 'EPSG:4326 ' 'wms_enable_request' 'GetCapabilities GetMap GetFeatureInfo' 'wms_feature_info_mime_type' 'text/html'ENDENDLAYERNAME 'polygons'TYPE POLYGONSTATUS ONCONNECTIONTYPE POSTGISCONNECTION "host=localhost dbname=shapefile user=postgres password=1234 port=5432"DATA "geom from slpolygons using unique gid using srid=4326"PROJECTION "init=epsg:4326"ENDMETADATA wms_title "polygons" wms_srs "EPSG:4326"ENDCLASS NAME 'natural1' STYLE WIDTH 0.91 OUTLINECOLOR 0 0 0 COLOR 119 172 92 END ENDENDENDAnd this the html file
Single image WMS with Proj4js projection example
I hope someone can point out where i went wrong. Thanks in advance
أكثر...
How to add Mapserver WMS to Openlayers 3
I followed the example in
http://openlayers.org/en/master/examples/wms-image-custom-proj.html
This is the mapfile i used
MAP NAME "QGIS-MAP" SIZE 600 450 UNITS meters EXTENT 79.4571 5.92011 81.8442 9.8252 PROJECTION "init=epsg:4326" END IMAGECOLOR 255 255 255 IMAGEQUALITY 95 IMAGETYPE png OUTPUTFORMAT NAME png DRIVER "GD/PNG" MIMETYPE "image/png" IMAGEMODE PC256 EXTENSION "png" END WEB TEMPLATE 'C:/ms4w/Apache/htdocs/ex10.html' IMAGEPATH 'C:/ms4w/Apache/htdocs/output/img' IMAGEURL 'http://localhost/output/img' METADATA'wms_title' 'QGIS-MAP' 'wms_onlineresource' 'http://localhost/cgi-bin/mapserv.exe? map=C:/ms4w/Apache/htdocs/mapfilen.map&' 'wms_srs' 'EPSG:4326 ' 'wms_enable_request' 'GetCapabilities GetMap GetFeatureInfo' 'wms_feature_info_mime_type' 'text/html'ENDENDLAYERNAME 'polygons'TYPE POLYGONSTATUS ONCONNECTIONTYPE POSTGISCONNECTION "host=localhost dbname=shapefile user=postgres password=1234 port=5432"DATA "geom from slpolygons using unique gid using srid=4326"PROJECTION "init=epsg:4326"ENDMETADATA wms_title "polygons" wms_srs "EPSG:4326"ENDCLASS NAME 'natural1' STYLE WIDTH 0.91 OUTLINECOLOR 0 0 0 COLOR 119 172 92 END ENDENDENDAnd this the html file
Single image WMS with Proj4js projection example
I hope someone can point out where i went wrong. Thanks in advance
أكثر...