docs: add multi-stop route deeplink example#2
Conversation
Signed-off-by: Darafei Praliaskouski <me@komzpa.net>
64b6932 to
569a2aa
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 64b69323d6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| Organic Maps also supports v2 route deep links. You can open them directly from | ||
| your app, for example to preview a route with intermediate stops: | ||
|
|
||
| NSURL * url = [NSURL URLWithString:@"om://v2/dir?origin=52.5200,13.4050&origin_name=Warehouse%20Berlin&destination=52.5163,13.3777&destination_name=Customer&waypoints=52.5304,13.3850|52.5450,13.3920&waypoint_names=Pickup%201|Pickup%202&mode=drive"]; |
There was a problem hiding this comment.
Percent-encode waypoint separators in sample deep link
The new Objective-C example uses raw | characters inside the query string (waypoints and waypoint_names), but +[NSURL URLWithString:] treats that URL as invalid and returns nil in this context. That means the sample call to openURL: will not open Organic Maps when copied as-is from the README. Encode the separators as %7C so the constructed NSURL is valid.
Useful? React with 👍 / 👎.
|
What about updating the existing example to use v2 api? |
Adds a direct Organic Maps v2 route deep link example for multi-stop routing from iOS apps.\n\nThis is a companion example for organicmaps/organicmaps#12678 so the new /v2/dir and /v2/nav multi-stop route links have an iOS API README sample.