skeeks/cms-ya-map

Виджеты для работы с yandex картами

Installs: 968

Dependents: 3

Suggesters: 0

Security: 0

Stars: 1

Watchers: 4

Forks: 1

Type:yii2-extension

2.1.0 2024-01-16 14:30 UTC

README

##SkeekS CMS Marketplace

http://marketplace.cms.skeeks.com/solutions/instrumentyi/razrabotchiku/228-cms-ya-map

##Exemples

simple

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

or

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

advanced

<? $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
)
    ],
]) ?>
    <? $yaMap->setZoom(5)->setCenter(); ?>
<? \skeeks\cms\ya\map\widgets\YaMapWidget::end() ?>

skeeks! SkeekS CMS (Yii2) — быстро, просто, эффективно! skeeks.com | cms.skeeks.com | marketplace.cms.skeeks.com