Q:

Split result in to Strings

I'm using a google function to return the Long/lat of a location based on an address, however when I try to split it out the results come back as undefined (it works if i alert results[0].geometry.latitude out) - but myLatLong does not get set
function getLatLong(address){
    var geo = new google.maps. Geocoder;
geo.geocode({'address':address},function(results, status){
    var myLatLong;
    if (status == google.maps. GeocoderStatus. OK) {

        myLatLong = results[0].geometry.latitude;
        localStorage.setItem("SearchLat", myLatLong.split("," ,0));
        localStorage.setItem("SearchLong", myLatLong.split("," ,1));

    } else {
        alert("Geocode was not successful for the following reason: " + status);
    }

});

}

A:

The geometry.location is an object, not a string.   From the API:

location contains the geocoded latitude,longitude value.  Note that we return this location as a LatLng object, not as a formatted string. 

I think you need:
myLatLong = results[0].geometry.location;
localStorage.setItem("SearchLat", myLatLong.lat());
localStorage.setItem("SearchLong", myLatLong.lng());

Note that you can also convert a LatLng object to a string "lat,lng" using toUrlValue, so I guess you could also use this:
var myLatLong = results[0].geometry.location.toUrlValue();
localStorage.setItem("SearchLat", myLatLong .split(",")[0]);
localStorage.setItem("SearchLong", myLatLong.split(",")[1]);

