Closed dalekunce closed 8 years ago
I'm thinking this would be quite straightforward actually. @mojodna could make a Field Papers endpoint that lets us download MBTiles. I could build in an MBTile downloader in the app and pop that in as a layer.
MBTiles export would be a useful feature in its own right.
@hallahan potentially simplifying, would a single GeoTIFF be sufficient (since that's what would be tiled into the MBTiles archive)?
Obvs. working with MBTiles in the Mapbox Android SDK is straightforward, but perhaps you have some other tricks up your sleeve?
Mapbox Android SDK does not support this. I agree GeoTIFF makes more sense.
There (should) already be a link to the GeoTIFF, but it's probably directly to the random filename, so I'll make sure there's also predictable one given an atlas id (which you can pick up from the QR code using zxing).
Since we're going to have to stick with this old mapping lib for the scope of the current phase, I'm thinking I can make a custom line rendering class similar to how I do OSM lines. I can read the vertices from the field paper map.geojson
and draw that on the map. Instead of doing label placement, I can have a bit of text in the UI showing which field paper the map center is panned to. Probably a better UX anyway, since a statically placed label won't always be viewable.
I'm going to whack on this feature next so we can actually see some field papers integration. Seeing the bounds of a page will really make things clearer for the user.
We're now able to determine the field paper title and page number that the center of the map is in.
Trying out the built in PathOverlay
to draw coordinates found in the GeoJSON.
It is kinda funky, sometimes paths don't get drawn when in a high zoom level. Also, it seems to hurt the map panning performance, especially when zoomed in. But, at least it's good to see the vector drawn to help me figure out UX that makes sense.
One thing that is obvious is that as-is, seeing the page number in the upper left corner of the screen doesn't seem good enough to know which page we're looking at corresponds.
We could:
I'm going with option 2. Label placement is pretty involved to do it right, and it's not worth it doing this with a deprecated library (will suck up too much time).
For now, the field paper pages show up when you check out a deployment in the Deployment Details. There is no toggle for it, though that could be done fairly easily. The top black text view showing the page will show up only when a page is selected (by either being in the center of the map or tapped). This means that we don't show that text if you, for example, panned the map outside of the atlas on a different basemap... Which is good, avoids confusion.
Done via #145
Would be really nice to overlay the field paper tasks on top of the map. This is a hugely needed piece based on field trials. Layer should be toggle blend. Would also like to extend this to include an arrow with direction to where the user should be editing.