Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Field paper overlay #45

Closed
dalekunce opened this issue Mar 24, 2015 · 12 comments
Closed

Field paper overlay #45

dalekunce opened this issue Mar 24, 2015 · 12 comments

Comments

@dalekunce
Copy link

dalekunce commented Mar 24, 2015

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.

@hallahan
Copy link
Contributor

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.

@mojodna
Copy link
Member

mojodna commented Apr 6, 2015

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?

@hallahan
Copy link
Contributor

hallahan commented Apr 7, 2015

Mapbox Android SDK does not support this. I agree GeoTIFF makes more sense.

@mojodna
Copy link
Member

mojodna commented Apr 7, 2015

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).

@hallahan
Copy link
Contributor

hallahan commented Apr 6, 2016

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.

@hallahan hallahan added the P1 label Apr 6, 2016
@hallahan
Copy link
Contributor

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.

@hallahan
Copy link
Contributor

We're now able to determine the field paper title and page number that the center of the map is in.

2016-04-21 21 06 24

@hallahan hallahan self-assigned this Apr 21, 2016
hallahan added a commit that referenced this issue Apr 21, 2016
@hallahan
Copy link
Contributor

Trying out the built in PathOverlay to draw coordinates found in the GeoJSON.

2016-04-21 22 16 00

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:

  1. Just draw some labels in the boxes! I could mod the marker functionality to put text in there. However, I worry how well that will perform.
  2. Light up the box to a color and have the text in the upper left correspond to that color. Then, wherever the user taps or selects something, that box is the one to light up instead of just always being the center.

@hallahan
Copy link
Contributor

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).

hallahan added a commit that referenced this issue Apr 22, 2016
hallahan added a commit that referenced this issue Apr 22, 2016
hallahan added a commit that referenced this issue Apr 22, 2016
@hallahan
Copy link
Contributor

2016-04-22 21 56 49

@hallahan
Copy link
Contributor

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.

hallahan added a commit that referenced this issue Apr 23, 2016
…y gets cleared so that none of the boxes are green
hallahan added a commit that referenced this issue Apr 23, 2016
… envelope derived from a single coordinate. Not sure what's with QuadTree?
@hallahan
Copy link
Contributor

Done via #145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants