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

Add MapRoulette-"Quests" similar to the StreetComplete-Quest-Idea #240

Open
tordans opened this issue Oct 21, 2019 · 12 comments
Open

Add MapRoulette-"Quests" similar to the StreetComplete-Quest-Idea #240

tordans opened this issue Oct 21, 2019 · 12 comments

Comments

@tordans
Copy link

tordans commented Oct 21, 2019

This idea is based on – or similar to – #221.

With what @wtimme is working on at #232 is would be possible to add a quest based on existing OSM-data. Like "show me all bike stands that still need attribute x".

However, there are quite some usecases where the nudge to check a location for a possible mapping-quest is based on external data.

Example: At https://bikeparking.lorenz.lu/missingmap/Berlin# @britiger is working on a data check that compares city data with OSM data. All those places that are missing in OSM should be checked by someone locally.

For this, https://maproulette.org / https://github.com/osmlab/maproulette3 is ideal. We can upload the missing data and save the "this is done" and "this is not an issue" state in the maproulette DB.


So this is the idea:

  • Add a settings page similar to the filter-element.
  • I can activate "show maproulette issues nearby", which will show all
  • I can go into details and show/hide one maproulette challenge (like with the filter view)
  • If active, the maproulette challenge shows a marker on the map
  • I can add the content with GoMap
  • I can then confirm the maproulette task from the app

Other ideas

  • Maybe add "fixed maproulette task=id,id,id" to the changeset, like iD does with the external QA tools
  • The confirm-screen could be based on iOS-UI or show a special mobile html view by maproulette(?)

I can do more research into this – like looking at API calls – in case this looks interesting to other people.

@wtimme
Copy link
Contributor

wtimme commented Feb 10, 2020

As a mapper using MapRoulette, I want GoMap to display incomplete tasks on the map, so that I know where information is missing

Acceptance criterias

Please bare in mind that this is a raw MVP. It is not the finished version of the MapRoulette integration, but it's a start to get the API and some basic UI in place.

  • In the "Display" options under "Overlays", a new cell with a toggle is added
    • The label reads "MapRoulette tasks"
    • The toggle is disabled by default
  • With the toggle enabled, the map displays buttons (just like it does for "Notes and Fixmes") in places where there are incomplete tasks
    • For the MVP, the buttons read "MR"
  • Upon tapping a MapRoulette button, a SFSafariViewController is presented, displaying the page of the task

@zlavergne
Copy link
Collaborator

I like it @wtimme!

My only thought is with the last point:

Upon tapping a MapRoulette button, a SFSafariViewController is presented, displaying the page of the task

To better test the actual API integration, should we rather fetch the task itself and have a small, scrolling modal with instructions and info. For the MVP, it can just display the text without any formatting.

@wtimme
Copy link
Contributor

wtimme commented Feb 12, 2020

Thanks for the feedback, @zlavergne! Yes, that could also work.

In maproulette/maproulette3#1108, it says that they want to build

A simplified / mobile friendly task page that can be loaded in a GoMap!! view

Presenting a web view as the MVP would allow them to test their page already. But I wouldn't object if someone already went for a modal (e. g. utilizing an UIAlertController).

@wtimme
Copy link
Contributor

wtimme commented Mar 7, 2020

Good news: I was finally able to generate the API client for MapRoulette by modifying the Swagger definition a bit. 🎉 (Take a look at the code here.) For this, I made use of Swagger Codegen 3.0.18, which added support for Swift 5.

maproulette-buttons

Open questions

During development, I came across a couple of obstacles and would like to discuss them with you.

How do we integrate the auto-generated code (cp. #163)? By default, Swagger Codegen supports Carthage and Cocoapods. (I've used the latter for my branch.)

In addition, I am not sure about the integration of the UIButtons into the map, since I'm not quite familiar with the whole rendering mechanism. With wtimme/OSM-Completionist#52, I've tried to separate the rendering of notes from MapView, but to no avail - it's quite a lot of work.
Before we continue here, it would be good to have a discussion on how to structure these things, class-wise. I do realize that this is a kind-of "meta" discussion, but after implementing the new LayerView, I feel like it would be beneficial to have it.

Try it out

You can try the MapRoulette integration using the TestFlight Beta for OSM Completionist. (Sorry for the self-plug!)

If you're more interested in the code, the comparision of the branches might be a good start. Keep in mind though that it compares the branch with the develop branch of OSM Completionist.


Footnote for expectation management: This is by far not ready to be shipped yet.

  • The code could use an overhaul (a bit of restructuring)
  • The server's response sometimes takes a few seconds
  • Errors are displayed in an UIAlertController and interrupt the UX

If you are an iOS developer (Objective-C/Swift), I would be grateful for feedback.

@bryceco
Copy link
Owner

bryceco commented Mar 7, 2020

Looks pretty interesting as a start. Any ideas on how to prevent this from happening?

411C1CD0-7838-4A5B-A297-6CE7B06713BD

@tordans
Copy link
Author

tordans commented Mar 8, 2020

Thanks for the prototype, @wtimme!

A few unsorted thoughts

  • I was not aware that there are multiple MR "items" around me; seeing this is great
    • ==> the feature is working already :)
  • Having all MR challenges active at the same time is hard to parse since all have different descriptions which I need to understand in order do make a decision
    • ==> UI so select some challenges; without loosing the information that there are more in my area
  • The web UI works a lot worse than I had hoped. Loading time is bad (due to the SPA-approach maybe which loads all the app first?). And of course the action-button is still unavailable (Mobile: Actions on Tasks-UI dont show maproulette/maproulette3#1046) so we cannot test the full circle ATM. Either GoMap!! integration maproulette/maproulette3#1108 will help with a fast UI; or the webpage-MVP-approach will not work
  • Some challenges will be unsuited for GoMap, eg there is a "opening hour" challenge, which I would never do on the go, since adding those opening hours is just to painful when standing on the street :). But still, I might just take pictures and to it later; knowing that it there is a local issue and tackling it while on the go is still great.
    • ==> Filtering challenges will help; Maybe a future "take picture for later"-feature in GoMap will help; Maybe with picture upload to MR as a "comment with information to this ticket"-feature; …
  • I wonder what the best way to display the MR-icons would be; We dont have icons for the MR-challenges (AFAIK) but we need some way to differentiate them on the map.
    • ==> It would be enough to have it differentiated by GoMap user, so maybe assign random colors to them in the (yet to do) list of challenges in my area (where I can de/activate them MR challenges)?

Suggestions for next steps

Prio IMO …

  • Find a way to test the full circle of completing a MR-task, so we can test the full MVP

Maybe easy …

  • First take on differentiating the challenges by color coding the orange items by MR-id, so I can see which are the same

Soon after …

  • Have a list of active/deactivated MR challenges similar to the filter-UI or the quests-UI

@nrotstan
Copy link

nrotstan commented Mar 8, 2020

If you're loading the MR frontend just to let the user set the task status after completion, that is very easy to do through the API using the PUT /task/:id/:status endpoint. Realistically, if the user goes offline, GoMap is going to have to manage everything through the API anyway once the user comes back. I don't think relying on the MR frontend is a feasible solution beyond the proof-of-concept stage.

For the situation where too many tasks are being loaded for an area, the MR API supports retrieving task clusters instead of individual tasks. Each cluster includes a bounds so that you can zoom in when a user taps on a cluster, or you can uncluster it and show individual tasks. However, the clusters only include summary data for the child tasks, so if you're preparing to go offline then you'd need to also take care to fetch the full data for the tasks in the area so you have it available. Using the cluster APIs will also be much faster than loading all the task data (if the user is not going offline).

Regarding challenges, we do have short-term plans to add a new category of challenge for tasks where local knowledge is preferred or required for completion. That would allow GoMap to focus on tasks local to a user's location where being on the ground is of higher value than with ordinary tasks that can be solved remotely.

