|
| 1 | +import { CommitIcon } from "@radix-ui/react-icons"; |
| 2 | +import { DialogHeader } from "app/components/dialog"; |
| 3 | +import { styledInlineA } from "../elements"; |
| 4 | + |
| 5 | +export function RouteHelpDialog() { |
| 6 | + return ( |
| 7 | + <> |
| 8 | + <DialogHeader title="Route help" titleIcon={CommitIcon} /> |
| 9 | + <div> |
| 10 | + <p> |
| 11 | + Routing is a beta feature! Please leave feedback and consider{" "} |
| 12 | + <a |
| 13 | + href="https://github.com/placemark/placemark" |
| 14 | + className={styledInlineA} |
| 15 | + > |
| 16 | + helping out with development |
| 17 | + </a>{" "} |
| 18 | + of this. |
| 19 | + </p> |
| 20 | + <p className="mt-2"> |
| 21 | + Draw a route by clicking <CommitIcon className="w-4 inline-block" />{" "} |
| 22 | + and clicking on the map to add a waypoint. Using the menu to the right |
| 23 | + of the block, you can customize whether the route using walking, |
| 24 | + driving, or cycling profiles. |
| 25 | + </p> |
| 26 | + <p className="mt-2"> |
| 27 | + Routes are represented as GeometryCollection objects with points for |
| 28 | + waypoints and a linestring for the route. They're currently generated |
| 29 | + by the{" "} |
| 30 | + <a |
| 31 | + href="https://docs.mapbox.com/api/navigation/directions/" |
| 32 | + className={styledInlineA} |
| 33 | + > |
| 34 | + Mapbox Directions API |
| 35 | + </a> |
| 36 | + . Additional routing providers would be welcomed - please contribute |
| 37 | + to the open source project if this is a priority for you. |
| 38 | + </p> |
| 39 | + <p> |
| 40 | + <h2 className="mt-8 font-bold">Known limitations</h2> |
| 41 | + <ul className="list-disc ml-6 mt-2"> |
| 42 | + <li> |
| 43 | + You can't add control points to the middle of routes, or extend |
| 44 | + routes once they've been drawn. |
| 45 | + </li> |
| 46 | + <li> |
| 47 | + Other than doing 'Split GeometryCollection', there is not a very |
| 48 | + intuitive way to turn a route into a normal LineString. |
| 49 | + </li> |
| 50 | + </ul> |
| 51 | + </p> |
| 52 | + </div> |
| 53 | + </> |
| 54 | + ); |
| 55 | +} |
0 commit comments