A look at the geolocation HTML element and how it works

2 months ago by codeinabox to c/webdev

There’s a new HTML in town that provides a much better interface for geolocation than the older API. Daniel Schwarz is here to explain how it all works together.
Zachariah 2 points 2 months ago

I didn’t finish reading. Is there a clean way for a user to input their location instead of it being read drizzly from the machine?

path: 0 25427890, hotness: undefined, score: 2, children: 3
codeinabox 1 point 2 months ago

Good question, though wouldn't that be a feature of the browser? It wouldn't be a good user experience asking people to manually enter coordinates.

path: 0 25427890 25428011, hotness: undefined, score: 1, children: 2
Zachariah 2 points 2 months ago

Yeah, that would be an excellent feature of the browser. That way the site doesn’t even know if it’s your current location or just one you picked.

I was thinking a clickable map. But also allow pasting coordinates.

path: 0 25427890 25428011 25428054, hotness: undefined, score: 2, children: 1
elmicha 2 points 2 months ago

In Android's development settings you can select an app to spoof the location, but I don't know what apps for this purpose exist.

path: 0 25427890 25428011 25428054 25429406, hotness: undefined, score: 2, children: 0
webdev
webdev

@programming.dev

login for more options
5884
902
336

Welcome to the web development community! This is a place to post, discuss, get help about, etc. anything related to web development

What is web development?

Web development is the process of creating websites or web applications

Rules/Guidelines

  • Follow the programming.dev site rules
  • Keep content related to web development
  • If what you're posting relates to one of the related communities, crosspost it into there to help them grow
  • If youre posting an article older than two years put the year it was made in brackets after the title

Related Communities

Wormhole

Some webdev blogs

Not sure what to post in here? Want some web development related things to read?

Heres a couple blogs that have web development related content

Credits

Icon base by Delapouite under CC BY 3.0 with modifications to add a gradient

go to feed...