w3c / geolocation

W3C Geolocation API
https://www.w3.org/TR/geolocation/
81 stars 56 forks source link

Position data isn't passed into 'new GeolocationPosition' #137

Closed jyasskin closed 1 month ago

jyasskin commented 10 months ago

Acquire a position says to "try to acquire position data", and later it says "Set position be a new GeolocationPosition passing acquisitionTime and options.enableHighAccuracy." without mentioning that position data. new GeolocationPosition then says "Initialize coord's latitude attribute to a geographic coordinate" without giving any indication of what the coordinate should be. These should be wired up.

I'd speculate that the flexibility in new GeolocationPosition might have originally been to allow users to override their real position, but that should probably be handled in request a position by where permission is handled.

While someone's touching this, I also note that several of the steps after "if position is not cachedPosition" should actually be conditional on that, and not run when position has been set to cachedPosition.