Skip to content
Permalink
Browse files

Added Curvy Routing

  • Loading branch information...
Guido van Eijsden Guido van Eijsden
Guido van Eijsden authored and Guido van Eijsden committed Apr 28, 2017
1 parent 808ca12 commit 27ac0d63d299dd92da64e74551a2e7db0fcca1f5
Showing with 16 additions and 17 deletions.
  1. +8 −9 HTML-GET/yourwebpageGET.html
  2. +2 −2 JavaScript/scenicapi.js
  3. +2 −2 PHP/scenicapi.php
  4. +2 −2 README.md
  5. +2 −2 directUniLinksForNavigation.md
@@ -17,7 +17,7 @@ <h1>Links to send a route to Scenic for IMPORT. Scenic will open (if installed)
**** if the GPX contains more routes, tracks and/or waypoints they can all be imported by the user
************************************************************-->

<a href='https://scenicapp.space/Scenic/api/import/gpxurl?gpxurl=http%3A%2F%2Fwww.motomappers.com%2FAccentrix.GPX&source=YourWebsiteName%20GET'>Send gpxURL to Scenic for Import (with GET request)</a>
<a href='https://scenicapp.space/Scenic/api/import/gpxurl?gpxurl=http%3A%2F%2Fwww.motomappers.com%2FAccentrix.GPX&source=YourWebsiteName'>Send gpxURL to Scenic for Import (with GET request)</a>



@@ -33,10 +33,9 @@ <h1>Links to send a route to Scenic for IMPORT. Scenic will open (if installed)
**** !!! PARAMETERS NEED TO BE URLENCODED, except polyline !!! (e.g. Your Source Name becomes Your%20Source%20Name)
**************************************************************-->

<a href='https://scenicapp.space/Scenic/api/import/polyline?polyline=wxk~FvbgvOkEuaBj]m}Ajm@qnBp`Axv@bj@qaAxk@mjCjM{cB&name=Polyline%20Name%20GET&descr=Polyline%20Description%20GET&source=YourWebsiteName%20GET'>Send route polyline to Scenic for Import (with GET request)</a>
<a href='https://scenicapp.space/Scenic/api/import/polyline?polyline=wxk~FvbgvOkEuaBj]m}Ajm@qnBp`Axv@bj@qaAxk@mjCjM{cB&name=RouteName&descr=RouteDescription&source=YourWebsiteName'>Send route polyline to Scenic for Import (with GET request)</a>



