Im trying to write a function that will give return latitude and longitude from a zip code. I am attempting to use google maps api to do this.
I am seeing that geocoder seems to be good for this but I am struggling to know how to use it. What im looking to do is use a function to return a passed in zip code to return as an array with the latitude and longitude coordinates.
I created an account to get an API key. For example lets say my function is:
function getCoordinates (zipcode);
How can I write this out so that passed in zipcode would return the lat and long? Thanks for any responses!