PHP code example of rootlocal / yii2-yandexmaps

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

    

rootlocal / yii2-yandexmaps example snippets




return [
    
    // ...
    
    'components' => [
        
        // ...
    
        'assetManager' => [
            
            'bundles' => [
                \rootlocal\widgets\yandexmaps\ApiYandexMapAsset::class => [
                    'version' => '2.1',
                    'language' => 'ru-RU',
                    'apiKey' => 'MY_API_KEY'
                ],
            ],
            
            // ...
        ],
        
        // ...
    ]
];




use yii\web\View;
use rootlocal\widgets\yandexmaps\YandexMapWidget;

/** @var View $this */



use yii\web\View;
use rootlocal\widgets\yandexmaps\YandexMapWidget;

/** @var View $this */