ArcGIS Runtime SDK for iOS: AGSMap.h Source File
ArcGIS Runtime SDK for iOS  100.15
AGSMap.h
Go to the documentation of this file.
1 /*
2  COPYRIGHT 2022 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/AGSGeoModel.h>
27 #import <ArcGIS/AGSJSONSerializable.h>
28 #import <ArcGIS/AGSImage.h>
29 #import <ArcGIS/AGSColor.h>
30 #import <ArcGIS/AGSBasemap.h>
31 #import <ArcGIS/AGSCancelable.h>
32 
33 @class AGSPortal;
34 @class AGSPortalFolder;
35 @class AGSViewpoint;
36 @class AGSItem;
37 @class AGSOfflineSettings;
38 @class AGSSpatialReference;
39 @class AGSUtilityNetwork;
41 @class AGSEnvelope;
42  //Required for Globals API doc
44 
61 @interface AGSMap : AGSGeoModel <AGSJSONSerializable, NSCopying>
62 
63 
64 
65 #pragma mark -
66 #pragma mark initializers
67 
71 -(instancetype)init;
72 
77 -(instancetype)initWithSpatialReference:(AGSSpatialReference*)spatialReference;
78 
83 -(instancetype)initWithBasemap:(AGSBasemap*)basemap;
84 
89 -(instancetype)initWithItem:(AGSItem*)item;
90 
100 -(nullable instancetype)initWithURL:(NSURL*)URL;
101 
107 - (instancetype)initWithBasemapStyle:(AGSBasemapStyle)basemapStyle;
108 
112 +(instancetype)map;
113 
118 +(instancetype)mapWithSpatialReference:(AGSSpatialReference*)spatialReference;
119 
124 +(instancetype)mapWithBasemap:(AGSBasemap*)basemap;
125 
130 +(instancetype)mapWithItem:(AGSItem*)item;
131 
141 +(nullable instancetype)mapWithURL:(NSURL*)URL;
142 
148 + (instancetype)mapWithBasemapStyle:(AGSBasemapStyle)basemapStyle;
149 
161 - (id<AGSCancelable>)namedTraceConfigurationsFromUtilityNetwork:(AGSUtilityNetwork *)utilityNetwork
162  completion:(void(^)(NSArray<AGSUtilityNamedTraceConfiguration *> * _Nullable result, NSError * _Nullable error))completion;
163 
164 #pragma mark -
165 #pragma mark properties
166 
175 @property (nullable, nonatomic, strong, readwrite) AGSColor *backgroundColor;
176 
191 @property (nonatomic, strong, readonly) NSMutableArray<AGSUtilityNetwork *> *utilityNetworks;
192 
196 @property (nonatomic, strong, readwrite) AGSBasemap *basemap;
197 
201 @property (nullable, nonatomic, strong, readonly) AGSOfflineSettings *offlineSettings;
202 
206 @property (nonatomic, assign, readwrite) double minScale;
207 
211 @property (nonatomic, assign, readwrite) double maxScale;
212 
217 @property (nonatomic, assign, readwrite) double referenceScale;
218 
222 @property (nullable, nonatomic, strong, readwrite) AGSViewpoint *initialViewpoint;
223 
238 @property (nullable, nonatomic, strong, readwrite) AGSEnvelope *maxExtent;
239 
240 #pragma mark - Save/SaveAs
241 
260 - (id<AGSCancelable>)saveAs:(NSString *)title
261  portal:(AGSPortal *)portal
262  tags:(NSArray<NSString*> *)tags
263  folder:(nullable AGSPortalFolder *)folder
264  itemDescription:(NSString*)itemDescription
265  thumbnail:(nullable AGSImage *)thumbnail
266 forceSaveToSupportedVersion:(BOOL)forceSaveToSupportedVersion
267  completion:(nullable void(^)(NSError * __nullable error))completion;
268 
281 - (id<AGSCancelable>)saveWithForceSaveToSupportedVersion:(BOOL)forceSaveToSupportedVersion
282  completion:(nullable void(^)(NSError * __nullable error))completion;
283 
284 @end
285 
287 
299 - (instancetype)initWithBasemapType:(AGSBasemapType)basemapType
300  latitude:(double)latitude
301  longitude:(double)longitude
302  levelOfDetail:(NSInteger)levelOfDetail ;
303 
315 + (instancetype)mapWithBasemapType:(AGSBasemapType)basemapType
316  latitude:(double)latitude
317  longitude:(double)longitude
318  levelOfDetail:(NSInteger)levelOfDetail ;
319 
320 @end
321 
322 
AGSBasemapStyle
Definition: AGSBasemap.h:72
#define AGSColor
Definition: AGSColor.h:34
#define AGSImage
Definition: AGSImage.h:34
Definition: AGSMap.h:286
A basemap for a map or a scene.
Definition: AGSBasemap.h:135
A geometry that represents a rectangular shape.
Definition: AGSEnvelope.h:55
A base class for either an AGSMap or an AGSScene.
Definition: AGSGeoModel.h:54
Object representing a unit of content.
Definition: AGSItem.h:43
A map containing 2D geographic content.
Definition: AGSMap.h:61
double minScale
Definition: AGSMap.h:206
AGSOfflineSettings * offlineSettings
Definition: AGSMap.h:201
AGSEnvelope * maxExtent
Definition: AGSMap.h:238
NSMutableArray< AGSUtilityNetwork * > * utilityNetworks
Definition: AGSMap.h:191
instancetype map()
AGSColor * backgroundColor
Definition: AGSMap.h:175
AGSBasemap * basemap
Definition: AGSMap.h:196
instancetype init()
double referenceScale
Definition: AGSMap.h:217
AGSViewpoint * initialViewpoint
Definition: AGSMap.h:222
double maxScale
Definition: AGSMap.h:211
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:98
Represents the spatial reference of a geometry.
Definition: AGSSpatialReference.h:49
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:57
Represents the view location of an AGSMapView or AGSSceneView object.
Definition: AGSViewpoint.h:51
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