PHP code example of skeeks / cms-ya-map

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

    

skeeks / cms-ya-map example snippets


<?= \skeeks\cms\ya\map\widgets\YaMapWidget::widget([
    'options' =>
    [
        'class' => 'sx-map'
    ]
]) 

<? $yaMap = \skeeks\cms\ya\map\widgets\YaMapWidget::begin([
    'options' =>
    [
        'class' => 'sx-map'
    ]
]) 

<? $yaMap = \skeeks\cms\ya\map\widgets\YaMapWidget::begin([
    'options' =>
    [
        'class' => 'sx-map'
    ],
    'clientOptions' =>
    [
        'onReady' => new \yii\web\JsExpression(<<<JS
            function(e, YaMap){
                console.log(YaMap);
            }
JS
)
    ],
])