@kizmann/pico-js 0.3.8 → 0.3.9
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/pico-js.js +1 -1
- package/dist/pico-js.js.map +1 -1
- package/package.json +1 -1
- package/src/library/map.js +8 -1
package/package.json
CHANGED
package/src/library/map.js
CHANGED
@@ -404,6 +404,13 @@ export default class Map
|
|
404
404
|
}
|
405
405
|
|
406
406
|
setMarkerByAddress(key, address)
|
407
|
+
{
|
408
|
+
return this.getLocationByAddress(key, address, (res) => {
|
409
|
+
this.setMarkerPosition(key, Obj.get(res, '0.geometry.location', {}));
|
410
|
+
});
|
411
|
+
}
|
412
|
+
|
413
|
+
getLocationByAddress(key, address, callback = null)
|
407
414
|
{
|
408
415
|
let geocoderService = new global.google.maps.Geocoder();
|
409
416
|
|
@@ -412,7 +419,7 @@ export default class Map
|
|
412
419
|
let geocoderResult = (response, status) => {
|
413
420
|
|
414
421
|
if ( status === 'OK' ) {
|
415
|
-
|
422
|
+
callback(response);
|
416
423
|
resolve(response);
|
417
424
|
}
|
418
425
|
|