PDA

View Full Version : Display entire route with annotations.



latsonml
30.06.2015, 14:38
I'm using the swift Demo as a guideline and for some reason the display cuts off parts of the mapView for really long distances (i.e. navigating from California to Florida). 2187

The MapKit/Swift equivalent is

var myPolyline = route.polyline

let edgeInset = UIEdgeInsetsMake(10, 10, 10, 10)

self.map!.setVisibleMapRect(myPolyline.boundingMap Rect, edgePadding: edgeInset, animated: true)

Is there any way to replicate this for SKMaps using Swift?

dandronic
03.07.2015, 12:28
The equivalent would be (Objective-C) (see the Car Navigation UI example in the demo project (http://developer.skobbler.com/support#download) for details):


[[SKRoutingService sharedInstance] zoomToRouteWithInsets:UIEdgeInsetsMake(10.0, 10.0, 10.0, 10.0)];

What code are you using to receive that screenshot?