Commit 7def290fa1e67e83760c071fe6e3d608a39aff65
1 parent
0fecf0e4
stock map
Showing
3 changed files
with
26 additions
and
0 deletions
Show diff stats
1 | +<?php | ||
2 | + | ||
3 | + namespace artbox\stock\assets; | ||
4 | + | ||
5 | + use yii\web\AssetBundle; | ||
6 | + | ||
7 | + /** | ||
8 | + * Class MapAsset | ||
9 | + * | ||
10 | + * @package frontend\assets | ||
11 | + */ | ||
12 | + class MapAsset extends AssetBundle | ||
13 | + { | ||
14 | + public $basePath = '@webroot'; | ||
15 | + public $baseUrl = '@web'; | ||
16 | + public $css = []; | ||
17 | + public $js = [ | ||
18 | + '//maps.google.com/maps/api/js?sensor=false&key=AIzaSyA_GR59jXZSBeHis3s18AusortelH1flaw', | ||
19 | + '/js/markerclusterer.js', | ||
20 | + ]; | ||
21 | + public $depends = [ | ||
22 | + 'artbox\stock\assets\StockAsset', | ||
23 | + ]; | ||
24 | + } | ||
0 | \ No newline at end of file | 25 | \ No newline at end of file |
views/city/_form.php
@@ -10,6 +10,7 @@ | @@ -10,6 +10,7 @@ | ||
10 | /* @var $modelLangs artbox\stock\models\CityLang */ | 10 | /* @var $modelLangs artbox\stock\models\CityLang */ |
11 | 11 | ||
12 | //\artbox\stock\assets\StockAsset::register($this); | 12 | //\artbox\stock\assets\StockAsset::register($this); |
13 | + \artbox\stock\assets\MapAsset::register($this); | ||
13 | ?> | 14 | ?> |
14 | 15 | ||
15 | <div class="city-form"> | 16 | <div class="city-form"> |
views/shop/_form.php