Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nmfzone/google-static-map-laravel
Generate Google Static Map in Laravel
https://github.com/nmfzone/google-static-map-laravel
Last synced: 7 days ago
JSON representation
Generate Google Static Map in Laravel
- Host: GitHub
- URL: https://github.com/nmfzone/google-static-map-laravel
- Owner: nmfzone
- License: mit
- Created: 2017-12-03T22:42:06.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-01-08T03:26:28.000Z (almost 7 years ago)
- Last Synced: 2024-12-25T14:05:29.371Z (12 days ago)
- Language: PHP
- Size: 20.5 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# 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
```bash
$ composer require nmfzone/google-static-map-laravel
```The package will automatically register itself.
### Installation in Laravel 5.4
```bash
$ composer require nmfzone/google-static-map-laravel
```Next up, the service provider must be registered:
```php
// config/app.php'providers' => [
...
NMFCODES\GoogleStaticMap\GoogleStaticMapServiceProvider::class,
];
```If you want to make use of the facade you must install it as well:
```php
// config/app.php'aliases' => [
...
'GoogleStaticMap' => NMFCODES\GoogleStaticMap\GoogleStaticMapFacade::class,
];
```If you want to change the default config, you must publish the config file:
```bash
$ php artisan vendor:publish --provider="NMFCODES\GoogleStaticMap\GoogleStaticMapServiceProvider"
```### Installation in Lumen
```bash
$ composer require nmfzone/google-static-map-laravel
```Next up, the service provider must be registered:
```php
// bootstrap/app.php$app->register(NMFCODES\GoogleStaticMap\GoogleStaticMapServiceProvider::class);
```## Usage
Using facade (with default config),
```php
GoogleStaticMap::setCenter('Yogyakarta')->getUrl();
```If you want to use the default marker, you can call `make($latitude, $longitude)` first:
```php
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
- [Nabil M. Firdaus](https://twitter.com/nmfzone)
- [All contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.