Changes between Version 10 and Version 11 of SWIGMapScriptOpacity
- Timestamp:
- 2021-12-22T12:32:05-04:00 (3 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
SWIGMapScriptOpacity
v10 v11 6 6 7 7 // define variables 8 define( "MAPFILE", "C:/ms4w/apps/phpmapscriptng-swig/output.map" ); 9 10 // required SWIG include (contains constants for PHP7) 11 include("C:/ms4w/apps/phpmapscriptng-swig/include/mapscript.php"); 8 define( "MAPFILE", "/ms4w/apps/local-demo/local.map" ); 12 9 13 10 // open map … … 23 20 24 21 // set image format 25 $oMap->select outputformat("png");22 $oMap->selectOutputFormat("png"); 26 23 27 24 28 25 // get layer 29 $oPolyLayer = $oMap->getLayerByName(' prov_bound');26 $oPolyLayer = $oMap->getLayerByName('ocean'); 30 27 31 28 //*********************************************************************************************** … … 39 36 40 37 // save image file 41 $file = $oImage->save("C:/ms4w/apps/phpmapscriptng-swig/ttt.png",$oMap);38 //$file = $oImage->save("C:/ms4w/apps/local-demo/ttt.png",$oMap); 42 39 43 40 //*********************************************************************************************** 44 41 // save mapfile to new file, to see your new COMPOSITE object inside the layer 45 42 //*********************************************************************************************** 46 $oMap->save("C:/ms4w/apps/ phpmapscriptng-swig/output2.map");43 $oMap->save("C:/ms4w/apps/local-demo/output-opacity.map"); 47 44 48 45 // set header 49 header("Content-type: image/ gif");46 header("Content-type: image/png"); 50 47 51 // read image to output buffer52 readfile("C:/ms4w/apps/phpmapscriptng-swig/ttt.png");48 //send image to stdout (browser), without saving file locally 49 echo $oImage ->getBytes(); 53 50 54 51 ?>