Skip to content

PB-521: fix geolocation tracking, zindex and accuracy and several geolocation improvements#864

Merged
pakb merged 5 commits intodevelopfrom
bug-PB-521-goelocation
May 27, 2024
Merged

PB-521: fix geolocation tracking, zindex and accuracy and several geolocation improvements#864
pakb merged 5 commits intodevelopfrom
bug-PB-521-goelocation

Conversation

@ltshb
Copy link
Contributor

@ltshb ltshb commented May 27, 2024

The geolocation tracking on non touch device was canceled as soon as the mouse
moved on the map, even if not action was undertaken ! Now we use the setCenter
to cancel the tracking, unless the setCenter is triggered by the geolocation.

Also did some improvement using the geolocation API by allowing cached location
and setting a timeout.

Also when re-activating the geolocation we first set the previous location
to make the app more reactive.

Also fixed the geolocation z-index, the geolocaiton marker would have been put behind new layers.

Test link

@github-actions github-actions bot added the bug label May 27, 2024
@cypress
Copy link

cypress bot commented May 27, 2024

Passing run #2322 ↗︎

0 208 20 0 Flakiness 0

Details:

PB-521: PR review
Project: web-mapviewer Commit: b36092a19a
Status: Passed Duration: 04:59 💡
Started: May 27, 2024 2:29 PM Ended: May 27, 2024 2:34 PM

Review all test suite changes for PR #864 ↗︎

@ltshb ltshb requested a review from pakb May 27, 2024 09:24
@ltshb ltshb force-pushed the bug-PB-521-goelocation branch from f305a37 to 202a77b Compare May 27, 2024 09:24
@ltshb
Copy link
Contributor Author

ltshb commented May 27, 2024

@pakb this solve PB-521 but still require to implement the geolocation marker on 3D. I'm also wondering if we should not add the enablehighaccuracy: true flag https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/getCurrentPosition#enablehighaccuracy while I tested the geolocation moving in my town the location was not very accurate...
I let merge and/or update this PR if needed thanks

@pakb
Copy link
Contributor

pakb commented May 27, 2024

As I'm guessing you're already in vacation, I'll take over the little changes I proposed 😉

ltshb and others added 5 commits May 27, 2024 16:24
The geolocation circle was not always on top of the map, if you added a new map
then it covered the geolocation circle.

Also simlified the z-index computation, always reserve the z-index for the elements
even if they are not enabled, this make a code simpler and more robust.
Vue requires a template
The geolocation API might return a double number for the accuracy, in this case
the accuracy was ignored.

Now it is correctly set and if it is not a valid number an error is printed.
The geolocation tracking on non touch device was canceled as soon as the mouse
moved on the map, even if not action was undertaken ! Now we use the setCenter
to cancel the tracking, unless the setCenter is triggered by the geolocation.

Also did some improvement using the geolocation API by allowing cached location
and setting a timeout.

Also when re-activating the geolocation we first set the previous location
to make the app more reactive.
no empty divs in template
use of our already implemented utils to detect if geolocation accuracy is a number
@pakb pakb force-pushed the bug-PB-521-goelocation branch from 202a77b to b36092a Compare May 27, 2024 14:24
@pakb pakb merged commit ac76f67 into develop May 27, 2024
@pakb pakb deleted the bug-PB-521-goelocation branch May 27, 2024 14:34
@cypress cypress bot mentioned this pull request May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants