I\'m using the below code, but how to get the city name or the location name from the longitude & latitude?
var x=document.getElementById(\"location\"); func
You can use the Google Maps v3 API to perform reverse geocoding on a latitude and longitude pair. You can find an example of how to do that here: https://developers.google.com/maps/documentation/geocoding/#ReverseGeocoding.