PHP code example of andregasparin / leafletadianti

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

    

andregasparin / leafletadianti example snippets

html

use AndreGasparin\Leafletadianti\LeafletMap;
 
class LeafletPage extends TPage
{
    function __construct()
    {
        parent::__construct();
        
        $map = new LeafletMap('51.505','-0.09','13', 'google'); // set initial coordinates
        $show_map = $map->show();
        
        $content = new TElement('div');
        $content->id = 'my-map';
        $content->add( $show_map );
 
        parent::add( $content );
    }
}