首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >MKMapView路线不在公路上

MKMapView路线不在公路上
EN

Stack Overflow用户
提问于 2013-01-09 19:31:03
回答 1查看 300关注 0票数 1

我已经实现了一个在两个点之间绘制路线的方法,但路线不在道路上。我怎么才能只在路上画路线呢?

代码语言:javascript
复制
coordinateArray[0] = CLLocationCoordinate2DMake(appDelegate.latitude, appDelegate.longitude);
coordinateArray[1] = CLLocationCoordinate2DMake(appDelegate.latitude2, appDelegate.longitude2); 

self.routeLine = [MKPolyline polylineWithCoordinates:coordinateArray count:2];
[self.myMapView setVisibleMapRect:[self.routeLine boundingMapRect]]; 
[self.myMapView addOverlay:self.routeLine];
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-01-10 00:07:00

这非常有帮助((:使用Google Maps API https://github.com/Surya121/SBMapWithRoute的MKPolyline

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/14234270

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档