-
-
Notifications
You must be signed in to change notification settings - Fork 65
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
Export HeadingIndicator from MapLibreRN.ts #692
base: main
Are you sure you want to change the base?
Conversation
Thanks @Thhomy, what is the motivation behind this and the use case? |
I have a custom UserLocation and I use HeadingIndicator inside |
I'm not sure if we want to expose the component in its current state. I would rather like to see it cleaned-up prior to exporting. You can easily re-create this component with an even adopted style of you own. |
Ok thanks! |
hey @Thhomy, can you explain your use case for a custom UserLocation? This is the second request we got for this. Trying to understand the motivation / requirement. |
I prefer to manage the location externally to MapLibre (using Expo Location) to get background location updates. For the heading, I use the magnetometer signal filtered with a low-pass filter. |
@Thhomy, that's interesting! Why use background location updates? If the app is in the background, the map can't update? Can you expand on this:
|
Yes, when the app is in the background, the location is not updated. You need to request background location permissions or create a background task that displays a notification. Regarding the heading coming from location updates, it represents the direction of travel. However, for pedestrian use, it's often more useful for the heading to represent the phone's orientation. It could be interesting to have an option in Maplibre to switch between these two modes. Sorry my code is a bit messy at the moment but I use I also modified the pulse circle around the user location indicator to reflect the location accuracy. |
Is your problem just on Android? Have you tried using the |
I only tried on Android so far. I haven't try |
This PR adds an export for HeadingIndicator in MapLibreRN.ts, allowing it to be imported directly from the main package entry point.