1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
<?php
$this->breadcrumbs=array(
'Standort'=>array('index'),
$model->name,
);
$this->pageTitle = $model->name . ' - ' . Yii::app()->name;
$this->menu=array(
array('label'=>'Standorte', 'url'=>array('index')),
);
?>
<h3><?php echo ($model->type == "Bühne") ? "Bühne": "Standort" ?> "<?php echo $model->name ?>"</h3>
<p>
<?php Yii::import('ext.egmap.*');
$gMap = new EGMap();
$gMap->zoom = 20;
$mapTypeControlOptions = array(
'position'=> EGMapControlPosition::LEFT_BOTTOM,
'style'=>EGMap::MAPTYPECONTROL_STYLE_DROPDOWN_MENU
);
$gMap->width = '100%';
$gMap->setOptions(array("mapTypeId"=>EGMap::TYPE_HYBRID));
$gMap->mapTypeControlOptions= $mapTypeControlOptions;
$gMap->setCenter($model->pos_lat, $model->pos_long);
$info_window_a = new EGMapInfoWindow('<div>'.$model->name.'</div>');
$icon = new EGMapMarkerImage("http://www.astaf.de/images/map/marker_red_32.png");
$icon->setSize(32, 32);
$icon->setAnchor(16, 16.5);
$icon->setOrigin(0, 0);
$marker = new EGMapMarkerWithLabel($model->pos_lat, $model->pos_long, array('title' => $model->name,'icon'=> $icon));
$marker->draggable=false;
$marker->raiseOnDrag= true;
$marker->addHtmlInfoWindow($info_window_a);
$gMap->addMarker($marker);
// enabling marker clusterer just for fun
// to view it zoom-out the map
$gMap->enableMarkerClusterer(new EGMapMarkerClusterer());
$gMap->renderMap();
?>
</p>
<?php
if("Stand" == $model->type) {
$this->renderPartial('_standort',array(
'data'=>$model,
));
} elseif ("Bühne" == $model->type) {
$this->renderPartial('_buehne',array(
'data'=>$model,
));
} else {
echo "asd";
}
?>
|