# Map file for displaying raster with Mapserver September 2013 Julien Minet # Copy-paste the following line in a browser to test this map file: # http://localhost/cgi-bin/mapserv?map=/var/www/site/mysite/blog/mapserver_piechart/europe_elec.map&layer=europe&layer=europe_elec&mode=map # http://localhost/cgi-bin/mapserv.exe?map=C:/OSGeo4W/apache/htdocs/mapserver_piechart/europe_elec.map&layer=europe&layer=europe_elec&mode=map MAP IMAGETYPE png SIZE 2000 800 EXTENT -20017508.34 -20017508.34 20017508.34 20017508.34 # EXTENT should be given in EPSG:900913/3857 in meters SHAPEPATH "./shp/" PROJECTION "init=epsg:900913" END WEB METADATA "wms_title" "europe_elec" "wms_srs" "EPSG:900913" "wms_onlineresource" "http://localhost/cgi-bin/mapserv.exe?map=C:/OSGeo4W/apache/htdocs/mapserver_piechart/europe_elec.map&" # For Windows "wms_format" "image/png" "wms_enable_request" "GetMap" END END LAYER # shp layer NAME europe DATA Europe_electricity2010.shp STATUS ON TYPE POLYGON METADATA "wms_title" "europe" END PROJECTION "init=epsg:4326" # Put the EPSG code of the coordinate system of the raster data! END CLASS STYLE COLOR 200 200 200 END END END LAYER # chart layer NAME europe_elec DATA Europe_electricity2010.shp STATUS DEFAULT TYPE CHART METADATA "wms_title" "europe_elec" END PROJECTION "init=epsg:4326" # Put the EPSG code of the coordinate system of the raster data! END PROCESSING "CHART_TYPE=PIE" PROCESSING "CHART_SIZE_RANGE=table_ELEC 10 50 0 50000" CLASS NAME "renew" STYLE SIZE [table_RENE] COLOR 10 200 5 END END CLASS NAME "no_renew" STYLE SIZE [table_NO_R] COLOR 79 129 189 END END END END