PHP code example of bagusindrayana / laravel-map

1. Go to this page and download the library: Download bagusindrayana/laravel-map 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/ */

    

bagusindrayana / laravel-map example snippets


    'providers'=>[
        //....

        Bagusindrayana\LaravelMap\LaravelMapServiceProvider::class,

        //...
    ],
    'aliases'=>[
        //...

        'LaravelMap'=>Bagusindrayana\LaravelMap\LaravelMap::class

        //...
    ]



#using mapbox
$laravelMap = new LaravelMap('mapbox',[
    'center'=>[-122.48695850372314, 37.82931081282506],
    'zoom'=>15,
    'style'=>'mapbox://styles/mapbox/dark-v10',
    'container'=>'map',
    'containerStyle'=>'width: 100%; height: 100%;position:absolute;top:0;bottom:0;'
]);

return view('your-map-view',compact('laravelMap'))

bash
php artisan vendor:publish --provider "Bagusindrayana\LaravelMap\LaravelMapServiceProvider"