arthurbenemann/droidplanner — pull request #7 by ne0fhyk (2014-04-12 23:41:25+00:00)
Title: Code setup for additional map provider (Open Street Map)

@arthurbenemann, this pull request built upon what was done in my drone_refactor branch.

I abstracted the map interface. All the functionality needed by the application from a map is now defined into the DPMap interface.

This interface is then implemented by map providers through a map fragment.

By default, we were using a GoogleMap map. I pulled the code related to the google map instance into the GoogleMapFragment class. That class is built upon the OfflineMapFragment class, and was expended to contain all the logic needed to interact with a google map instance.

Through that structure, I was able to add the OSMapFragment class. As the name suggests, this fragment allows to use and interact with an open street map instance.

Below are quick screenshots of the map in use.

### Open Street Map
![screenshot_2014-04-12-16-31-43](https://cloud.githubusercontent.com/assets/914968/2688389/ec12a08c-c29a-11e3-80c8-09bfdf105d61.png)

### Google Map
![screenshot_2014-04-12-16-32-30](https://cloud.githubusercontent.com/assets/914968/2688393/0d6285d6-c29b-11e3-9d0b-76861127639b.png)

The new code is structured in such a way that the rest of the application only deals with a DPMap instance. And the appropriate implementation of the DPMap interface is selected by the user, with Google Map being the default.

As the moment, all the original functionality is supported with the google map provider.
The open street map provider supports waypoint addition and deletion, but there's a few bugs remaining.

The user interface settings section was also expanded to let the user selects which map providers to use.