下载此文档

地图-iOS-SDK-课程4.pdf


文档分类:IT计算机 | 页数:约18页 举报非法文档有奖
1/18
下载提示
  • 1.该资料是网友上传的,本站提供全文预览,预览什么样,下载就什么样。
  • 2.下载该文档所得收入归上传者、原创者。
  • 3.下载的文档,不会出现我们的网址水印。
1/18 下载此文档
文档列表 文档介绍
: .

- (void)handleLongPress:(UILongPressGestureRecognizer *)gesture
{
if ( == UIGestureRecognizerStateBegan) 坐标转换
{
CLLocationCoordinate2D coordinate = [_mapView convertPoint:[gesture
locationInView:_mapView] toCoordinateFromView:_mapView];

// 添加标注 更新目的地标记
if (_destinationPoint != nil)
{
// 清理
[_mapView removeAnnotation:_destinationPoint];
_destinationPoint = nil;
}

_destinationPoint = [[MAPointAnnotation alloc] init];
= coordinate;
= @"Destination";

[_mapView addAnnotation:_destinationPoint];
}
}

6选择目的地

7搜索路线
路线搜索类型
AMapSearchType_NaviDrive 驾⻋
AMapSearchType_NaviWalking 步⾏
AMapSearchType_NaviBus 公交
返回结果类型 AMapRoute
以步⾏结果举例
AMapRoute AMapPath AMapStep
⽅案 步骤
path0 step0
route path1 step1
path2 step2
… …

8搜索路线
添加搜索按钮
- (void)initControls
{

UIButton *pathButton = [UIButton buttonWithType:UIButtonTypeRoundedRect];
pathButt

地图-iOS-SDK-课程4 来自淘豆网m.daumloan.com转载请标明出处.

非法内容举报中心
文档信息
  • 页数18
  • 收藏数0 收藏
  • 顶次数0
  • 上传人文库旗舰店
  • 文件大小651 KB
  • 时间2022-05-13
最近更新