Last active
June 16, 2020 15:47
-
-
Save hfogelberg/dbefea340cecb60086bbf3d4ec56c4c4 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
| this.autocomplete.addListener('place_changed', () => { | |
| let place = this.autocomplete.getPlace(); | |
| let ac = place.address_components; | |
| let lat = place.geometry.location.lat(); | |
| let lon = place.geometry.location.lng(); | |
| let city = ac[0]["short_name"]; | |
| console.log(`The user picked ${city} with the coordinates ${lat}, ${lon}`); | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
is there any better way to manage with multiple fields (Like. Add more/Remove field)