getImageLink()) . '\'}';*/ $content = $this->render('parts/_popup', [ 'model' => $model, 'types' => $types, ]); $position = str_replace('(', '', $model['coordinates']); $position = str_replace(')', '', $position); $position = explode(',', $position); $js_features[] = '{ "id": "' . $model['id'] . '", "title": "' . addslashes($model['lang']['title']) . '", "position": {"lat": ' . $position[0] . ', "lng": ' . $position[1] . '}, "type": "' . $model['type_id'] . '", "direction": "' . $model['area_id'] . '", "region": "' . $model['region_id'] . '", "power": "' . $model['electric_power'] . '", "investment": "' . $model['investment'] . '", "icon": "' . $bundle->baseUrl . '/img/curent-wind.png", "infoWindow": {"content": "' . addslashes(jsString($content)) . '"} }'; } if (!empty($js_icons)) { $js_icons = implode(",", $js_icons); } else { $js_icons = ''; } if (!empty($js_features)) { $js_features = implode(",", $js_features); } else { $js_features = ''; } ?>
request->get('type') == 'project') ? Html::a(Yii::t('front', 'resource potential'), $urlMapResource, [ 'class' => 'static-btn static-btn-resours' ]) : Html::a(Yii::t('front', 'projects'), $urlMapProjects, [ 'class' => 'static-btn static-btn-project' ]) ?>
render('parts/filters', ['types' => $types, 'regions' => $regions]); ?>
registerJsFile($bundle->baseUrl . '/libs/infoBubble/infobubble.js'); $this->registerJsFile('//developers.google.com/maps/documentation/javascript/examples/markerclusterer/markerclusterer.js'); $this->registerJsFile('//maps.googleapis.com/maps/api/js?key=AIzaSyCRjI5CDX5BPpcmvu6a6bSzDyMXThMaNeo&callback=initMap'); $this->registerJs($script, yii\web\View::POS_HEAD);