Ошибка при расщеплении results[0].geometry.location
.Я пытаюсь разделить это
geocoder = new google.maps.Geocoder();
codeAddress();
function codeAddress() {
var address = "Karachi, Pakistan";
geocoder.geocode( { 'address': address}, function(results, status) {
if (status == google.maps.GeocoderStatus.OK) {
var variable = results[0].geometry.location;
// this will return latitutde and longitutde, I want to split this
// because it is in a format like (54.8773,99.8038994749)
var next = variable.split(",");
// this giving an error "TypeError: Object has no method 'split'"
}
});
}