Skobbler map not zooming with zoomToRouteWithInsets

两盒软妹~` 提交于 2019-12-12 18:28:27

问题


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)];


来源:https://stackoverflow.com/questions/25931756/skobbler-map-not-zooming-with-zoomtoroutewithinsets

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!