Skip to content
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

Wrap MapData Objects in MapzenMap API #500

Open
sarahsnow1 opened this issue Nov 3, 2017 · 0 comments
Open

Wrap MapData Objects in MapzenMap API #500

sarahsnow1 opened this issue Nov 3, 2017 · 0 comments

Comments

@sarahsnow1
Copy link
Member

Currently, we return the Tangram MapData object when a developer adds a polyline, polygon, or marker using MapzenMap#addPolyline(Polyline) etc. This is problematic when combined with MapzenMap#setPersistMapData(true) because updating of internal state is not balanced. In the above example, when the Polyline is added and the developer is persisting map data (ie. letting our SDK handle MapData state restoration across orientation changes), we update an internal object to add the polyline as geometry to restore on orientation changes however the polyline is never removed from this internal object because developers call MapData#clear() on the returned Tangram object.

Now that we support MapData restoration, we need to wrap these objects so that calls to NewWrappedMapData#clear() update internal restoration state. When completing this work, consider a generic object which can abstract underlying implementation (so that developers don't have to worry about Tangram MapData vs Tangram Marker)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant