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

Improve integration with AI-assisted mapping #2065

Closed
pantierra opened this issue Dec 12, 2019 · 12 comments · Fixed by #4934
Closed

Improve integration with AI-assisted mapping #2065

pantierra opened this issue Dec 12, 2019 · 12 comments · Fixed by #4934
Labels
ai-augment Anything that augments TM using AI priority: medium scope: frontend type: enhancement Improving an existing functionality

Comments

@pantierra
Copy link
Contributor

pantierra commented Dec 12, 2019

So far:

Let's think about making AI-assisted mapping a standard feature of Tasking Manager.

@pantierra pantierra added this to the 4.1 Release milestone Dec 12, 2019
@pantierra pantierra changed the title Integrate AI-assisted mapping Improve integration with AI-assisted mapping Dec 12, 2019
@pantierra pantierra removed this from the 4.1.0 Release milestone Apr 21, 2020
@jayenashar
Copy link
Contributor

Is there documentation on how I can setup a tasking manager with RapiD? Or migrate an existing tasking-manager?

@willemarcel
Copy link
Contributor

@jayenashar Do you want to make RapiD your main editor or just give users the option to use it?

@jayenashar
Copy link
Contributor

if there's no licensing issues, the main editor.

@willemarcel
Copy link
Contributor

willemarcel commented Nov 4, 2020

@jayenashar we are going to integrate RapiD inside TM on the next few months, for now I think you could:

replace '?editor=ID' by 'https://mapwith.ai/rapid' on https://github.com/hotosm/tasking-manager/blob/fix/env-var-instructions/frontend/src/utils/openEditor.js#L18
and replace iD by RapiD on that line https://github.com/hotosm/tasking-manager/blob/develop/frontend/src/utils/editorsList.js#L6

Let me know if that solution works.

@jayenashar
Copy link
Contributor

jayenashar commented Nov 5, 2020

did you mean to paste a link to the same line in two separate branches?

i was able to do the first replacement, but now the TM goes to a URL like https://tasks.smartcitiestransport.com/projects/1/map/https://mapwith.ai/rapid?#map=16/-37.08585785263673/144.1571044921875&comment=%23oceania-tm-project-1%20%23buildings&gpx=https%3A%2F%2Ftasks.smartcitiestransport.com%2Fapi%2Fv2%2Fprojects%2F1%2Ftasks%2Fqueries%2Fgpx%2F%3Ftasks%3D835&presets=building

@willemarcel
Copy link
Contributor

@jayenashar sorry, the second link I pasted was wrong. I fixed it on my previous comment.

@willemarcel
Copy link
Contributor

willemarcel commented Nov 5, 2020

Actually, replace that line: https://github.com/hotosm/tasking-manager/blob/fix/env-var-instructions/frontend/src/utils/openEditor.js#L18

by:

const rapidUrl = 'https://mapwith.ai/rapid';
windowObjectReference.location.href = getIdUrl(project, center, zoom, selectedTasks, rapidUrl);
return '?editor=CUSTOM';

@willemarcel
Copy link
Contributor

@jayenashar you'll also need to move that if statement to after the following one.

@jayenashar
Copy link
Contributor

here's my diff:

diff --git a/frontend/src/utils/openEditor.js b/frontend/src/utils/openEditor.js
index 761ff3b2..6844b8e6 100644
--- a/frontend/src/utils/openEditor.js
+++ b/frontend/src/utils/openEditor.js
@@ -15,7 +15,12 @@ export function openEditor(
   }
   const { center, zoom } = getCentroidAndZoomFromSelectedTasks(tasks, selectedTasks, windowSize);
   if (editor === 'ID') {
-    return getIdUrl(project, center, zoom, selectedTasks, '?editor=ID');
+    if (windowObjectReference == null || windowObjectReference.closed) {
+      windowObjectReference = window.open('', `iD-${project}-${selectedTasks}`);
+    }
+    const rapidUrl = 'https://mapwith.ai/rapid';
+    windowObjectReference.location.href = getIdUrl(project, center, zoom, selectedTasks, rapidUrl);
+    return '?editor=CUSTOM';
   }
   if (windowObjectReference == null || windowObjectReference.closed) {
     windowObjectReference = window.open('', `iD-${project}-${selectedTasks}`);

it opens rapid but doesn't zoom to the task. i was also a little confused by windowObjectReference == null since windowObjectReference is undefined not null

@willemarcel
Copy link
Contributor

What's the URL it's generating?

If you want your users to use only Rapid, another solution would be to set a custom editor on all projects and activate only the custom editor on all projects.

@Aadesh-Baral
Copy link
Contributor

Hello everyone, integration of RapiD inside TM is complete now. Integrated Rapid can be enabled while creating/editing a project on the settings tab.

enabling_integrated_rapid

@Aadesh-Baral Aadesh-Baral linked a pull request May 8, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai-augment Anything that augments TM using AI priority: medium scope: frontend type: enhancement Improving an existing functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants