Changes between Version 10 and Version 11 of SWIGMapScriptOpacity


Ignore:
Timestamp:
2021-12-22T12:32:05-04:00 (3 years ago)
Author:
Jeff McKenna
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • SWIGMapScriptOpacity

    v10 v11  
    66
    77// 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");
     8define( "MAPFILE", "/ms4w/apps/local-demo/local.map" );
    129
    1310// open map
     
    2320
    2421// set image format
    25 $oMap->selectoutputformat("png");
     22$oMap->selectOutputFormat("png");
    2623
    2724
    2825// get layer
    29 $oPolyLayer = $oMap->getLayerByName('prov_bound');
     26$oPolyLayer = $oMap->getLayerByName('ocean');
    3027
    3128//***********************************************************************************************
     
    3936
    4037// 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);
    4239
    4340//***********************************************************************************************
    4441// save mapfile to new file, to see your new COMPOSITE object inside the layer
    4542//***********************************************************************************************
    46 $oMap->save("C:/ms4w/apps/phpmapscriptng-swig/output2.map");
     43$oMap->save("C:/ms4w/apps/local-demo/output-opacity.map");
    4744
    4845// set header
    49 header("Content-type: image/gif");
     46header("Content-type: image/png");
    5047
    51 // read image to output buffer
    52 readfile("C:/ms4w/apps/phpmapscriptng-swig/ttt.png");
     48//send image to stdout (browser), without saving file locally
     49echo $oImage ->getBytes();
    5350
    5451?>