PHP code example of lukaswhite / static-maps
1. Go to this page and download the library: Download lukaswhite/static-maps 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/ */
lukaswhite / static-maps example snippets
$center = new LatLng( 53.48095000, -2.23743000 );
$markers = new MarkerFactory( );
$marker = $markers->create( 'pin', $center );
$map = new Map( );
$map->setCenter( $center )
->setZoom( 18 )
->addMarker( $marker );
$map->save( '/path/to/some/directory' );