您的位置:首页 > 移动开发 > IOS开发

arcgis for iOS10.2.5 地图加载

2017-08-18 13:33 399 查看
// set the delegate for the map view
self.mapView.layerDelegate = self;

//create an instance of a tiled map service layer
AGSTiledMapServiceLayer *tiledLayer = [[AGSTiledMapServiceLayer alloc] initWithURL:[NSURL URLWithString:@"http://www.arcgisonline.cn/ArcGIS/rest/services/ChinaOnlineCommunity/MapServer"]];

//Add it to the map view
[self.mapView addMapLayer:tiledLayer withName:@"Tiled Layer"];

//动态图层,使用ArcGIS Online的全球人口数据
NSString *str_URL_1 =
@"http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer";
NSURL *url_Dynamic = [NSURL URLWithString:str_URL_1];
AGSDynamicMapServiceLayer *dynamicLyr = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL:url_Dynamic];
[self.mapView addMapLayer:dynamicLyr withName:@"Population Layer"];
//加载本地切片
AGSLocalTiledLayer *localLayer=[AGSLocalTiledLayer localTiledLayerWithName:@"peituxin"];
[self.mapView addMapLayer:localLayer withName:@"Local Layer"];
iOS交流群:438651997,欢迎加入讨论
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
相关文章推荐