Skip to content

Wrap MapData Objects in MapzenMap API #500

@sarahsnow1

Description

@sarahsnow1

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions