I don't have the page on a server as of right now, I want to make sure it all works. So I posted it on pastebin.com. http://pastebin.com/f24e16f94
On Feb 6, 4:20 pm, "[email protected]" <[email protected]> wrote: > On Feb 6, 1:59 pm, PrestonB <[email protected]> wrote: > > > > > I am trying to make a script to where the user can add different > > addresses to an overall database by just inputing the address, city, > > and state. Then the script with the geocoder would find the latitude > > and longitude and save them as variables like address, city, and state > > so I can use them in another function. I know that the geocoder is > > Asynchronus and I have a callback function for it. But inside the > > callback function the variables don't seem to get changed. > > Any help to make the latitude and longitude response from the geocoder > > into actual variables would be much appreciated! > > > function showAddress() { > > var form = document.getElementById('houseForm'); > > > address = form.address.value; > > city = form.city.value; > > state = form.state.value; > > zip = form.zip.value; > > fullform = address + " " + city + ", " + state; > > var point, lat, lng; > > > geocoder.getLocations(fullform, function(response){ > > var place = response.Placemark[0]; > > point = place.Point.coordinates; > > lat= point[1]; > > lng= point[0]; > > }); > > http://groups.google.com/group/Google-Maps-API/web/why-including-a-li... -- You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.
