Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Use single package for SDK #2538

Closed
ljbade opened this issue Oct 6, 2015 · 5 comments
Closed

Use single package for SDK #2538

ljbade opened this issue Oct 6, 2015 · 5 comments
Labels
Android Mapbox Maps SDK for Android refactor

Comments

@ljbade
Copy link
Contributor

ljbade commented Oct 6, 2015

There are a number of public functions and constructors (particularly in the annotations API) that should be made package private.

For example all the set... functions in Marker etc since these objects should currently be immutable. Calling these functions after addMarker etc will not update the marker on the map. Even worse setId will completely break things.

To make these package private we need everything in one package (annotations and view). The other packages I think we can leave alone at this stage.

@ljbade ljbade added refactor Android Mapbox Maps SDK for Android labels Oct 6, 2015
@ljbade ljbade added this to the android-v2.2.0 milestone Oct 6, 2015
@tobrun
Copy link
Member

tobrun commented Oct 6, 2015

Linking #2480 because I feel that this should be tackled simultaneously

@ljbade
Copy link
Contributor Author

ljbade commented Oct 11, 2015

I am proposing merging the annotations and views packages, perhaps just putting them under the base package. Google Maps API seems to happily keep everything in one package. Hmm they don't...

@ljbade
Copy link
Contributor Author

ljbade commented Oct 11, 2015

@tobrun @bleege @zugaldia Are there Java patterns for exposing private implementation detail to other packages, but not to the public? Google Maps API must be doing this, along with the Android framework.

@ljbade
Copy link
Contributor Author

ljbade commented Oct 11, 2015

Hmm a solution might be to create a public interface in a "internal" package, which exposes the implementation methods. Create a private inner class implementation of this in MapView, then pass this in the constructor or some such.

@bleege bleege modified the milestones: android-v2.2.0, android-v2.3.0 Oct 28, 2015
@bleege bleege modified the milestones: android-v2.3.0, android-v2.4.0 Dec 4, 2015
@bleege bleege modified the milestones: android-v3.0.0, android-v3.1.0 Dec 21, 2015
@tobrun
Copy link
Member

tobrun commented Jan 11, 2016

To make these package private we need everything in one package (annotations and view). The other packages I think we can leave alone at this stage.

This is the current situation, this might change with #3485 but will close this for now.

@tobrun tobrun closed this as completed Jan 11, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android refactor
Projects
None yet
Development

No branches or pull requests

3 participants