From 4aeaab5d471847083b8d22b67ca31bc92afd1754 Mon Sep 17 00:00:00 2001 From: CPdA Date: Wed, 19 Aug 2020 17:07:51 +0200 Subject: [PATCH 1/2] add the possibility to define default Location dfLat and dfLng ca be tested --- src/location-picker.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/location-picker.ts b/src/location-picker.ts index 72c6f43..18ba416 100644 --- a/src/location-picker.ts +++ b/src/location-picker.ts @@ -20,7 +20,7 @@ export default class LocationPicker { Object.assign(pO, options) let mO: MapOptions = { - center: new google.maps.LatLng(pO.lat ? pO.lat : 34.4346, pO.lng ? pO.lng : 35.8362), + center: new google.maps.LatLng(pO.lat ? pO.lat : pO.dfLat ? pO.dfLat : 34.4346, pO.lng ? pO.lng : pO.dfLng ? pO.dfLng : 35.8362), zoom: 15 } From 7b5dddadc0ebc6b9d82cfd4a6557b5a4bf6c8b9d Mon Sep 17 00:00:00 2001 From: CPdA Date: Wed, 19 Aug 2020 17:09:56 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 16f9eb9..43ed980 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,9 @@ Options specific for this plugin * `lat`: latitude of initial needed position * `lng`: longitude of initial needed position * `setCurrentPosition`: specifies if you want the plugin to automatically try and detect and set the marker to the the current user's location. It has no effect if `lat` and `lng` are supplied. _(defaults to true)_ +* `dfLat` : default latitude if `lat` is not defined and setCurrentPosition is false or does not work +* `dfLng` : default latitude if `lng` is not defined and setCurrentPosition is false or does not work + #### `mapOptions`: