-
-
Notifications
You must be signed in to change notification settings - Fork 839
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
MarkerView does not follow map on drag (Android) #1546
Comments
I found a related open issue for the native Android plugin used by Unfortunately, it seems this bug has likely been around for over a year. |
@traviswimer thanks for looking into it, it seems to be fixed by mapbox/mapbox-plugins-android#1165 but not sure if they'll release a binary. Also v9 of mapbox seems to be deprecated. |
What I did to include this fix right now (using reflection):
|
@jorisoudejans : looking forward to review a PR, that I'm sure would make many users of this repo pretty happy :) |
@ferdicus A PR (not mine) has been merged already, but no binary has been released. |
Where did you add this fix to use it? |
In the |
@mfazekas Thanks for the insight, although I'm a little confused on exactly what this means. Are you saying the If so, what does that mean for |
Just to clarify the rich mapbox history, here a little write up with some links. It's all a bit confusing, I'll try to show it with a flow:
The lib that was the center for the licensing debate was Additionally the two SDK libs Shortly after, So all in all:
We are at the moment heading towards a crossroad with this repo, where we decide to either continue supporting mapbox after v10 or leaning towards the opensource fork of mapbox => mapLibre |
@traviswimer so mapbox released(ing) a almost rewrite of their libs with Kotlin and Swift - https://docs.mapbox.com/ios/beta/maps/guides/ https://docs.mapbox.com/android/beta/maps/guides/ and the <= v9 version we use is no longer seems to be maintained. No MarkerView like plugin seems to be exists for v10. And there is MapLibre which is an open source fork of v9ish version https://github.com/react-native-mapbox-gl/maps/discussions/1274 |
related to #1282 |
Sorry - I'm just getting up to speed here. I am hoping to use this repo with expo to deploy a GIS app, but I see now that some big changes might be underway - I'm happy to help out anyway I can but my experience in the mobile space is very limited. Can anyone comment on which way the repo is looking to go longterm in terms of mapbox vs maplibre? |
same problem |
mapbox is the worst map in the world |
@ombogdan, thanks for helping to make it better 👍🏿 |
We also have this but the pin is not snapping to where it needs to be after the drag has finished |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
For anyone coming across this, the bug does seem to be fixed now: #1735 It's not a 100% perfect fix, but it is pretty close. The markers now move with only a very slight delay, which should generally be acceptable functionality. In other words, if you're experiencing this bug, you should try upgrading to the latest version. |
Which version did you upgrade to?
Would be great if you can help with how you fixed it for your app. |
@dpz3579 I think I just worded my comment poorly (or I was confused about the current release at the time). I installed the npm package directly from a Github URL. In other words, my
If you look at the pull request I mentioned (#1735), you can see it was merged to 8.6.0-beta.0 was released on Mar 6 though, so you should be able to use that. I guess my original comment is a little misleading, since it's not necessarily ideal to use a beta release, but in my case it was worth it to solve this bug. If that doesn't work, let me know and I can check if there's anything else I changed, but I think this is probably the main difference. |
@traviswimer Thanks for pointing out the exact PR & commit. I tried to install it by configuring it in my package.json, But when I made the changes in my node_modules folder & specific files. I was able to resolve it. So thanks a lot for it. 👏 |
Describe the bug
When using
MarkerView
s on Android, if you drag the map to another position, the marker will remain in the same position on the screen rather than following the movement of the map. Once the drag has stopped, the marker seems to move to the correct location.To Reproduce
This bug seems to be present any time a
<MarkerView />
is used on Android.It can actually be seen in the current example code for
react-native-mapbox-gl
under "Annotations/MarkerView": https://github.com/react-native-mapbox-gl/maps/blob/master/example/src/examples/Annotations/MarkerView.jsExpected behavior
The marker should remain at the same position on the map while dragging.
Actual behavior
The marker remains at a static position on the screen rather than moving along with the map.
Screenshots
Here is a video of the bug viewed in the unaltered project example code:
I also updated the example to include more
MarkerView
s to make it more apparent what is happening:Versions (please complete the following information):
Additional context
It kind of looks like when a marker hits the edge of the screen it just get's stuck there rather than being removed. Maybe there is a bug in the code checking for elements that are not within the visible map?
Something interesting to note is that this bug does not seem to occur with
PointAnnotation
s, onlyMarkerView
s.I think this bug is specific to Android, as I am not seeing any problems on iOS.
Also, if you move the screen more slowly, you can see that the markers are slightly delayed in maintaining their correct location on the map. I'm not sure if that is even the same bug though.
The text was updated successfully, but these errors were encountered: