Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
Redirect to mapillary app on ios/android
Browse files Browse the repository at this point in the history
  • Loading branch information
ezzhang8 committed Aug 8, 2022
1 parent 9edb7be commit c4b94ed
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
9 changes: 9 additions & 0 deletions frontend/src/components/taskSelection/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ const TaskSelectionFooter = ({ defaultUserEditor, project, tasks, taskAction, se
}
})
.catch((e) => lockFailed(windowObjectReference, e.message));

if (project.imageCaptureMode) {
if (navigator.userAgent.includes("Android")) {
navigate("mapillary://mapillary/explore")
}
else if (navigator.userAgent.includes("like Mac OS X")) {
navigate("mapillary://goto/camera")
}
}
}
if (['resumeMapping', 'resumeValidation'].includes(taskAction)) {
const urlParams = openEditor(
Expand Down
14 changes: 6 additions & 8 deletions frontend/src/components/taskSelection/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,12 +644,10 @@ export const TasksMap = ({
)}
<div id="map" className={className} ref={mapRef}>
<div style={{ zIndex: 10 }} id={"mapillary-checkbox"} className={"cf left-1 top-1 pa2 absolute bg-white br1"}>
<input class="" type="checkbox" id="mapillary-toggle"></input>
<label for="mapillary-toggle"> Mapillary Layer</label>

<input type="checkbox" id="mapillary-toggle"></input>
<label htmlFor="mapillary-toggle"> Mapillary Layer</label>
</div>
</div>
</>
);
}
};
</div>
</>
)}
}

0 comments on commit c4b94ed

Please sign in to comment.