First, an update on the code. @langstonsmith, the new MapFragment interface is now on the master branch, and it is in use by the newly consolidated GeoTraceActivity and GeoShapeActivity. So I think it is mature enough to be ready for new implementations. There are existing Google Maps and OSM implementations (GoogleMapFragment and OsmMapFragment) that you can use as examples if you'd like to start building a MapboxMapFragment implementation.
Note that the configuration settings to select the basemap are handled by MapHelper, which has not yet been refactored. My plan is to move the functionality of MapHelper into each of the appropriate MapFragment implementations, so my advice to you is to keep your changes to MapHelper minimal (e.g. just hardcode a vector tile source for now) and focus on implementing MapFragment. Feel free to reach out to me any time if you have questions.
Second, I just want to clarify the question of online vs. offline tiles. @langstonsmith, is your plan to implement online vector tiles only, or will there be support for both online and offline vector tiles? What would be involved in making it possible to display offline vector tiles that are packaged and preloaded onto the mobile device's filesystem in advance, as @paul.uithol describes in his comment?
@paul.uithol, can you elaborate a little on what you meant in your first bullet point, "defining a 'map view' that can use configurable vector and raster sources"? At the moment, ODK Collect already has configuration settings such that:
- You can choose the Google map or OSM map
- You can choose which standard basemap style you want (e.g. satellite, terrain, etc.)
- You can choose a raster tile file from the device's filesystem (an mbtiles file)
If @langstonsmith then adds a Mapbox implementation, we'd have a third option in addition to Google and OSM, and presumably there would be some configuration setting for choosing the vector tile set to use as the basemap.
Does that meet your requirements, or can you help me understand how what you have in mind would be different from this?