[ka-Map-users] Ka-map and AGG + Alpha? - Solved (need confirm)

Sacha Black sacha.black at gmail.com
Tue Mar 11 17:11:03 EDT 2008


glad it worked. I guess the 2 changes will make it back into tile.php ?

SB

On Tue, Mar 11, 2008 at 4:39 AM, Hans Castorp <hanscastorp76 at yahoo.es> wrote:

> Hi to all,
>
>  For me it work's completely fine (at last!!)
>
>  I want to give thanks to everyone who tried to solve this trouble.
>
>  Best regards.
>
>  Hans.
>
>  -----Mensaje original-----
>  De: ka-map-users-bounces at lists.maptools.org
>  [mailto:ka-map-users-bounces at lists.maptools.org] En nombre de Sacha Black
>  Enviado el: martes, 11 de marzo de 2008 3:13
>  Para: ka-map-users
>  Asunto: [ka-Map-users] Ka-map and AGG + Alpha? - Solved (need confirm)
>
>
>
>  Hans, Zak, Paul, Lorenzo,
>
>  Thanks for your comments - think I finally got the AGG + Alpha (AGGA)
>  option to work. Hans maybe you can test the below and confirm?
>
>  I hope it works for you....
>
>  Sacha
>
>  +++++++++
>
>  [After Zak's last comment I realized that Paul's suggested code was
>  not being executed in tile.php, because the condition "if
>  ($useAlphaCh)" was never true, after that was fixed, everything
>  worked]
>
>  here is the full set of what worked for me (the bottom 2 changes were
>  the final key):
>
>  ///////////////// in the .map file: /////////////////
>
>  OUTPUTFORMAT
>   NAME 'AGGA'
>   DRIVER AGG/PNG
>   IMAGEMODE RGBA
>  # FORMATOPTION "TRANSPARENT=ON"
>  END
>
>  and also for the relevant LAYER:
>
>  LAYER
>   METADATA
>      "IMAGEFORMAT" "AGGA"
>   END
>  .....
>  END
>
>  /////// in config php (around line 105): /////////////////
>
>   $aszGMap = array (
>          'title' => 'GMap 75',
>          'path' => '../../gmap/htdocs/gmap_AGGA.map',
>          'scales' => array( 40000000, 25000000, 12000000, 7500000,
>  3000000, 1000000 ),
>          'format' =>'PNG'  /// <!-- doesn't seem to have an effect -->
>   );
>
>  and (around line 210):
>
>        case "AGGA":
>            $GLOBALS['szMapImageFormat'] = 'AGGA';
>            $GLOBALS['szMapImageCreateFunction'] = "imagecreatefrompng";
>            $GLOBALS['szImageExtension'] = '.png';
>            $GLOBALS['szImageCreateFunction'] = "imagecreatetruecolor";
>            $GLOBALS['szImageOutputFunction'] = "imagepng";
>            $GLOBALS['szImageHeader'] = 'image/png';
>            break;
>
>
>  /////// in tile.php (around line 85): /////////////////
>
>  $useAlphaCh = false;
>  if (isset($_REQUEST['i'])) {
>    setOutputFormat( $_REQUEST['i'] );
>    if (strtoupper($_REQUEST['i']) == 'ALPHA') {
>         $useAlphaCh = true;
>    }
>    elseif (strtoupper($_REQUEST['i']) == 'AGGA') {    /// <-- also use
>  AlphaCh if AGGA
>         $useAlphaCh = true;
>   }
>  }
>
>  and lastly the fix from Paul (around line 315):
>
>  if ($useAlphaCh) {
>      imageAlphaBlending($oTile, false);
>      imagefill($oTile, 0, 0, imagecolorallocatealpha($oTile, 0, 0, 0, 127));
>      imageSaveAlpha($oTile, true);
>  }
>  _______________________________________________
>  ka-Map-users mailing list
>  ka-Map-users at lists.maptools.org
>  http://lists.maptools.org/mailman/listinfo/ka-map-users
>
>  No virus found in this incoming message.
>  Checked by AVG.
>  Version: 7.5.518 / Virus Database: 269.21.7/1324 - Release Date: 10/03/2008
>  19:27
>
>
>  No virus found in this outgoing message.
>  Checked by AVG.
>  Version: 7.5.518 / Virus Database: 269.21.7/1324 - Release Date: 10/03/2008
>  19:27
>
>
>
>


More information about the ka-Map-users mailing list