ArcGIS Runtime SDK for iOS: AGSMap.h Source File
ArcGIS Runtime SDK for iOS  100.11
AGSMap.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2021 ESRI
3 
4  All rights reserved under the copyright laws of the United States
5  and applicable international laws, treaties, and conventions.
6 
7  This material is licensed for use under the Esri Master License
8  Agreement (MLA), and is bound by the terms of that agreement.
9  You may redistribute and use this code without modification,
10  provided you adhere to the terms of the MLA and include this
11  copyright notice.
12 
13  See use restrictions at http://www.esri.com/legal/pdfs/mla_e204_e300/english
14 
15  For additional information, contact:
16  Environmental Systems Research Institute, Inc.
17  Attn: Contracts and Legal Services Department
18  380 New York Street
19  Redlands, California, 92373
20  USA
21 
22  email: contracts@esri.com
23  */
24 
25 #import <Foundation/Foundation.h>
26 #import <ArcGIS/AGSLoadableBase.h>
27 #import <ArcGIS/AGSJSONSerializable.h>
28 #import <ArcGIS/AGSImage.h>
29 #import <ArcGIS/AGSColor.h>
30 #import <ArcGIS/AGSBasemap.h>
31 
32 @class AGSLayer;
33 @class AGSPortalItem;
34 @class AGSEnvelope;
35 @class AGSPortal;
36 @class AGSPortalFolder;
37 @class AGSViewpoint;
38 @class AGSItem;
39 @class AGSBookmark;
41 @class AGSFeatureTable;
42 @class AGSLoadSettings;
43 @class AGSOfflineSettings;
44 @class AGSSpatialReference;
45 @class AGSUtilityNetwork;
47 
48 @protocol AGSCancelable;
49  //Required for Globals API doc
51 
68 @interface AGSMap : AGSLoadableBase <AGSJSONSerializable, NSCopying>
69 
70 
71 
72 #pragma mark -
73 #pragma mark initializers
74 
78 -(instancetype)init;
79 
84 -(instancetype)initWithSpatialReference:(AGSSpatialReference*)spatialReference;
85 
90 -(instancetype)initWithBasemap:(AGSBasemap*)basemap;
91 
96 -(instancetype)initWithItem:(AGSItem*)item;
97 
107 -(nullable instancetype)initWithURL:(NSURL*)URL;
108 
119 - (instancetype)initWithBasemapType:(AGSBasemapType)basemapType
120  latitude:(double)latitude
121  longitude:(double)longitude
122  levelOfDetail:(NSInteger)levelOfDetail;
123 
129 - (instancetype)initWithBasemapStyle:(AGSBasemapStyle)basemapStyle;
130 
134 +(instancetype)map;
135 
140 +(instancetype)mapWithSpatialReference:(AGSSpatialReference*)spatialReference;
141 
146 +(instancetype)mapWithBasemap:(AGSBasemap*)basemap;
147 
152 +(instancetype)mapWithItem:(AGSItem*)item;
153 
163 +(nullable instancetype)mapWithURL:(NSURL*)URL;
164 
175 + (instancetype)mapWithBasemapType:(AGSBasemapType)basemapType
176  latitude:(double)latitude
177  longitude:(double)longitude
178  levelOfDetail:(NSInteger)levelOfDetail;
179 
185 + (instancetype)mapWithBasemapStyle:(AGSBasemapStyle)basemapStyle;
186 
198 - (id<AGSCancelable>)namedTraceConfigurationsFromUtilityNetwork:(AGSUtilityNetwork *)utilityNetwork
199  completion:(void(^)(NSArray<AGSUtilityNamedTraceConfiguration *> * _Nullable result, NSError * _Nullable error))completion;
200 
201 #pragma mark -
202 #pragma mark properties
203 
212 @property (nullable, nonatomic, strong, readwrite) AGSColor *backgroundColor;
213 
217 @property (nullable, nonatomic, strong, readonly) AGSItem *item;
218 
222 @property (nonatomic, copy, readonly) NSArray<AGSTransportationNetworkDataset*> *transportationNetworks;
223 
238 @property (nonatomic, strong, readonly) NSMutableArray<AGSUtilityNetwork *> *utilityNetworks;
239 
244 @property (nonatomic, copy, readonly) NSString *version;
245 
249 @property (nonatomic, strong, readwrite) AGSBasemap *basemap;
250 
255 @property (nonatomic, strong, readonly) NSMutableArray<AGSLayer*> *operationalLayers;
256 
260 @property (nullable, nonatomic, strong, readonly) AGSOfflineSettings *offlineSettings;
261 
266 @property (nonatomic, strong, readonly) NSMutableArray<AGSFeatureTable*> *tables;
267 
271 @property (nonatomic, assign, readwrite) double minScale;
272 
276 @property (nonatomic, assign, readwrite) double maxScale;
277 
282 @property (nonatomic, assign, readwrite) double referenceScale;
283 
294 @property (nullable, nonatomic, strong, readonly) AGSSpatialReference *spatialReference;
295 
300 @property (nonatomic, strong, readonly) NSMutableArray<AGSBookmark*> *bookmarks;
301 
305 @property (nullable, nonatomic, strong, readwrite) AGSViewpoint *initialViewpoint;
306 
310 @property (nonatomic, strong, readwrite) AGSLoadSettings *loadSettings;
311 
312 #pragma mark - Save/SaveAs
313 
332 - (id<AGSCancelable>)saveAs:(NSString *)title
333  portal:(AGSPortal *)portal
334  tags:(NSArray<NSString*> *)tags
335  folder:(nullable AGSPortalFolder *)folder
336  itemDescription:(NSString*)itemDescription
337  thumbnail:(nullable AGSImage *)thumbnail
338 forceSaveToSupportedVersion:(BOOL)forceSaveToSupportedVersion
339  completion:(nullable void(^)(NSError * __nullable error))completion;
340 
353 - (id<AGSCancelable>)saveWithForceSaveToSupportedVersion:(BOOL)forceSaveToSupportedVersion
354  completion:(nullable void(^)(NSError * __nullable error))completion;
355 
356 @end
357 
358 
AGSBasemapType
Definition: AGSBasemap.h:43
AGSBasemapStyle
Definition: AGSBasemap.h:72
#define AGSColor
Definition: AGSColor.h:34
#define AGSImage
Definition: AGSImage.h:34
A basemap for a map or a scene.
Definition: AGSBasemap.h:135
A geographic or time location for quick navigation.
Definition: AGSBookmark.h:37
A geometry that represents a rectangular shape.
Definition: AGSEnvelope.h:55
A source for dataset containing geographic features or non-spatial records.
Definition: AGSFeatureTable.h:66
Object representing a unit of content.
Definition: AGSItem.h:44
An abstract base class for all layers.
Definition: AGSLayer.h:194
Settings for layers in a Map or Scene.
Definition: AGSLoadSettings.h:42
A base class for loadables.
Definition: AGSLoadableBase.h:45
A map containing 2D geographic content.
Definition: AGSMap.h:68
double minScale
Definition: AGSMap.h:271
AGSOfflineSettings * offlineSettings
Definition: AGSMap.h:260
NSArray< AGSTransportationNetworkDataset * > * transportationNetworks
Definition: AGSMap.h:222
NSMutableArray< AGSUtilityNetwork * > * utilityNetworks
Definition: AGSMap.h:238
instancetype map()
NSMutableArray< AGSFeatureTable * > * tables
Definition: AGSMap.h:266
AGSItem * item
Definition: AGSMap.h:217
NSMutableArray< AGSBookmark * > * bookmarks
Definition: AGSMap.h:300
AGSSpatialReference * spatialReference
Definition: AGSMap.h:294
AGSColor * backgroundColor
Definition: AGSMap.h:212
NSString * version
Definition: AGSMap.h:244
AGSBasemap * basemap
Definition: AGSMap.h:249
instancetype init()
double referenceScale
Definition: AGSMap.h:282
AGSViewpoint * initialViewpoint
Definition: AGSMap.h:305
double maxScale
Definition: AGSMap.h:276
NSMutableArray< AGSLayer * > * operationalLayers
Definition: AGSMap.h:255
AGSLoadSettings * loadSettings
Definition: AGSMap.h:310
Represents settings in an online web map which the author has configured for offline use.
Definition: AGSOfflineSettings.h:49
Represents a folder of content within the Portal or Organization.
Definition: AGSPortalFolder.h:38
An Object representing a Portal for ArcGIS.
Definition: AGSPortal.h:105
Object representing a unit of content in an ArcGIS portal.
Definition: AGSPortalItem.h:93
Represents the spatial reference of a geometry.
Definition: AGSSpatialReference.h:46
A transportation network dataset.
Definition: AGSTransportationNetworkDataset.h:37
A set of predefined trace options that can be used by the AGSUtilityTraceParameters object to simplif...
Definition: AGSUtilityNamedTraceConfiguration.h:46
A utility network.
Definition: AGSUtilityNetwork.h:58
Represents the view location of an AGSMapView or AGSSceneView object.
Definition: AGSViewpoint.h:52
A protocol exposed by operations that allow cancellation.
Definition: AGSCancelable.h:38
A protocol to convert objects to and from JSON.
Definition: AGSJSONSerializable.h:38