2017 © Pedro Peláez
 

library static-map

Generate a Yandex,Google,MapBox,Bing,CartoDB,HERE,MapQuest static map with Static Map Maker

image

nicat/static-map

Generate a Yandex,Google,MapBox,Bing,CartoDB,HERE,MapQuest static map with Static Map Maker

  • Wednesday, August 16, 2017
  • by NJT
  • Repository
  • 1 Watchers
  • 7 Stars
  • 4,508 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 3 Open issues
  • 5 Versions
  • 12 % Grown

The README.md

Laravel Static Map Generator

Installation

First, pull in the package through Composer., (*1)

Run composer require nicat/static-map, (*2)

And then, if using Laravel 5, include the service provider within config/app.php., (*3)

'providers' => [
    Nicat\StaticMap\StaticMapServiceProvider::class,
];

And, for convenience, add a facade alias to this same file at the bottom:, (*4)

'aliases' => [
    'StaticMap' => Nicat\StaticMap\Facade\StaticMap::class,
];

If you need to modify the Static Map partials, you can run:, (*5)

php artisan vendor:publish

Usage

Within your controllers, (*6)

StaticMap::Google('London')

You may also do:, (*7)

  • StaticMap::Google('London')
  • StaticMap::Google('37.6213129,-122.3811441')
  • StaticMap::GoogleWithImg('London')
  • StaticMap::Google('London', ['with' => 600, 'height' => 500, 'mapType' => 'hybrid'])

You can modify partials, (*8)

    'width'       => 600, // Width of Map image
    'height'      => 400, // Height of Map Image
    'mapType'     => 'roadmap', // Map type ['roadmap', 'terrain', 'satellite', 'hyrid']
    'imageFormat' => 'png', // gif, png or jpg
    'zoom'        => 14, // Zoom of Map

You may also can add markers:, (*9)

{!! StaticMap::GoogleWithImg('London', ['markers' => ['center' => 'Westminster London', 'label' => '2'], 'imageType' => 'gif'])

If you want just add marker of main center, (*10)

{!! StaticMap::GoogleWithImg('37.6213129,-122.3811441', ['markers' => true]) !!}

If you want just use with map link, (*11)

{!! StaticMap::GoogleWithLink('37.6213129,-122.3811441', ['markers' => true]) !!}

Marker options, (*12)

    'center'  => '37.6213129,-122.3811441', // or 'San Francisco International Airport'
    'label'   => '1', // Label Name of Marker
    'color'   => '0xff0000', //  color of marker   
    'size'    => 'mid', // tiny (Small),small (Medium), mid (Large)

Some examples

{!! StaticMap::GoogleWithImg('San Francisco International Airport', ['markers' => [
                ['center' => 'San Bruno', 'label' => '2'],
                ['center' => '37.6213129,-122.3711441', 'label' => '1']
            ]
        ]) !!}

http://s33.postimg.org/40tfyv5a7/image.png, (*13)

{!! StaticMap::GoogleWithImg('37.6213129,-122.3811441', ['with' => 600, 'height' => 500, 'mapType' => 'hybrid']) !!}

http://s33.postimg.org/5m1es88zj/image.png, (*14)

The Versions

16/08 2017

dev-master

9999999-dev https://github.com/Nicat/StaticMap

Generate a Yandex,Google,MapBox,Bing,CartoDB,HERE,MapQuest static map with Static Map Maker

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel google yandex bing mapbox here cartodb mapquest nicat staticmap

16/02 2017

v1.0.2

1.0.2.0 https://github.com/Nicat/StaticMap

Generate a Yandex,Google,MapBox,Bing,CartoDB,HERE,MapQuest static map with Static Map Maker

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel google yandex bing mapbox here cartodb mapquest nicat staticmap

31/05 2016

v1.0.1

1.0.1.0 https://github.com/Nicat/StaticMap

Generate a Yandex,Google,MapBox,Bing,CartoDB,HERE,MapQuest static map with Static Map Maker

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel google yandex bing mapbox here cartodb mapquest nicat staticmap

29/05 2016

dev-develop

dev-develop https://github.com/Nicat/StaticMap

Generate a Yandex,Google,MapBox,Bing,CartoDB,HERE,MapQuest static map with Static Map Maker

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel google yandex bing mapbox here cartodb mapquest nicat staticmap

28/05 2016

v1.0.0

1.0.0.0 https://github.com/Nicat/StaticMap

Generate a Yandex,Google,MapBox,Bing,CartoDB,HERE,MapQuest static map with Static Map Maker

  Sources   Download

MIT

The Requires

 

The Development Requires

nicat staticmap