1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* |
4
|
|
|
* This file is part of the Ivory Google Map package. |
5
|
|
|
* |
6
|
|
|
* (c) Eric GELOEN <[email protected]> |
7
|
|
|
* |
8
|
|
|
* For the full copyright and license information, please read the LICENSE |
9
|
|
|
* file that was distributed with this source code. |
10
|
|
|
*/ |
11
|
|
|
|
12
|
|
|
namespace Ivory\GoogleMap\Control; |
13
|
|
|
|
14
|
|
|
/** |
15
|
|
|
* @author GeLo <[email protected]> |
16
|
|
|
*/ |
17
|
|
|
class ControlManager |
18
|
|
|
{ |
19
|
|
|
/** |
20
|
|
|
* @var MapTypeControl|null |
21
|
|
|
*/ |
22
|
|
|
private $mapTypeControl; |
23
|
|
|
|
24
|
|
|
/** |
25
|
|
|
* @var RotateControl|null |
26
|
|
|
*/ |
27
|
|
|
private $rotateControl; |
28
|
|
|
|
29
|
|
|
/** |
30
|
|
|
* @var ScaleControl|null |
31
|
|
|
*/ |
32
|
|
|
private $scaleControl; |
33
|
|
|
|
34
|
|
|
/** |
35
|
|
|
* @var StreetViewControl|null |
36
|
|
|
*/ |
37
|
|
|
private $streetViewControl; |
38
|
|
|
|
39
|
|
|
/** |
40
|
|
|
* @var ZoomControl|null |
41
|
|
|
*/ |
42
|
|
|
private $zoomControl; |
43
|
|
|
|
44
|
|
|
/** |
45
|
|
|
* @return bool |
46
|
|
|
*/ |
47
|
|
|
public function hasMapTypeControl() |
48
|
|
|
{ |
49
|
|
|
return $this->mapTypeControl !== null; |
50
|
|
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @return MapTypeControl|null |
54
|
|
|
*/ |
55
|
|
|
public function getMapTypeControl() |
56
|
|
|
{ |
57
|
|
|
return $this->mapTypeControl; |
58
|
|
|
} |
59
|
|
|
|
60
|
|
|
/** |
61
|
|
|
* @param MapTypeControl|null $mapTypeControl |
62
|
|
|
*/ |
63
|
|
|
public function setMapTypeControl(MapTypeControl $mapTypeControl = null) |
64
|
|
|
{ |
65
|
|
|
$this->mapTypeControl = $mapTypeControl; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
/** |
69
|
|
|
* @return bool |
70
|
|
|
*/ |
71
|
|
|
public function hasRotateControl() |
72
|
|
|
{ |
73
|
|
|
return $this->rotateControl !== null; |
74
|
|
|
} |
75
|
|
|
|
76
|
|
|
/** |
77
|
|
|
* @return RotateControl|null |
78
|
|
|
*/ |
79
|
|
|
public function getRotateControl() |
80
|
|
|
{ |
81
|
|
|
return $this->rotateControl; |
82
|
|
|
} |
83
|
|
|
|
84
|
|
|
/** |
85
|
|
|
* @param RotateControl|null $rotateControl |
86
|
|
|
*/ |
87
|
|
|
public function setRotateControl(RotateControl $rotateControl = null) |
88
|
|
|
{ |
89
|
|
|
$this->rotateControl = $rotateControl; |
90
|
|
|
} |
91
|
|
|
|
92
|
|
|
/** |
93
|
|
|
* @return bool |
94
|
|
|
*/ |
95
|
|
|
public function hasScaleControl() |
96
|
|
|
{ |
97
|
|
|
return $this->scaleControl !== null; |
98
|
|
|
} |
99
|
|
|
|
100
|
|
|
/** |
101
|
|
|
* @return ScaleControl|null |
102
|
|
|
*/ |
103
|
|
|
public function getScaleControl() |
104
|
|
|
{ |
105
|
|
|
return $this->scaleControl; |
106
|
|
|
} |
107
|
|
|
|
108
|
|
|
/** |
109
|
|
|
* @param ScaleControl|null $scaleControl |
110
|
|
|
*/ |
111
|
|
|
public function setScaleControl(ScaleControl $scaleControl = null) |
112
|
|
|
{ |
113
|
|
|
$this->scaleControl = $scaleControl; |
114
|
|
|
} |
115
|
|
|
|
116
|
|
|
/** |
117
|
|
|
* @return bool |
118
|
|
|
*/ |
119
|
|
|
public function hasStreetViewControl() |
120
|
|
|
{ |
121
|
|
|
return $this->streetViewControl !== null; |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
/** |
125
|
|
|
* @return StreetViewControl|null |
126
|
|
|
*/ |
127
|
|
|
public function getStreetViewControl() |
128
|
|
|
{ |
129
|
|
|
return $this->streetViewControl; |
130
|
|
|
} |
131
|
|
|
|
132
|
|
|
/** |
133
|
|
|
* @param StreetViewControl|null $streetViewControl |
134
|
|
|
*/ |
135
|
|
|
public function setStreetViewControl(StreetViewControl $streetViewControl = null) |
136
|
|
|
{ |
137
|
|
|
$this->streetViewControl = $streetViewControl; |
138
|
|
|
} |
139
|
|
|
|
140
|
|
|
/** |
141
|
|
|
* @return bool |
142
|
|
|
*/ |
143
|
|
|
public function hasZoomControl() |
144
|
|
|
{ |
145
|
|
|
return $this->zoomControl !== null; |
146
|
|
|
} |
147
|
|
|
|
148
|
|
|
/** |
149
|
|
|
* @return ZoomControl|null |
150
|
|
|
*/ |
151
|
|
|
public function getZoomControl() |
152
|
|
|
{ |
153
|
|
|
return $this->zoomControl; |
154
|
|
|
} |
155
|
|
|
|
156
|
|
|
/** |
157
|
|
|
* @param ZoomControl|null $zoomControl |
158
|
|
|
*/ |
159
|
|
|
public function setZoomControl(ZoomControl $zoomControl = null) |
160
|
|
|
{ |
161
|
|
|
$this->zoomControl = $zoomControl; |
162
|
|
|
} |
163
|
|
|
} |
164
|
|
|
|