egeloen / ivory-google-map

Google Map API v3 integration for PHP 5.6+.
MIT License
325 stars 185 forks source link

[Helper] Add static map support #217

Closed egeloen closed 7 years ago

egeloen commented 7 years ago

This PR fixes #201 and allow to render the map as a static one with the following:

use Ivory\GoogleMap\Helper\Builder\StaticMapHelperBuilder;
use Ivory\GoogleMap\Map;

$map = new Map();
// Configure your map...

$staticMapHelper = StaticMapHelperBuilder::create()->build();

echo '<img src="'.$staticMapHelper->render($map).'" />';