[Vuejs]-Shift marker by given specific user input

0๐Ÿ‘

โœ…

I have found the solution by using this endpoint:

https://maps.googleapis.com/maps/api/geocode/json?address=1600+Amphitheatre+Parkway,+Mountain+View,+CA&key=YOUR_API_KEY

Instead of the actual address, I have concatenated the variables that are storing these, so then whenever one of them changes, I am doing this API call, where I get in return the Lat and Lng along with another bunch of stuff, and then is here where I push the coordinates into my markerArray, and the pin shift accordingly.

Ref: https://developers.google.com/maps/documentation/geocoding/intro

Leave a comment