1 | <?php |
||
4 | class DynamicGoogleMapSmarter extends Object |
||
|
|||
5 | { |
||
6 | |||
7 | /** |
||
8 | * points are formatted like this: |
||
9 | * - points:[ |
||
10 | * - id: ... |
||
11 | * - title: .... |
||
12 | * - address: ... |
||
13 | * - lat: ... |
||
14 | * - lng: .... |
||
15 | * ] |
||
16 | * address OR lat / lng are optional (set lat / lng to zero to ) |
||
17 | * |
||
18 | * @param array $points |
||
19 | * @param string $markerCallback (optional) |
||
20 | * @return this |
||
21 | */ |
||
22 | public function createMap($points, $markerCallback = null) |
||
58 | |||
59 | private static $map_id = 'google-map'; |
||
60 | |||
61 | private static $icon_is_retina_size = true; |
||
62 | |||
63 | private static $icon_url = 'http://icons.iconarchive.com/icons/paomedia/small-n-flat/1024/map-marker-icon.png'; |
||
64 | |||
65 | private static $icon_width = 90; |
||
66 | |||
67 | private static $icon_height = 90; |
||
68 | |||
69 | private static $default_zoom = 7; |
||
70 | |||
71 | private static $default_location_lat = -45; |
||
72 | |||
73 | private static $default_location_lng = 174; |
||
74 | |||
75 | private static $marker_callback_fx = null; |
||
76 | |||
77 | protected $mapID = null; |
||
78 | |||
79 | protected $iconIsRetinaSize = null; |
||
80 | |||
81 | protected $iconURL = null; |
||
82 | |||
83 | protected $iconWidth = null; |
||
84 | |||
85 | protected $iconHeight = null; |
||
86 | |||
87 | protected $defaultZoom = null; |
||
88 | |||
89 | protected $defaultLocationLat = null; |
||
90 | |||
91 | protected $defaultLocationLng = null; |
||
92 | |||
93 | protected $markerCallbackFx = null; |
||
94 | |||
95 | public function setMapID($s) |
||
99 | |||
100 | public function getMapID($s) |
||
104 | |||
105 | public function setIconIsRetinaSize($s) |
||
109 | |||
110 | public function getIconIsRetinaSize($s) |
||
114 | |||
115 | |||
116 | public function setIconURL($s) |
||
120 | |||
121 | public function getIconURL($s) |
||
125 | |||
126 | public function setIconWidth($s) |
||
130 | |||
131 | public function getIconWidth($s) |
||
135 | |||
136 | public function setIconHeight($s) |
||
140 | |||
141 | public function getIconHeight($s) |
||
145 | |||
146 | public function setDefaultZOom($s) |
||
150 | |||
151 | public function getDefaultZoom($s) |
||
155 | |||
156 | public function setDefaultLocationLat($s) |
||
160 | |||
161 | public function getDefaultLocationLat($s) |
||
165 | |||
166 | public function setDefaultLocationLng($s) |
||
170 | |||
171 | public function getDefaultLocationLng($s) |
||
175 | |||
176 | public function setMarkerCallbackFX($s) |
||
180 | |||
181 | public function getMarkerCallbackFX($s) |
||
185 | |||
186 | /** |
||
187 | * |
||
188 | * |
||
189 | * @param string $internalVariableName the variable name |
||
190 | * @param string $staticVariableName the static variable name |
||
191 | * |
||
192 | * @param return this |
||
193 | */ |
||
194 | protected function getMapVariable($internalVariableName, $staticVariableName) |
||
202 | |||
203 | /** |
||
204 | * |
||
205 | * |
||
206 | * @param string $internalVariableName the variable name |
||
207 | * @param mixed $s the variable to set |
||
208 | * |
||
209 | * @param return this |
||
210 | */ |
||
211 | protected function setMapVariable($internalVariableName, $s) |
||
216 | } |
||
217 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.