Beginning-Beginner - wants to know how to feed variables to google.map functions

22 views
Skip to first unread message

pizzipie

unread,
Oct 29, 2015, 9:15:40 PM10/29/15
to Google Maps JavaScript API v3

I'm trying to feed the various google.geocode functions. You can see in the attached file I create myLat and myLong to

ie: var myLatLng = new google.maps.LatLng(myLat, myLong); This does not work.

My goal is to create code that will use a form to input an address and feed it to google.maps Then show the Lat and Long of the address. I got this to work in the enclosed file but the reverse is not working, feed in Lat and Long via variables  and get an address.
So far all I can do to get it to work is to feed the actual Lat & Long to the program.

Help appreciated.

 
index2.html

JKurtock

unread,
Oct 31, 2015, 7:09:34 PM10/31/15
to Google Maps JavaScript API v3, pizz...@sandpoint.net
Your code works for me.

Do you get an error message? (check the console).
Reply all
Reply to author
Forward
0 new messages