PHP code example of nmfzone / google-static-map-laravel

1. Go to this page and download the library: Download nmfzone/google-static-map-laravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

nmfzone / google-static-map-laravel example snippets


// config/app.php

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

// config/app.php

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

// bootstrap/app.php

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

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

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

GoogleStaticMap::make('-7.797068', '110.370529')->setCenter('Indonesia')->setZoom('4')->getUrl();
bash
$ php artisan vendor:publish --provider="NMFCODES\GoogleStaticMap\GoogleStaticMapServiceProvider"