How to create a route from a GPX file using Skobbler?

I need to create a route in a mobile app using the GPX route I got from the server. I couldn't find any manuals on the skobbler official site or on the internet.

This is what I tried but failed

SKGPSFileElement* gpxFile;
gpxFile.type = SKGPSFileElementGPXRoute;
gpxFile.name = @"route";
gpxFile.extensions = @"gpx";
[[SKRoutingService sharedInstance] calculateRouteWithSettings:nil GPSFileElement:gpxFile];

      

Any hints?

+3


source to share


1 answer


The easiest way is to look at the sample tracks in the demo project since there you already have the code you need to read, draw and convert this GPX track to a route.

I think it will be similar to this (using the SKGPSFileElement and SKGPSFilesService helper classes):



SKGPSFileElement* root = [[SKGPSFilesService sharedInstance] loadFileAtPath:path error:nil];

      

Note: if you're just interested in passing the GPX track content as an array of points to the routing engine, you can use the calculateRouteWithSettings: customLocations API

+4


source







All Articles