PHP code example of ezadev / leaflet

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

    

ezadev / leaflet example snippets


    'extensions' => [
        'leaflet' => [
            'enable' => true,
            'config' => [
                // tileLayer
                'tile' => \Ezadev\Leaflet\Tiles\OpenStreetMapDE::class, // default \Ezadev\Leaflet\Tiles\Sputnik::class
                // marker zoom
                'zoom' => 13, // default maxZoom - 1
                // style GeoSearchControl
                'style' => 'bar', // default 'bar'
                // 'bing' or 'google' or 'esri'
                'geoProvider' => 'OpenStreetMap', // default 'OpenStreetMap'
            ],
            'keys' => [
                'bing' => '__YOUR_BING_KEY__',
                'google' => '__YOUR_GOOGLE_KEY__'
            ],
        ],
    ],