2017 © Pedro Peláez
 

library php-static-maps-generator

A PHP library to generate Google Static Map Links.

image

bensquire/php-static-maps-generator

A PHP library to generate Google Static Map Links.

  • Monday, December 4, 2017
  • by bensquire
  • Repository
  • 4 Watchers
  • 12 Stars
  • 58 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 6 Forks
  • 0 Open issues
  • 4 Versions
  • 18 % Grown

The README.md

Build Status, (*1)

php-static-maps-generator

A PHP library to generate Google Static Map Links. The Google Static Maps Library (V2) is a free service, [made available by Google] (https://developers.google.com/maps/documentation/staticmaps/)., (*2)

Using simple OO methods, this project will build the URL which can be used in an image tag., (*3)

Example Code

$styling = new \GoogleStaticMap\Feature\Styling();
$styling->setHue('#006400');
$styling->setLightness(50);

$featureStyling = new \GoogleStaticMap\Feature();
$featureStyling->setFeature('all');
$featureStyling->setElement('all');
$featureStyling->setStyle($styling);

$map = new \GoogleStaticMap\Map();
$map->setCenter('London,UK');
$map->setHeight(300);
$map->setWidth(232);
$map->setZoom(8);
$map->setFormat('jpg');
$map->addFeature($featureStyling);

echo '<img src="' . $map . '" height="' . $map->getHeight() . '" width="' . $map->getWidth() . '" />';

Example Output:

Sample map generated by the Class, (*4)

Fix coding standards:

/usr/local/bin/php-cs-fixer fix --config=.php_cs.dist -v --dry-run

Google Static Maps API Documentation

https://developers.google.com/maps/documentation/static-maps/intro

Requirements:

This library requires no additional software beyond a functional version of PHP 7.1 (or greater) and if you wish to retrieve the Map image, a working Internet connection., (*5)

The Versions

04/12 2017

dev-master

9999999-dev https://github.com/bensquire/php-static-maps-generator

A PHP library to generate Google Static Map Links.

  Sources   Download

MIT

The Requires

  • php >=7.1.0
  • ext-hash *

 

The Development Requires

php generator google maps

20/11 2017

2.0.2

2.0.2.0 https://github.com/bensquire/php-static-maps-generator

A PHP library to generate Google Static Map Links.

  Sources   Download

MIT

The Requires

  • php >=7.1.0
  • ext-hash *

 

The Development Requires

php generator google maps

01/10 2017

2.0.1

2.0.1.0 https://github.com/bensquire/php-static-maps-generator

A PHP library to generate Google Static Map Links.

  Sources   Download

MIT

The Requires

  • php >=7.1.0
  • ext-hash *

 

The Development Requires

php generator google maps

01/10 2017

2.0.0

2.0.0.0 https://github.com/bensquire/php-static-maps-generator

A PHP library to generate Google Static Map Links.

  Sources   Download

MIT

The Requires

  • php >=7.1.0
  • ext-hash *

 

The Development Requires

php generator google maps