ArcGIS Runtime SDK for iOS
100.15
|
A map containing 2D geographic content.
Instance of this class represent a map. It can be displayed on the screen by AGSMapView
. Thus, a map represents the model in an MVC architecture, and a mapview represents the view. A map specifies how the geographic data is organized, and a mapview renders the data and allows users to interact with it.
Conceptually, a map's geographic content is derived from its basemap
and operationalLayers
.
A basemap helps orient the user and provides a geographical context for the content you want to display in the map. It is used for locational reference and provides a framework on which you can overlay operational layers. Thus, the basemap serves as a foundation and provides a framework for working with information geographically. It's content is typically static and does not change frequently. For eg, streets, parcel boundaries, or geographic features such as rivers. Some basemaps also contain reference layers, such as labels, which are drawn on top of operational layers.
Operational layers provide content that is of unique interest to the application and the task at hand. Their content might change frequently. For eg earthquakes, traffic, or the weather.
The map has a spatialReference
which specifies how the geographic content from its basemap and operational layers is aligned when combined together.
AGSScene
for 3D geographic content Instance Methods | |
(void) | - cancelLoad |
(void) | - doCancelLoading |
(void) | - doStartLoading: |
(instancetype) | - init |
(instancetype) | - initWithBasemap: |
(instancetype) | - initWithBasemapStyle: |
(instancetype) | - initWithBasemapType:latitude:longitude:levelOfDetail: |
(instancetype) | - initWithItem: |
(instancetype) | - initWithSpatialReference: |
(nullable instancetype) | - initWithURL: |
(void) | - loadDidFinishWithError: |
(void) | - loadWithCompletion: |
(id< AGSCancelable >) | - namedTraceConfigurationsFromUtilityNetwork:completion: |
(void) | - onLoadStatusChanged |
(void) | - retryLoadWithCompletion: |
(id< AGSCancelable >) | - saveAs:portal:tags:folder:itemDescription:thumbnail:forceSaveToSupportedVersion:completion: |
(id< AGSCancelable >) | - saveWithForceSaveToSupportedVersion:completion: |
(nullable id) | - toJSON: |
Class Methods | |
(nullable id< AGSJSONSerializable >) | + fromJSON:error: |
(instancetype) | + map |
(instancetype) | + mapWithBasemap: |
(instancetype) | + mapWithBasemapStyle: |
(instancetype) | + mapWithBasemapType:latitude:longitude:levelOfDetail: |
(instancetype) | + mapWithItem: |
(instancetype) | + mapWithSpatialReference: |
(nullable instancetype) | + mapWithURL: |
Properties | |
AGSColor * | backgroundColor |
AGSBasemap * | basemap |
NSMutableArray< AGSBookmark * > * | bookmarks |
AGSGeoModelFloorDefinition * | floorDefinition |
AGSFloorManager * | floorManager |
AGSGeotriggersInfo * | geotriggersInfo |
AGSViewpoint * | initialViewpoint |
AGSItem * | item |
NSError * | loadError |
AGSLoadSettings * | loadSettings |
AGSLoadStatus | loadStatus |
AGSEnvelope * | maxExtent |
double | maxScale |
double | minScale |
AGSOfflineSettings * | offlineSettings |
NSMutableArray< AGSLayer * > * | operationalLayers |
double | referenceScale |
AGSSpatialReference * | spatialReference |
NSMutableArray< AGSFeatureTable * > * | tables |
NSArray< AGSTransportationNetworkDataset * > * | transportationNetworks |
NSDictionary< NSString *, id > * | unknownJSON |
NSDictionary< NSString *, id > * | unsupportedJSON |
NSMutableArray< AGSUtilityNetwork * > * | utilityNetworks |
NSString * | version |
|
requiredinherited |
Cancels loading if it is in progress, otherwise it does nothing. This should be called carefully because other objects could be waiting for loadWithCompletion:
or retryLoadWithCompletion:
to complete and this will call them all back with the error of NSUserCancelledError
- (void) doCancelLoading |
Never call this method directly. The framework calls this method on a background thread when cancelLoad (AGSLoadable-p)
is called. It is meant to be overriden by subclasses. Subclasses should override this method to cancel loading their data and call loadDidFinishWithError: (AGSLoadableBase(ForSubclassEyesOnly))
at the end passing in an error representing NSUserCancelledError
.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
- (void) doStartLoading: | (BOOL) | retrying |
Never call this method directly. The framework calls this method on a background thread when loadWithCompletion: (AGSLoadable-p)
or retryLoadWithCompletion: (AGSLoadable-p)
is called. It is meant to be overriden by subclasses. Subclasses should override this method to load their data and call loadDidFinishWithError: (AGSLoadableBase(ForSubclassEyesOnly))
upon completion, passing in the error if any.
retrying | flag that is true if this method was called from retryLoadWithCompletion: (AGSLoadable-p) . |
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
|
staticrequiredinherited |
Initializes and returns an object from its JSON representation.
JSONObject | NSDictionary or NSArray containing the JSON. |
error | encountered during the operation, if any. |
- (instancetype) init |
Instantiates an empty map. To add content to the map, refer to basemap
and operationalLayers
- (instancetype) initWithBasemap: | (AGSBasemap *) | basemap |
Instantiates a map with the given basemap
basemap | to use with the map |
- (instancetype) initWithBasemapStyle: | (AGSBasemapStyle) | basemapStyle |
Creates a map with a basemap style.
basemapStyle | The basemap style. |
AGSBasemapStyle
- (instancetype) initWithBasemapType: | (AGSBasemapType) | basemapType | |
latitude: | (double) | latitude | |
longitude: | (double) | longitude | |
levelOfDetail: | (NSInteger) | levelOfDetail | |
Creates a map with a basemap and an initial viewpoint. The map will be created with a basemap set, a spatial reference in WGS84 and the initial viewpoint set. In order to take advantage of geographically load balanced services and monitor usage with API keys or named users, use initWithBasemapStyle:
.
basemapType | The basemap. |
latitude | The latitude for the initial viewpoint. |
longitude | The longitude for the initial viewpoint. |
levelOfDetail | The level of detail (converted to scale) for the initial viewpoint. 0 is the most zoomed out. |
initWithBasemapStyle:
. Provided by category AGSMap(AGSDeprecated).
- (instancetype) initWithItem: | (AGSItem *) | item |
Instantiate a map based on the given web map item.
item | that represents a web map on ArcGIS Online or an on-premises portal. Item's type must be AGSPortalItemTypeWebMap . |
- (instancetype) initWithSpatialReference: | (AGSSpatialReference *) | spatialReference |
Instantiates an empty map with the given spatial reference. To add content to the map, refer to basemap
and operationalLayers
spatialReference | to instantiate the map with |
- (nullable instancetype) initWithURL: | (NSURL *) | URL |
Instantiate a map based on the given web map URL. The URL you pass can be one of three basic types. Examples of these types are:
URL | of the web map on ArcGIS Online or an on-premises portal |
- (void) loadDidFinishWithError: | (nullable NSError *) | error |
Only subclasses should call this method in doStartLoading: (AGSLoadableBase(ForSubclassEyesOnly))
and doCancelLoading (AGSLoadableBase(ForSubclassEyesOnly))
when done loading or failed to load.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
|
requiredinherited |
Loads data for the object asynchronously. The completion block is invoked upon completion.
You can call this method any number of times, however only one attempt is made to load the data. If it is already loading, it will just continue to load (i.e. not force a reload). If it has already loaded successfully, the completion block will be invoked right away. If it has already failed to load, the completion block will be invoked right away with error previously encountered. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.
completion | block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. |
- cancelLoad
to cancel loading - retryLoadWithCompletion:
to force reload + (instancetype) map |
Instantiates an empty map. To add content to the map, refer to basemap
and operationalLayers
+ (instancetype) mapWithBasemap: | (AGSBasemap *) | basemap |
Instantiates a map to use the given basemap
basemap | to use with the map |
+ (instancetype) mapWithBasemapStyle: | (AGSBasemapStyle) | basemapStyle |
Creates a map with a basemap style.
basemapStyle | The basemap style. |
AGSBasemapStyle
+ (instancetype) mapWithBasemapType: | (AGSBasemapType) | basemapType | |
latitude: | (double) | latitude | |
longitude: | (double) | longitude | |
levelOfDetail: | (NSInteger) | levelOfDetail | |
Creates a map with a basemap and an initial viewpoint. The map will be created with a basemap set, a spatial reference in WGS84 and the initial viewpoint set. In order to take advantage of geographically load balanced services and monitor usage with API keys or named users, use mapWithBasemapStyle:
.
basemapType | The basemap. |
latitude | The latitude for the initial viewpoint. |
longitude | The longitude for the initial viewpoint. |
levelOfDetail | The level of detail (converted to scale) for the initial viewpoint. 0 is the most zoomed out. |
mapWithBasemapStyle:
. Provided by category AGSMap(AGSDeprecated).
+ (instancetype) mapWithItem: | (AGSItem *) | item |
Instantiate a map based on the given web map item.
item | that represents a web map on ArcGIS Online or an on-premises portal. Item's type must be AGSPortalItemTypeWebMap . |
+ (instancetype) mapWithSpatialReference: | (AGSSpatialReference *) | spatialReference |
Instantiates an empty map with the given spatial reference. To add content to the map, refer to basemap
and operationalLayers
spatialReference | to instantiate the map with |
+ (nullable instancetype) mapWithURL: | (NSURL *) | URL |
Instantiate a map based on the given web map URL. The URL you pass can be one of three basic types. Examples of these types are:
URL | of the web map on ArcGIS Online or an on-premises portal |
- (id<AGSCancelable>) namedTraceConfigurationsFromUtilityNetwork: | (AGSUtilityNetwork *) | utilityNetwork | |
completion: | (void(^)(NSArray< AGSUtilityNamedTraceConfiguration * > *_Nullable result, NSError *_Nullable error)) | completion | |
Loads an array of AGSUtilityNamedTraceConfiguration
objects referenced by AGSUtilityNetwork's
map. The result
array will be empty if the AGSUtilityNetwork
object does not belong to the map or if the map does not contain any AGSUtilityNamedTraceConfiguration
objects. If the AGSUtilityNetwork
object is not loaded the error
parameter will be populated.
utilityNetwork | The AGSUtilityNetwork object. |
completion | Block that is invoked when the operation finishes. The result parameter is populated if the operation completed successfully, otherwise the error parameter is populated. |
- (void) onLoadStatusChanged |
Never call this method directly. The framework calls this method on a background thread when AGSLoadable::loadStatus
changes is called. Subclasses can optionally implement this to know when their loading status has changed.
Provided by category AGSLoadableBase(ForSubclassEyesOnly).
|
requiredinherited |
Tries to reload when an object has failed to load. This method should be called judiciously. It should be called when:
cancelLoad
and then this methodIf the data hasn't started loading, it will start loading. If it is already loading, it will just continue to load. If it has already loaded successfully, calls back right away. If it has already failed to load, tries again. This method supports multiple callers and will call them all back on completion. However, each caller's completion block will be invoked once and only once.
completion | block that is invoked when object loads successfully or fails to load. An error is passed to the block if the object fails to load. |
|
requiredinherited |
Returns JSON representation for this object.
error | encountered during the operation, if any. |
NSDictionary
or NSArray
containing the JSON. Reimplemented in AGSPortalItem.
|
readwritenonatomicstrong |
The background color of the map. This value determines the color to be displayed behind the map. This color will be displayed in transparent areas of the map as well as areas where there is no basemap or operational data. When a map is set on an AGSMapView
, changes to AGSMap::backgroundColor
will immediately take effect. The default value is nil
. In this case, the AGSMapView::backgroundGrid
is used to determine the background color to display.
|
readwritenonatomicstrong |
The map's basemap
|
readnonatomicstronginherited |
|
readwritenonatomicstronginherited |
Defines the properties that allow a map or a scene to be floor-aware.
Floor-aware maps and scenes contain data representing floor plan and indoor features. The data displayed by floor-aware maps and scenes can be filtered based on floor levels using the AGSFloorManager
. This property is nil
for maps or scenes that are not floor-aware. When this property is set, a new unloaded AGSGeoModel::floorManager
is instantiated.
AGSGeoModel::floorManager
|
readnonatomicstronginherited |
Manages the data displayed for a floor-aware map or scene, allowing the data to be filtered based on floor levels.
This property is created using the floor-aware metadata defined by AGSGeoModel::floorDefinition
, if not nil
. This property is nil
if the map/scene is not loaded or if the map/scene is not floor-aware. An AGSFloorManager
must be loaded before you can access its properties and perform floor filtering.
AGSFloorManager
|
readnonatomicstronginherited |
An object that presents information on the set of AGSGeotrigger
objects defined for the map or scene.
You must load the AGSGeotriggersInfo
to populate the AGSGeotriggersInfo::geotriggers
defined by the author of the map or scene. If no geotriggers were defined, the the collection will be empty.
Use an AGSGeotriggerMonitor
to check each of the conditions defined in AGSGeotriggersInfo::geotriggers
.
When you save the map, any AGSGeotrigger
objects that reference local data (for example an AGSGraphicsOverlayFenceParameters
) will be omitted.
|
readwritenonatomicstrong |
The map's initial viewpoint. This is the area initially displayed by an AGSMapView
when the map is used.
|
readnonatomicstronginherited |
The item for the map or scene.
An ID for a resource, such as an AGSPortalItem
(for maps created from a portal) or an AGSLocalItem
(for maps and scenes in a map or scene package). Note that a map or scene cannot be instantiated from an AGSLocalItem
.
|
readnonatomicstronginherited |
The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.
|
readwritenonatomicstronginherited |
Set default behaviors (preferences) and control the rendering behaviors for maps and scenes as they load.
Set preferences and control rendering behaviors when maps and scenes load. For example, you can specify which tiling mode should be used when feature layers are added or specify whether feature tables should use advanced symbology.
|
readrequirednonatomicassigninherited |
Status of the load operation.
|
readwritenonatomicstrong |
The extent that constrains the display to a specific region. This will be nil
if the max extent has not been explicitly set. Setting this to nil
sets the maximum extent to the default behavior, which is to constrain the display to an extent calculated when the map gets loaded, either by the union of the full extent of all basemap layers, or by the first operational layer's full extent if the map has no basemap.
When the max extent width is smaller than the full world width, panning horizontally is limited to the max extent irrespective of the AGSMapView::wrapAroundMode
.
If the AGSGeoModel::initialViewpoint
is not set, the max extent is used as initial viewpoint. If the AGSGeoModel::initialViewpoint
is set but is not compatible with the max extent, the max extent takes precedence and the initial display will respect the max extent.
|
readwritenonatomicassign |
The maximum scale that this map will be visible at. A value of zero indicates that there is no maximum scale and the user can zoom in indefinitely.
|
readwritenonatomicassign |
The minimum scale that this map will be visible at. A value of zero indicates that there is no minimum scale and the user can zoom out indefinitely.
|
readnonatomicstrong |
The offline settings for the map.
|
readnonatomicstronginherited |
Layers that reference data from a file or a service and are typically used to visualize the data in a map or scene. For example, a fleet of vehicles being tracked on a map.
Operational layers, which display on top of the AGSBasemap::baseLayers
property, are hosted and managed on the ArcGIS Platform as feature layers, KML layers, WFS layers, tile layers, and more. Several layer types can also be used by your ArcGIS Runtime app as local layers, such as feature layers and tiled layers. You cannot reuse a layer array coming from a different map or scene. Instead, you must create a new array of AGSLayer
objects.
AGSLayer
, AGSBasemap::baseLayers
|
readwritenonatomicassign |
The reference scale for the map. The reference scale of the map is the scale at which a client should view the map for the feature symbols and text to appear at their authored size. If the client changes the viewing scale, then feature symbols and text will grow or shrink to keep a consistent size on the map (not the screen). This only happens if the reference scale is greater than zero and for feature layers that have scaleSymbols set to true, otherwise the symbols and text stay at their authored size. The reference scale will be zero if the map is not loaded or if there is no reference scale and the symbols and text should appear at default size regardless of the viewing scale.
|
readnonatomicstronginherited |
A well-known ID (WKID) integer value or a text string definition referred to as a well-known text (WKT) representation that identifies how a geometry's coordinates relate to real-world space.
Spatial reference ensures that spatial data in different layers or graphic overlays can be used together for accurate viewing or analysis.
AGSSpatialReference
|
readnonatomicstronginherited |
An array of tables in the map or scene. Unlike AGSGeoModel::operationalLayers
, tables are not displayed by the AGSGeoView
.
Tables can be added and removed. Tables are not loaded by default. Tables are loaded internally when asynchronous operations like query are performed. Alternatively, they can be loaded by calling AGSFeatureTable::load
.
AGSFeatureTable
, NSMutableArray
, NSMutableArray::initWithValueType:
|
readnonatomiccopyinherited |
An array of transportation network datasets defined for the map or scene.
Map and scene authors can use ArcGIS Pro to create mobile map or scene packages containing maps and scenes that include transportation networks. If so, this property will be populated with the collection of AGSTransportationNetworkDataset
objects.
An AGSTransportationNetworkDataset
from this array can be used to construct one of the network analysis tasks (such as AGSRouteTask
, AGSServiceAreaTask
, and AGSClosestFacilityTask
).
AGSRouteTask
, AGSMobileScenePackage
|
readrequirednonatomiccopyinherited |
A dictionary of values that was in the source JSON but was unparsed by API.
NSDictionary
containing the unknown JSON.
|
readnonatomiccopyinherited |
A dictionary of values that are supported by the REST API, but not exposed through the SDK API.
NSDictionary
containing the unsupported JSON.
|
readnonatomicstrong |
The utility networks in the map.
This array of AGSUtilityNetwork
is specific to this map.
An AGSMap
created with a web map portal item with utility networks will pre-populate this array.
When this AGSMap
is used to create an AGSUtilityNetwork
, the AGSUtilityNetwork
that was created will be added to this array.
Only an AGSUtilityNetwork
that is not loaded may be added to this array.
An AGSUtilityNetwork
that is already part of another AGSMap::utilityNetworks
cannot be added to this array.
|
readnonatomiccopyinherited |