PHP code example of bame / staticmap

1. Go to this page and download the library: Download bame/staticmap library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bame / staticmap example snippets


$colors = [
    [0x00, 0x6B, 0x3F],
    [0xF9, 0xDD, 0x16],
    [0xE2, 0x3D, 0x28],
];

$map = new TripleZoomMap(8.977596, 38.76179, 700, 320, 'Bandira Addis Map', $colors, 'https://a.africa.tiles.openplaceguide.org/styles/bright/{Z}/{X}/{Y}.png', 'opg-pages');
$map->sendHeader();
return imagepng($map->getImage());