Created
March 22, 2020 02:07
-
-
Save softauthor/99b140fd7507c5f7e5b08ad7910f2cb6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
addLocationsToGoogleMaps() { | |
var map = new google.maps.Map(this.$refs['map'], { | |
zoom: 15, | |
center: new google.maps.LatLng(this.lat, this.lng), | |
mapTypeId: google.maps.MapTypeId.ROADMAP | |
}); | |
this.places.forEach((place) => { | |
const lat = place.geometry.location.lat; | |
const lng = place.geometry.location.lng; | |
let marker = new google.maps.Marker({ | |
position: new google.maps.LatLng(lat, lng), | |
map: map | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment