diff --git a/frontend/views/site/index.php b/frontend/views/site/index.php index 11b74d5..41f200a 100644 --- a/frontend/views/site/index.php +++ b/frontend/views/site/index.php @@ -2,7 +2,20 @@ /* @var $this yii\web\View */ +use common\models\Settings; +use frontend\assets\MapAsset; +use yii\web\View; + +MapAsset::register($this); +$settings = Settings::getInstance(); $this->title = 'My Yii Application'; + +$js = <<< JS +window.lat = {$settings->lat}; +window.lon = {$settings->lon}; +JS; + +$this->registerJs($js, View::POS_END); ?> -- libgit2 0.21.4