LaravelPackages.net
Acme Inc.
Toggle sidebar
nmfzone/google-static-map-laravel

Generates a static map using Google Map

1.147
3
v1.8.7
About nmfzone/google-static-map-laravel

nmfzone/google-static-map-laravel is a Laravel package for generates a static map using google map. It currently has 3 GitHub stars and 1.147 downloads on Packagist (latest version v1.8.7). Install it with composer require nmfzone/google-static-map-laravel. Discover more Laravel packages by nmfzone or browse all Laravel packages to compare alternatives.

Last updated

Google Static Map Generator

Generate static map using Google Map API in Laravel.

Installation

Requirements

>= PHP 7.1

Installation in Laravel 5.5 and up

$ composer require nmfzone/google-static-map-laravel

The package will automatically register itself.

Installation in Laravel 5.4

$ composer require nmfzone/google-static-map-laravel

Next up, the service provider must be registered:

// config/app.php

'providers' => [
    ...
    NMFCODES\GoogleStaticMap\GoogleStaticMapServiceProvider::class,
];

If you want to make use of the facade you must install it as well:

// config/app.php

'aliases' => [
    ...
    'GoogleStaticMap' => NMFCODES\GoogleStaticMap\GoogleStaticMapFacade::class,
];

If you want to change the default config, you must publish the config file:

$ php artisan vendor:publish --provider="NMFCODES\GoogleStaticMap\GoogleStaticMapServiceProvider"

Installation in Lumen

$ composer require nmfzone/google-static-map-laravel

Next up, the service provider must be registered:

// bootstrap/app.php

$app->register(NMFCODES\GoogleStaticMap\GoogleStaticMapServiceProvider::class);

Usage

Using facade (with default config),

GoogleStaticMap::setCenter('Yogyakarta')->getUrl();

If you want to use the default marker, you can call make($latitude, $longitude) first:

GoogleStaticMap::make('-7.797068', '110.370529')->getUrl();

GoogleStaticMap::make('-7.797068', '110.370529')->setCenter('Indonesia')->setZoom('4')->getUrl();

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Star History Chart