0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Day10 高德地图 音频视屏 (网络第03天)

Posted at

#高德地图
(查看文档AMap_iOS_API_Guide_V2.6.0 网络第07天里)

@property (nonatomic , strong) MAMapView * mapView;
@property (nonatomic , strong) AMapSearchAPI * search;


//key值
[MAMapServices sharedServices].apiKey = @"d60542548c37aff7c70597a7c15039e9";
//设置地图 (卫星地图)MAMapTypeSatellite
self.mapView.mapType = MAMapTypeSatellite;

//创建地图视图

CLLocationCoordinate2D c2d =   CLLocationCoordinate2DMake(30.662221, 104.041367);
MACoordinateSpan span = MACoordinateSpanMake(0.01, 0.01);
MACoordinateRegion  region = MACoordinateRegionMake(c2d, span);
[self.mapView setRegion:region];
[self.view addSubview:self.mapView];

//搜索服务

self.search = [[AMapSearchAPI alloc]initWithSearchKey:@"d60542548c37aff7c70597a7c15039e9" Delegate:self];
//构造request请求 对象 ,配置关键字搜索参数   搜地方的请求
AMapPlaceSearchRequest * poliRequest = [[AMapPlaceSearchRequest alloc]init];
poliRequest.searchType = AMapSearchType_PlaceKeyword;
poliRequest.keywords = @"大学";
poliRequest.city = @[@"成都"];
[self.search AMapPlaceSearch:poliRequest];

//搜索的信息回调

  -(void)onPlaceSearchDone:(AMapPlaceSearchRequest *)request response:(AMapPlaceSearchResponse *)response{

   NSArray * array = response.pois;
for (AMapPOI * poi in array) {
    NSLog(@"%@",poi);
     }
}

//显示隐藏交通状况

-(void)foo:(UIButton *)btn{
self.mapView.showTraffic = !self.mapView.showTraffic;

}

#断点续传
HTTP协议请求头可以设置Range:bytes=字节数-,

#应用沙盒
(网络第03天)详情

#音乐播放

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?