<br><br>
<!--/**************************************************************
************ Send Coordinates for IMPORT **********
@@ -50,7 +49,7 @@ <h1>Links to send a route to Scenic for IMPORT. Scenic will open (if installed)
**** !!! PARAMETERS NEED TO BE URLENCODED, except coordinatees !!! (e.g. Your Source Name becomes Your%20Source%20Name)
**************************************************************-->

<a href='https://scenicapp.space/Scenic/api/import/coordinates?coordinates=28.5020112345,77.0853534524|28.5021994638,77.0848774538|28.5026335458,77.0850589642|28.5029786472,77.085397485&name=Coordinates%20Name%20GET&descr=Coordinates%20Description%20GET&source=YourWebsiteName%20GET'>Send route coordinates to Scenic for Import (with GET request)</a>
<a href='https://scenicapp.space/Scenic/api/import/coordinates?coordinates=28.5020112345,77.0853534524|28.5021994638,77.0848774538|28.5026335458,77.0850589642|28.5029786472,77.085397485&name=RouteName&descr=RouteDescription&source=YourWebsiteName'>Send route coordinates to Scenic for Import (with GET request)</a>


<br><br>
@@ -64,11 +63,11 @@ <h1>Links to send a route or location to Scenic for NAVIGATION. Scenic will open
**** polyline (Required): Encoded Polyline (String) (https://developers.google.com/maps/documentation/utilities/polylinealgorithm)
**** - the polyline has to contain at least 2 coordinates and at the most 200 coordinates
**** name (Optional): the name of the route (String) NEEDS TO BE URLENCODED !!! (e.g. Your Route Name becomes Your%20Route%20Name)
**** routeMode (Optional): F for Fastest, S for Shortest, E for Efficient (Defaults to F)
**** routeMode (Optional): F for Fastest, S for Shortest, E for Efficient, C for Curvy (Defaults to F)
**** vehicleType (Optional): C for Car/Motorcycle, B for Bicycle, P for Pedestrian (Defaults to C)
**************************************************************-->

<a href='https://scenicapp.space/Scenic/api/navigate/polyline?polyline=wxk~FvbgvOkEuaBj]m}Ajm@qnBp`Axv@bj@qaAxk@mjCjM{cB&name=Route%20From%20Web&routeMode=F&vehicleType=C'>Send route polyline to Scenic for Navigation (with GET request)</a>
<a href='https://scenicapp.space/Scenic/api/navigate/polyline?polyline=wxk~FvbgvOkEuaBj]m}Ajm@qnBp`Axv@bj@qaAxk@mjCjM{cB&name=RouteName&routeMode=F&vehicleType=C'>Send route polyline to Scenic for Navigation (with GET request)</a>



@@ -80,11 +79,11 @@ <h1>Links to send a route or location to Scenic for NAVIGATION. Scenic will open
**** - 6 digits precision for the lat and lon components is sufficient
**** - there should be at least 2 coordinates and at the most 200 coordinates
**** name: the name of the route (String) NEEDS TO BE URLENCODED !!! (e.g. Your Route Name becomes Your%20Route%20Name)
**** routeMode (Optional): F for Fastest, S for Shortest, E for Efficient (Defaults to F)
**** routeMode (Optional): F for Fastest, S for Shortest, E for Efficient, C for Curvy (Defaults to F)
**** vehicleType (Optional): C for Car/Motorcycle, B for Bicycle, P for Pedestrian (Defaults to C)
**************************************************************-->

<a href='https://scenicapp.space/Scenic/api/navigate/coordinates?coordinates=28.5020112345,77.0853534524|28.5021994638,77.0848774538|28.5026335458,77.0850589642|28.5029786472,77.085397485&name=Route%20From%20Web&routeMode=F&vehicleType=C'>Send route coordinates to Scenic for Navigation (with GET request)</a>
<a href='https://scenicapp.space/Scenic/api/navigate/coordinates?coordinates=28.5020112345,77.0853534524|28.5021994638,77.0848774538|28.5026335458,77.0850589642|28.5029786472,77.085397485&name=RouteName&routeMode=F&vehicleType=C'>Send route coordinates to Scenic for Navigation (with GET request)</a>


<br><br>
@@ -96,7 +95,7 @@ <h1>Links to send a route or location to Scenic for NAVIGATION. Scenic will open
**** name: the name of the location (String) NEEDS TO BE URLENCODED !!! (e.g. Your Location Name becomes Your%20Location%20Name)
**************************************************************-->

<a href='https://scenicapp.space/Scenic/api/navigate/coordinate?coordinate=19.415,-99.098377&name=Location%20From%20Web'>Send location coordinate to Scenic for Navigation (with GET request)</a>
<a href='https://scenicapp.space/Scenic/api/navigate/coordinate?coordinate=19.415,-99.098377&name=LocationName'>Send location coordinate to Scenic for Navigation (with GET request)</a>



@@ -94,7 +94,7 @@ function sendToScenicForImport_coordinates(coordinates, name = "", descr = "", s
**** polyline (required): Encoded Polyline (String) (https://developers.google.com/maps/documentation/utilities/polylinealgorithm)
**** the polyline has to contain at least 2 coordinates and at the most 200 coordinates
**** name (Optional): the name of the route (String)
**** routeMode (Optional): F for Fastest, S for Shortest, E for Efficient (Defaults to F)
**** routeMode (Optional): F for Fastest, S for Shortest, E for Efficient, C for Curvy (Defaults to F)
**** vehicleType (Optional): C for Car/Motorcycle, B for Bicycle, P for Pedestrian (Defaults to C)
**************************************************************/
function sendToScenicForNavigation_polyline(polyline, name = "", routeMode = "F", vehicleType = "C") {
@@ -115,7 +115,7 @@ function sendToScenicForNavigation_polyline(polyline, name = "", routeMode = "F"
**** - 6 digits precision for the lat and lon components is sufficient
**** - there should be at least 2 coordinate and at the most 200 coordinates
**** name (Optional): the name of the route (String)
**** routeMode (Optional): F for Fastest, S for Shortest, E for Efficient (Defaults to F)
**** routeMode (Optional): F for Fastest, S for Shortest, E for Efficient, C for Curvy (Defaults to F)
**** vehicleType (Optional): C for Car/Motorcycle, B for Bicycle, P for Pedestrian (Defaults to C)
**************************************************************/
function sendToScenicForNavigation_coordinates(coordinates, name = "", routeMode = "F", vehicleType = "C") {
@@ -72,7 +72,7 @@ function sendToScenicForImport_coordinates($coordinates, $name = "", $descr = ""
**** polyline (Required): Encoded Polyline (String) (https://developers.google.com/maps/documentation/utilities/polylinealgorithm)
**** the polyline has to contain at least 2 coordinates and at the most 200 coordinates
**** name (Optional): the name of the route (String)
**** routeMode (Optional): F for Fastest, S for Shortest, E for Efficient (Defaults to F)
**** routeMode (Optional): F for Fastest, S for Shortest, E for Efficient, C for Curvy (Defaults to F)
**** vehicleType (Optional): C for Car/Motorcycle, B for Bicycle, P for Pedestrian (Defaults to C)
**************************************************************/
function sendToScenicForNavigation_polyline($polyline, $name = "", $routeMode = "F", $vehicleType = "C") {
@@ -96,7 +96,7 @@ function sendToScenicForNavigation_polyline($polyline, $name = "", $routeMode =
**** - 6 digits precision for the lat and lon components is sufficient
**** - there should be at least 2 coordinate and at the most 200 coordinates
**** name (Optional): the name of the route (String)
**** routeMode (Optional): F for Fastest, S for Shortest, E for Efficient (Defaults to F)
**** routeMode (Optional): F for Fastest, S for Shortest, E for Efficient, C for Curvy (Defaults to F)
**** vehicleType (Optional): C for Car/Motorcycle, B for Bicycle, P for Pedestrian (Defaults to C)
**************************************************************/
function sendToScenicForNavigation_coordinates($coordinates, $name = "", $routeMode = "F", $vehicleType = "C") {
@@ -4,9 +4,9 @@ Scenic Integration is for iOS apps and Websites that offer routes. By adding lin
- **Navigate** your routes (or to your locations) with Scenic
- **Import** your routes to their Scenic account

Scenic is a (Motorcycle) Navigation App for iOS (iPhone/iPad/iPodTouch). With Scenic users can plan, navigate and track their (Motorcycle) Trips. For more information see [MotoMappers.com](http://www.motomappers.com) and [Scenic on the App Store](https://itunes.apple.com/us/app/scenic-tour-planner-navigation/id1089668246)
Scenic is a (Motorcycle) Navigation App for iOS. With Scenic users can plan, navigate and track their (Motorcycle) Trips. For more information see [MotoMappers.com](http://www.motomappers.com) and [Scenic on the App Store](https://itunes.apple.com/app/id1089668246)

By integrating with Scenic you not only offer more functionality to your existing users, but also **open up an additional channel to acquire new users**. (i.e. Scenic users will notice the integration and possibly sign up to your site / get your app.)
By integrating with Scenic you not only offer more functionality to your existing users, but also **open up an additional channel to acquire new users**. (i.e. Scenic users will notice the integration with your site/app.)

# Ways to Integrate

@@ -30,7 +30,7 @@ Parameter Name | Parameter Value | Comments
`navigatecoordinates` | `lat1`,`lon1`&#124;`lat2`,`lon2`&#124;`lat3`,`lon3` | **Required**<br>- Dot as decimal separator <br>- `lat` and `lon` separated by comma.<br>- Coordinates separated by pipe symbol<br>- Max 200 Coordinates
`name` | Name of the route | **Optional**<br>Needs to be url encoded<br>E.g. 'Awesome Route' becomes 'Awesome%20Route'
`vehicleType` | C for Car/Motorcycle<br>B for Bicycle<br>P for Pedestrian | **Optional**<br>Defaults to C
`routeMode` | F for Fastest<br>S for Shortest<br>E for Efficient | **Optional**<br>Defaults to F
`routeMode` | F for Fastest<br>S for Shortest<br>E for Efficient<br>C for Curvy | **Optional**<br>Defaults to F

Please note that the entire [URL can not exceed 2000 characters](http://stackoverflow.com/questions/417142/what-is-the-maximum-length-of-a-url-in-different-browsers). If the route has many coordinates it's very likely you exceed this. In that case it's recommended to use the polyline version to send a route (see below) as this compacts the same amount of coordinates into a smaller string.

@@ -42,4 +42,4 @@ Parameter Name | Parameter Value | Comments
`navigatepolyline` | coordinates encoded to a polyline string | **Required**<br>- [Google Polyline Algorithm](https://developers.google.com/maps/documentation/utilities/polylinealgorithm)<br> - The polyline can not represent more than 200 coordinates
`name` | Name of the route | **Optional**<br>Needs to be url encoded<br>E.g. 'Awesome Route' becomes 'Awesome%20Route'
`vehicleType` | C for Car/Motorcycle<br>B for Bicycle<br>P for Pedestrian | **Optional**<br>Defaults to C
`routeMode` | F for Fastest<br>S for Shortest<br>E for Efficient | **Optional**<br>Defaults to F
`routeMode` | F for Fastest<br>S for Shortest<br>E for Efficient<br>C for Curvy | **Optional**<br>Defaults to F

0 comments on commit 27ac0d6

Please sign in to comment.
You can’t perform that action at this time.