1 | <?php |
||
9 | class Google_Maps { |
||
10 | |||
11 | /** |
||
12 | * @var string |
||
13 | */ |
||
14 | protected static $_version = '0.1.6'; |
||
15 | |||
16 | /** |
||
17 | * @var string |
||
18 | */ |
||
19 | protected static $_api_key = ''; |
||
20 | |||
21 | /** |
||
22 | * @var Geocoder |
||
23 | */ |
||
24 | protected static $_geocoder; |
||
25 | |||
26 | /** |
||
27 | * These conditions will be used to determine whether to enqueue the Google Maps JS. |
||
28 | * |
||
29 | * @var array |
||
30 | */ |
||
31 | protected static $_script_conditions = array(); |
||
32 | |||
33 | /** |
||
34 | * The path to this library's directory |
||
35 | * |
||
36 | * @var string |
||
37 | */ |
||
38 | protected static $_source_dir; |
||
39 | |||
40 | /** |
||
41 | * The url to this module's directory |
||
42 | * |
||
43 | * @var string |
||
44 | */ |
||
45 | protected static $_source_url; |
||
46 | |||
47 | /** |
||
48 | * |
||
49 | */ |
||
50 | public static function initialize() { |
||
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | 1 | public static function api_key() { |
|
66 | |||
67 | /** |
||
68 | * @param array $args |
||
69 | * @return Map |
||
70 | */ |
||
71 | 1 | public static function make_new_map( $args = array() ) { |
|
77 | |||
78 | /** |
||
79 | * @param string $key |
||
80 | */ |
||
81 | 1 | public static function register_api_key( $key ) { |
|
86 | |||
87 | /** |
||
88 | * @param callable|bool $condition |
||
89 | */ |
||
90 | 1 | public static function register_script_condition( $condition ) { |
|
95 | |||
96 | 1 | public static function _wp_enqueue_scripts_9() { |
|
105 | |||
106 | /** |
||
107 | * @param string $address |
||
108 | * @param array $args |
||
109 | * @return Marker |
||
110 | */ |
||
111 | 1 | public static function make_marker_by_address( $address, $args = array() ) { |
|
121 | |||
122 | /** |
||
123 | * @param float $lat |
||
124 | * @param float $lng |
||
125 | * |
||
126 | * @return Marker |
||
127 | */ |
||
128 | 1 | public static function make_marker_by_position( $lat, $lng, $args = array() ) { |
|
140 | |||
141 | /** |
||
142 | * @param string $destination |
||
143 | * @param array $args |
||
144 | * @return string |
||
145 | */ |
||
146 | 1 | public static function driving_directions_href($destination, $args = array() ) { |
|
154 | |||
155 | /** |
||
156 | * @return string |
||
157 | */ |
||
158 | 1 | public static function source_dir() { |
|
163 | |||
164 | /** |
||
165 | * @return string |
||
166 | */ |
||
167 | public static function source_url() { |
||
180 | |||
181 | /** |
||
182 | * @return string |
||
183 | */ |
||
184 | 1 | public static function version() { |
|
189 | |||
190 | /** |
||
191 | * @return bool |
||
192 | */ |
||
193 | 1 | protected static function _evaluate_conditions() { |
|
211 | |||
212 | /** |
||
213 | * |
||
214 | */ |
||
215 | 1 | protected static function _register_scripts() { |
|
228 | |||
229 | /** |
||
230 | * @return array |
||
231 | */ |
||
232 | 1 | protected static function _script_conditions() { |
|
237 | |||
238 | /** |
||
239 | * @return Geocoder |
||
240 | */ |
||
241 | 1 | protected static function _geocoder() { |
|
250 | |||
251 | } |
||
252 |