Commit 4eafb1679290824a6c00f638fd25e90c4e1f37d9
1 parent
b7276253
карта2
Showing
1 changed file
with
13 additions
and
0 deletions
Show diff stats
frontend/views/site/index.php
... | ... | @@ -2,7 +2,20 @@ |
2 | 2 | |
3 | 3 | /* @var $this yii\web\View */ |
4 | 4 | |
5 | +use common\models\Settings; | |
6 | +use frontend\assets\MapAsset; | |
7 | +use yii\web\View; | |
8 | + | |
9 | +MapAsset::register($this); | |
10 | +$settings = Settings::getInstance(); | |
5 | 11 | $this->title = 'My Yii Application'; |
12 | + | |
13 | +$js = <<< JS | |
14 | +window.lat = {$settings->lat}; | |
15 | +window.lon = {$settings->lon}; | |
16 | +JS; | |
17 | + | |
18 | +$this->registerJs($js, View::POS_END); | |
6 | 19 | ?> |
7 | 20 | |
8 | 21 | ... | ... |