Geo: Using the Mapbox SDK for Android

@zestyping has front loaded the technology decision to make but taking a step back, I think the feature here is "Enable custom, offline vector layers for geo questions." This is why it's separate from https://forum.getodk.org/t/adding-mapbox-vector-tile-basemaps/ which is focused on adding support for online Mapbox basemaps.

As was alluded to in some of the points above, vector layers are useful because:

  • users have custom datasets from prior data collection efforts or sources like government ministries that they'd like to load onto data collectors' devices. Vector tiles are much smaller than raster tiles and support arbitrary zooming.
  • users would like to be able to select features from their custom map layers rather than selecting a point(s) and then having to figure out what feature it relates to. For example, let's say that a data collection effort needs to collect information about hospitals. Perhaps the location of the hospitals is already known and it would be much better for the data collector to tap on a hospital from a custom map layer than to collect a point that gets connected to the hospital in later analysis. See more about this requirement in @paul.uithol's comment here.

As @zestyping points out, Collect currently uses both Google Maps and OSMdroid as mapping engines. In terms of vector layers, both support GeoJson. Google Maps additionally supports KML. Both are very powerful but I believe they don't address the first requirement because they can be quite large. As I write that, I wonder how much zipping those assets could help? Also, if they will be transferred offline, does it matter?

Questions about GeoJson and KML aside, Mapbox Vector Tiles is a broadly-used standard so it seems that would be a good candidate to support. The Mapbox SDK for Android is (I think) the only library that provides support for the format for Android.

Hopefully this provides a little more context as to why there are now two separate conversations about Mapbox and how they differ.

3 Likes