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 has been 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
Add JavaDoc:
MapboxMap#addLayer
MapboxMap#removeLayer
MapboxMap#addSource
MapboxMap#removeSource
The text was updated successfully, but these errors were encountered:
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:
CustomLayer::update
)MapboxMap#addLayer
MapboxMap#removeLayer
MapboxMap#addSource
MapboxMap#removeSource
The text was updated successfully, but these errors were encountered: