window.navigator.geolocation.getCurrentPosition( (position) => { this.mapOptions.center = { lat: position.coords.latitude, lng: position.coords.longitude, }; this.isLocationLoaded = true; }, () => { this.isLocationLoaded = true; } );