Published
Edited
Jan 21, 2020
Insert cell
md`# GeoLocation Test`
Insert cell
geolocation = new Promise((resolve, reject) => {
let myPositionCallbackFunction = (position) => resolve(position.coords);
let myPositionErrorCallbackFunction = (error) => reject(error.message);
navigator.geolocation.getCurrentPosition(
myPositionCallbackFunction,
myPositionErrorCallbackFunction,
{ enableHighAccuracy: true, timeout: 5000 }
);
}).catch(error => error);
Insert cell
geolocation.latitude;
Insert cell
geolocation.longitude;
Insert cell
geolocation.accuracy;
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more