Skip to content

Instantly share code, notes, and snippets.

View georgzoeller's full-sized avatar

Georg Zoeller georgzoeller

View GitHub Profile
anonymous
anonymous / Javascript Geo Location
Created October 18, 2011 09:15
var GEO_LOCATION = {
watchID: null,
callback: null
};
GEO_LOCATION.mySpot = function(position){
var lat = (position.coords) ? new String(position.coords.latitude) : position.x;
var lon = (position.coords) ? new String(position.coords.longitude) : position.y;
return GEO_LOCATION.callback(lat, lon);
}