Skobbler map not zooming with zoomToRouteWithInset

2019-07-20 07:39发布

问题:

In the skobbler map, I have calculated a route. If I drag some where in the map, After that in button Click I want to see my route. In the doumentation given these method for ' Zooms the map to the current calculated route. '.

[[SKRoutingService sharedInstance] zoomToRouteWithInsets:UIEdgeInsetsMake(100, 100, 0, 0)];

I have given this but, When I called zoomToRouteWithInsets After drag on the map , then only it showing the route.

回答1:

There is a bug with zoomToRouteWithInsets that will be fixed in a future version.

The current workaround is to call the method twice (with the same parameters) and it will do the job:

[[SKRoutingService sharedInstance] zoomToRouteWithInsets:UIEdgeInsetsMake(100, 100, 0, 0)];
[[SKRoutingService sharedInstance] zoomToRouteWithInsets:UIEdgeInsetsMake(100, 100, 0, 0)];