@@ 147-156 (lines=10) @@ | ||
144 | * @param array $args |
|
145 | * @return Marker |
|
146 | */ |
|
147 | public static function make_marker_by_address( $address, $args = array() ) { |
|
148 | ||
149 | $args = wp_parse_args( $args, array( |
|
150 | 'address' => $address, |
|
151 | 'geocoder' => self::geocoder(), |
|
152 | ) ); |
|
153 | ||
154 | return new Marker( $args ); |
|
155 | ||
156 | } |
|
157 | ||
158 | /** |
|
159 | * @param float $lat |
|
@@ 164-176 (lines=13) @@ | ||
161 | * |
|
162 | * @return Marker |
|
163 | */ |
|
164 | public static function make_marker_by_position( $lat, $lng, $args = array() ) { |
|
165 | ||
166 | $args = wp_parse_args( $args, array( |
|
167 | 'geocoder' => self::geocoder(), |
|
168 | )); |
|
169 | ||
170 | return new Marker( array( |
|
171 | 'lat' => $lat, |
|
172 | 'lng' => $lng, |
|
173 | ||
174 | ) ); |
|
175 | ||
176 | } |
|
177 | ||
178 | /** |
|
179 | * @param string $destination |