-
-
Notifications
You must be signed in to change notification settings - Fork 854
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
[WIP] AnimatedLineString Support #615
Conversation
Hey @EricPKerr, thanks for opening this - I didn't really have time to look over this in detail. Do you think you could get those up and running? Thanks in advance |
Thanks a lot for your contribution, this is awesome. I'll have a proper look this weekend or early next week. I haven't used any of the animated features yet nor reviewed the initial implementation. At initial glance, this seems straightforward and well implemented. My only thought is that we may want to hard crash if props are not set properly instead of putting coordinates at Tests and potentially a simple example would be really nice for something like this. We can do this in a followup PR though. I'd also imagine animated polygons would be pretty cool. |
@kristfal thanks for spending the time to review this. The biggest issue I'm having with this is adding and removing coordinates from the array and having those work properly in the MapboxGL.Animated.ShapeSource/LineLayer. Removing items from the coordinates array doesn't work, as the removed coordinate is still referenced in the ShapeSource/LineLayer. I think there's something wrong with the attach/detach and addChild/removeChild logic, because I also get a yellowbox "trying to remove a child that doesn't exist". Once we can get arrays of coordinates working, the other shape types (polygons, etc) should be very doable. What i'd like to accomplish is being able to:
And have the last coordinate go from [1, 1] to [2, 2] so the animation is smooth and the line looks like it's growing (editing the existing coordinate pairs should work too). Code for above:
|
@EricPKerr you happy with this going into next release? |
Hi @kristfal - everything seems to currently work except removing coordinates from the LineString.coordinates array. The array is being modified with the removed coordinate, but it's not propagating properly in the Animated ShapeSource. I think there is an issue with the removeChild or detach logic. Any feedback on how that's set up or what might be breaking? |
Hey, sorry I haven't been able to investigate. I suggest we hold off until we have that sorted. I'll push out release now with updated Android native SDK, and hope we can get this into the release after. |
Thanks @kristfal - a review would be helpful and then i'd be glad to add a few additional GeoJSON shapes (Polygon would be awesome).
But removing coordinates from within the |
Off topic: I wish |
This is being superseded by https://github.com/react-native-mapbox-gl/maps/pull/702 🙂 |
Hello,
I'd like to add support for an AnimatedLineString (via refactoring AnimatedPoint into AnimatedCoordinates to be reusable by other GeoJSON shapes).
This is usable by:
The biggest thing I'd like feedback on is the
__attach
and__addChild
implementations.Tagging a few folks tied to the original AnimatedPoint code for feedback: @ferdicus @kristfal @mfazekas