I don\'t have any previous javascript experience.
I\'m trying to implement the following function which I wish to use to return the values lat and lng:
f
In header section add google library:
correct syntax errors and then start the function: DEMO
CODE (with jquery onload):
var lat = "";
var lng = "";
function getLatLng(callback) {
lat = callback.lat();
lng = callback.lng();
alert(lat +" "+lng);
}
$(function() {
var geocoder = new google.maps.Geocoder()
geocoder.geocode({
address: "SE-17270 Sverige"
}, function(locResult) {
getLatLng(locResult[0].geometry.location);
});
});