Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Geolocate control doesn't drape right with terrain and high pitch #10274

Open
asheemmamoowala opened this issue Jan 9, 2021 · 2 comments
Open
Labels
bug 🐞 GL native → GL JS For feature parity with Mapbox Maps SDK on a native platform

Comments

@asheemmamoowala
Copy link
Contributor

The geolocate control's accuracy circle isn't projected correctly at high pitch+zoom. It should remain attached to the surface. The accuracy circle needs to be rethought for instances when the geolocation is on a hill/slope.

image

image

This will eventually impact the various Mobile/Nav pucks as well.

cc @mapbox/mobile @d-prukop @avi-c

@asheemmamoowala
Copy link
Contributor Author

Comment from @astojilj

Positioning (given that markers are used here), to follow hight pitch and terrain, is fixed with #148 and #183. It remains attached to surface. Related to that part, this bug could be considered as fixed.

The accuracy circle needs to be rethought for instances when the geolocation is on a hill/slope.
Related to behavior of accuracy circle:

Accuracy circle has a feel (as it is one) of an overlaid HTML element - width and height are not implemented to follow map precisely in 2D either, which is observable when panning map in < 60 degrees pitch. This gives it 3D feel as it is laid over horizon when pitch > 60.

https://github.com/mapbox/mapbox-gl-js-internal/blob/decd73917b0dc032e4c619e993ce7c048ecc076e/src/ui/control/geolocate_control.js#L404-L405

https://github.com/mapbox/mapbox-gl-js-internal/blob/decd73917b0dc032e4c619e993ce7c048ecc076e/src/ui/control/geolocate_control.js#L310-L318

Aug-17-2020 08-01-14

Aug-17-2020 08-18-38

cc @mapbox/gl-native: related to work on location indicator.

@asheemmamoowala asheemmamoowala added the GL native → GL JS For feature parity with Mapbox Maps SDK on a native platform label Feb 11, 2021
@asheemmamoowala asheemmamoowala removed the GL native → GL JS For feature parity with Mapbox Maps SDK on a native platform label Mar 10, 2021
@karimnaaji karimnaaji added the GL native → GL JS For feature parity with Mapbox Maps SDK on a native platform label Apr 9, 2021
@andrewharvey
Copy link
Collaborator

An easy fix would implement the circle as a style circle layer, not an HTML element.

The problem is, at lest when I first contributed the geolocate dot, this will mutate the users style introducing extra layers and a style source. It might then break for existing applications which mutate the style or when using setStyle etc.

I still think so long as the user is made aware of this, it's probably okay, but it's no longer 100% taken care of by the SDK and the developer needs to manage these layers in their code (during setStyle).

Unless we implement internal style layers/sources to add to the map but are hidden from the user and survive setStyle etc... 💭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 GL native → GL JS For feature parity with Mapbox Maps SDK on a native platform
Projects
None yet
Development

No branches or pull requests

4 participants