MR doesn't currently support attaching photos to tasks, though it is something that has come up from time to time. I can see how for a business-hours "local" challenge, it might make more sense for the challenge to ask for photos from people out in the field rather than OSM edits, and then feed those into a new "standard" challenge where remote mappers could enter the business hours into OSM based on the photos. Again, though, GoMap would need to support storage and management of the photos in the case of offline (or just limited connection speeds out in the field) and feed these to the MR API later or in the background.

@wtimme
Copy link
Contributor

wtimme commented Mar 8, 2020

Thanks for the feedback and the thorough replies!

For the situation where too many tasks are being loaded for an area, the MR API supports retrieving task clusters instead of individual tasks.

Which exact endpoint are you referring to? I had a look at the ones outlined in the Swagger definition and watched Firefox' network debugging tools. The operation with the ID getTaskClusters comes closest to what you are describing, but the the Swagger definition seems to be missing a couple of parameters. Here's the URL for retrieving the task clusters for Berlin:

https://maproulette.org/api/v2/taskCluster?cStatus=3%2C4%2C0%2C-1&ce=true&pe=true&points=25&tbb=13.0902099609375%2C52.46939684276205%2C13.710937500000002%2C52.56716888205044

The only documented parameter is points. What is more important for the map, though, is the tbb parameter, which looks lik the URL-encoded bounding box.

But since this is just an assumption, it would be great of one of the MR devs could take a look before we spend more time on this. In general, though, retrieving a cluster sounds like the better approach. 👍🏼

As for the rest of the ideas, they sound like bigger goals. What I want to focus on right now is a feasible MVP, and I was hoping for users to be able to use the native iOS app to identify tasks/challenges on the map, and then using MR's website to resolve them.

Loading time is bad

Yes, it unfortunately is, even with the route /api/v2/taskCluster. In my desktop browser, it takes about 12 seconds (!) for the call to complete, which makes the website seem a bit slow and unresponsive, even for small bounding boxes. But that could also be due to my internet connectivity and/or other apps running in the background.

@bryceco
Copy link
Owner

bryceco commented Mar 8, 2020

If you plan to flip to the website to fix issues then only challenges that support the forthcoming MR “quick fix” feature should be displayed on the map. But honestly I think a Go Map!! feature that doesn’t rely on the editor itself to fix things isn’t good enough to ship: why use the app when you can accomplish the same thing in Safari?

@wtimme
Copy link
Contributor

wtimme commented Mar 9, 2020

Thanks for the feedback, Bryce!

I think a Go Map!! feature that doesn’t rely on the editor itself to fix things isn’t good enough to ship

That is a very good point. Since we try to implement this feature in a MVP way, the question we have to ask ourselves is:

What exactly is a version of this feature with just enough features to satisfy early customers and provide feedback for future product development?

I have tried to answer that question in an earlier comment, and at least two people reacted positively. Do you have "minimum requirements" in mind so that the feature is good enough to ship? Thanks in advance for your feedback!

Known issue/bug

To increase visibility, I want to let you know that the MVP currently has an issue. With the "MapRoulette" layer active, it is not possible to use the "Edit" control at the bottom (the one that says "Tags", "Paste", etc.). I'll have a look once I have the time. (PRs that target the feature branch are always welcome. 😉) Thanks for reporting this through TestFlight!

@bryceco
Copy link
Owner

bryceco commented Mar 9, 2020

The MVP already exists for users by simply opening MR.com in Safari. The new and interesting product is to be able to edit more complex challenges on mobile than the website can support.

We can can also discuss whether MVP is a beneficial development strategy in general, and I don’t think it is. First impressions count and if a feature seems poorly implemented or hard to see the benefit then users won’t go back and use that feature even after the bugs are fixed.

@bryceco
Copy link
Owner

bryceco commented Mar 9, 2020

I should add that using MVP for prototyping and internal evaluation is great, I just don’t think that “half-baked” features belong in the App Store.

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

5 participants