You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Like iOS in #6254, we need some refactoring to make the layer/source ownership more convenient for developers. Atm, after adding a newly created layer/source to the map, the original java reference becomes unusable. To facilitate this a bit, we throw a Java exception to report misuse of the api to the developer. But this is not well understood.
Instead, we can also keep a raw pointer to the layer/source after transferring ownership and make sure the reference to the map is set.
ToDo:
Get rid of explicit checks for validity
Refactor core object transfer so that the native map reference is set when adding the layer/source to the map (needed for CustomLayer::update)
Ensure that adding a layer/source to the map that was already added throws a nice Java exception
Activity
jfirebaugh commentedon Nov 10, 2016
#6959 and the discussion there is also relevant.
boundsj commentedon Nov 11, 2016
I proposed #7014 for #6959. If there is interest in using in for Android see #7014 (comment)
ivovandongen commentedon Nov 11, 2016
@jfirebaugh @boundsj Thanks, I missed that ticket completely.
@boundsj If you could get your PR merged, I'll make the necessary changes to this one to take advantage of it for Android.
ivovandongen commentedon Nov 11, 2016
@jfirebaugh @boundsj I've created a separate ticket (#7023) for the ownership transfer on remove so these changed are not held up by that.
cc @tobrun @zugaldia