My task is to identify markers from a JSON file. However, if the current json doesn't contain any latitude and longitude coordinates, it should calculate them. Unfortunately, this functionality does not seem to be working.
//For instance,
item.county = 'Orust'
//and
item.region = 'Bohuslän'
What could be causing this issue?
if(lat == null)
{
geocoder.geocode({ 'address': item.county+', '+item.region}, function(result, status) {
if (status == google.maps.GeocoderStatus.OK) {
if(result[0])
{
latlng = result[0].geometry.location
}
}
});
Am I overlooking something?