Platform
Resources
Pricing
Sign in
Get started
Ben Pyrik
Agrarian cyberpunk.
Workspace
Fork
Published
By
Ben Pyrik
Edited
Nov 7, 2019
2 forks
2 stars
Insert cell
Insert cell
Insert cell
available
=
{
if
(
"geolocation"
in
navigator
)
{
/* geolocation is available */
return
true
;
}
else
{
/* geolocation IS NOT available */
return
false
;
}
}
Insert cell
Insert cell
position
=
{
return
new
Promise
(
(
resolve
,
reject
)
=>
{
navigator
.
geolocation
.
getCurrentPosition
(
resolve
,
reject
,
{
enableHighAccuracy
:
true
}
)
;
}
)
;
}
Insert cell
Insert cell
Insert cell
Insert cell
currentPosition
=
Generators
.
observe
(
next
=>
{
navigator
.
geolocation
.
watchPosition
(
next
,
next
,
{
enableHighAccuracy
:
true
}
)
;
}
)
Insert cell
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.
Try it for free
Learn more
Fork
View
Export
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
available
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
position
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
currentPosition
Add comment
Copy import
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML
Edit
Add comment
Select
Duplicate
Copy link
Embed
Delete
JavaScript
Markdown
HTML