Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,16 @@ When user selects a pin, your app is called like this:

YourAppUniqueUrlScheme://pin?ll=lat,lon&n=PinName&id=PinId

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"];
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid pre-encoding query values in URLWithString example

NSURL URLWithString: applies its own percent-encoding, so hardcoding %20 in the sample URL causes double-encoding (%20 becomes %2520). In this example, origin_name/waypoint_names will be sent as literal %20 sequences instead of spaces, which can make route labels render incorrectly or parse unexpectedly when developers copy this snippet as-is. This affects any parameter values that are already percent-escaped in the string literal.

Useful? React with 👍 / 👎.

[[UIApplication sharedApplication] openURL:url];

Use `om://v2/nav` instead of `om://v2/dir` to start navigation when the route is
ready. If `origin` is an explicit coordinate instead of `currentLocation`,
Organic Maps previews the route first so the user can confirm the start point.

------------------------------------------------------------------------------------------
### API Code is licensed under the BSD 2-Clause License

Expand Down