Results 1 to 8 of 8

Thread: Routes with multiple waypoints. Multiple routes. Map Legend.

  1. #1
    Neuer skobbler
    Join Date
    12.02.2015
    Posts
    4

    Routes with multiple waypoints. Multiple routes. Map Legend.

    Can anyone help with these questions please?

    Does the Skobbler SDK support routes with waypoints in between the start and end point?
    Also does it support drawing multiple routes on the map in different colors? And does it support displaying a Legend / Key to indicate what those colors represent?

    Many thanks.

  2. #2
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Hello Jonathan,

    For adding ViaPoints – waypoints – which will allow you to create a route with intermediate stops and add/remove waypoints to an already existing route- you have to wait for the next version 2.4 (estimated release time: end of month) or you can test the beta version available via cocoapods: https://github.com/CocoaPods/Specs/b...K.podspec.json

    Changing colors for the routes- currently the appearance of routes (the main route and the alternates) can be styled by editing the style JSON files that can be found in the SKMaps.zip archive that stores the resources. In the demo these JSON files are daystyle.json, grayscalestyle.json, nightstyle.json and outdoorstyle.json.
    Here you can find a modified daystyle.json file in which the route colors have been changed. Look for comments ("//") in this file to find out which properties were modified in order to change route colors. Similar changes in the other JSON style files should be made in order to modify route colors for the rest of the map styles.

    For the moment changing the route color dynamically or styling route segments differently is not currently supported in the SDK.\
    And another scenario:
    -while you cannot color the route, you can color various road segments along the route provided that you draw them separately. Retrieve the route information by calling routeCoordinatesForRouteWithId
    NSArray *locations = [[SKRoutingService sharedInstance] routeCoordinatesForRouteWithId:routeInformation.ro uteID];

    Note: make sure you have set requestExtendedRoutePointsInfo to true for SKRouteSetttings before calling calculate route. And then you'll have access to the road segments, which you can draw on the map as colored Polylines.

    Adding a map legend: you'll would have to implement this logic yourself, on the client side.

  3. #3
    Neuer skobbler
    Join Date
    12.02.2015
    Posts
    4
    Hi,
    That's great. Thanks for the information! I think you've answered everything I wanted to know and it has cleared things up for us.

  4. #4
    Erfahrener skobbler
    Join Date
    11.02.2015
    Posts
    123
    Hi Adela,

    Will there be a limit to the number of via points / intermediate stops that can be added to a route? If yes, what is the maximum number of intermediate stops?

    Many Thanks

  5. #5
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Hi guidove,

    From our tests, we can say that by adding 25 intermediate stops you should not encounter any issues. Let us know if you need any help.

    Best regards,
    Adela

  6. #6
    Neuer skobbler
    Join Date
    12.02.2015
    Posts
    4
    With regards to plotting multiple routes, can the SDK allow us to plot an arbitrary number of completely separate routes? e.g. if I have multiple bus routes, can the SDK do that? Or does it only support plotting one route at a time (plus the alternates). Thanks.

  7. #7
    Oberskobbler
    Join Date
    22.07.2014
    Posts
    399
    Hi Jonathan,

    For your scenario we recommend this approach: to calculate all the routes and then draw polylines on the map based on those routes.
    You can get the coordinates for each route with
    http://developer.skobbler.it/docs/an...sForRoute(int) or http://developer.skobbler.it/docs/an...sForRoute(int) and then draw coloured SkPolylines on the map
    Check the "GettingStarted" documentation http://developer.skobbler.com/gettin...android#sec009

    The routes can be saved & loaded from the cache (so that you don't spend time on recalculating them) when needed (http://developer.skobbler.com/docs/a...teToCache(int) and http://developer.skobbler.com/docs/a...FromCache(int)).

    Please let us know if you manage to solve it this way.

  8. #8
    Neuer skobbler
    Join Date
    12.02.2015
    Posts
    4
    Excellent thanks for the advice!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •