|
ArcGIS Runtime SDK for iOS
100.9
|
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 |
| (instancetype) | - init |
| (instancetype) | - initWithBasemap: |
| (instancetype) | - initWithBasemapType:latitude:longitude:levelOfDetail: |
| (instancetype) | - initWithItem: |
| (instancetype) | - initWithSpatialReference: |
| (nullable instancetype) | - initWithURL: |
| (void) | - loadWithCompletion: |
| (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) | + mapWithBasemapType:latitude:longitude:levelOfDetail: |
| (instancetype) | + mapWithItem: |
| (instancetype) | + mapWithSpatialReference: |
| (nullable instancetype) | + mapWithURL: |
Properties | |
| AGSColor * | backgroundColor |
| AGSBasemap * | basemap |
| NSMutableArray< AGSBookmark * > * | bookmarks |
| AGSViewpoint * | initialViewpoint |
| AGSItem * | item |
| NSError * | loadError |
| AGSLoadSettings * | loadSettings |
| AGSLoadStatus | loadStatus |
| 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 |
| 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
|
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) initWithBasemapType: | (AGSBasemapType) | basemapType | |
| latitude: | (double) | latitude | |
| longitude: | (double) | longitude | |
| levelOfDetail: | (NSInteger) | levelOfDetail | |
Instantiates a map with a given basemap type, latitude, longitude and level of detail
| latitude | Latitude for map to start out at initially |
| longitude | Longitude for map to start out at initially |
| levelOfDetail | The level of detail for the map to start out at initially |
| - (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 |
|
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) mapWithBasemapType: | (AGSBasemapType) | basemapType | |
| latitude: | (double) | latitude | |
| longitude: | (double) | longitude | |
| levelOfDetail: | (NSInteger) | levelOfDetail | |
Instantiates a map with a given basemap type, latitude, longitude and level of detail
| latitude | Latitude for map to start out at initially |
| longitude | Longitude for map to start out at initially |
| levelOfDetail | The level of detail for the map to start out at initially |
| + (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 |
|
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
|
readnonatomicstrong |
The bookmarks associated with the map
|
readwritenonatomicstrong |
The map's initial viewpoint. This is the area initially displayed by an AGSMapView when the map is used.
|
readnonatomicstrong |
The web map item that was used to create the map (if any)
|
readnonatomicstronginherited |
The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.
|
readwritenonatomicstrong |
Settings that are applied to layers when the map is loaded. Making changes to the settings after the map is already loaded has no effect.
|
readrequirednonatomicassigninherited |
Status of the load operation.
|
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.
|
readnonatomicstrong |
The map's operational layers. These layers are displayed in a mapview sandwiched between a basemap's baseLayers at the bottom and referenceLayers at the top. The layers are drawn in a bottom-up fashion with the 0th layer in the list drawn first, next layer drawn on top of the previous one, and so on.
|
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.
|
readnonatomicstrong |
The map's spatial reference.
Spatial references define where coordinates are located on the earth's surface and how the geographic content from the basemap and operational layers is aligned when combined together.
If a spatial reference wasn't provided when the map was instantiated, it is typically derived from the bottom-most base layer in the basemap. If the map does not have a basemap or if the basemap is empty, the spatial reference is derived from the bottom-most operational layer.
If the spatial reference of layers is different from that of the map, the layers must be reprojected to the spatial reference of the map before displaying. Some layers may not be able to re-project their data, for example layers based on tiles that have been pre-generated ahead of time. To maximize performance, avoid reprojection entirely by ensuring all layers have the same spatial reference as the map.
|
readnonatomicstrong |
List of non-spatial tables associated with the map. These tables typically participate in one or more relationships with feature layers in the map's operational layers.
- queryRelatedFeaturesForFeature:parameters:completion: (AGSArcGISFeatureTable) for performing related queries.
|
readnonatomiccopy |
The transportation networks associated with the map. Only applies to maps inside a Mobile Map Package (.mmpk file) which also includes transportation networks.
|
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.
|
readnonatomiccopy |
The web map specification version that the output of #toJSON will comply with. This applies to how the map is persisted.