Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
2
Reply
Google map address, longitude, latitude to save in database
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Rajveer Singh
8y
276
1
Reply
<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?
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
Attendance Database
How to display orderno with its quantity