TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rajveer Singh
NA
74
8.2k
Google map address, longitude, latitude to save in database
Sep 23 2016 10:51 AM
<span>Origin:</span><input type="text" id="txtautocomplete" style="width:200px" placeholder="enter start address" /><br /><br />
<label id="lblResult"></label>
<br /><br />
<script type="text/javascript">
google.maps.event.addDomListener(window, 'load', intilize);
function intilize(){
var autocomplete = new google.maps.places.Autocomplete(document.getElementById('txtautocomplete'));
google.maps.event.addListener(autocomplete, 'place_changed', function(){
var place = autocomplete.getPlace();
var location = "<b>Address:</b>" + place.formatted_address + "<br/>";
location += "<b>Latitude:</b> " + place.geometry.location.lat() + "<br/>";
location += "<b>Longitude:</b> " + place.geometry.location.lng();
document.getElementById('lblResult').innerHTML = location
});
};
</script>
from this code, im able to auto complete an address from google map and display the address, longitude, latitude.. how can i get this address, longitude, latitude to be saved into mysql database?
Reply
Answers (
2
)
Attendance Database
How to display orderno with its quantity