ArcGIS Runtime SDK for iOS
100.15
|
A basemap for a map or a scene.
Instances of this class represent a basemap for a map or a scene.
A basemap helps orient the user and provides a geographical context for the content you want to display in the scene. 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.
ArcGIS Online provides a number of ready-to-use basemaps such as streetsBasemap (AGSBasemap(AGSDeprecated))
, topographicBasemap (AGSBasemap(AGSDeprecated))
, etc, but you can also create your own basemap by mashing up layers. A basemap is composed of a collection of baseLayers
, and referenceLayers
. Base layers are displayed at the bottom, and reference layers are displayed at the top, with other operational layers sandwiched between them. The content of a basemap is typically static and does not change frequently.
In order to take advantage of geographically load balanced services and monitor usage with API keys or named users, use initWithStyle: (AGSBasemap)
.
Instance Methods | |
(void) | - cancelLoad |
(void) | - doCancelLoading |
(void) | - doStartLoading: |
(instancetype) | - init |
(instancetype) | - initWithBaseLayer: |
(instancetype) | - initWithBaseLayers:referenceLayers: |
(instancetype) | - initWithItem: |
(instancetype) | - initWithStyle: |
(nullable instancetype) | - initWithURL: |
(void) | - loadDidFinishWithError: |
(void) | - loadWithCompletion: |
(void) | - onLoadStatusChanged |
(void) | - retryLoadWithCompletion: |
(nullable id) | - toJSON: |
Properties | |
NSString * | APIKey |
NSMutableArray< AGSLayer * > * | baseLayers |
AGSCredential * | credential |
AGSItem * | item |
NSError * | loadError |
AGSLoadStatus | loadStatus |
NSString * | name |
NSMutableArray< AGSLayer * > * | referenceLayers |
AGSRequestConfiguration * | requestConfiguration |
NSDictionary< NSString *, id > * | unknownJSON |
NSDictionary< NSString *, id > * | unsupportedJSON |
NSURL * | URL |
+ (instancetype) basemap |
Instantiates a new basemap.
+ (instancetype) basemapWithBaseLayer: | (AGSLayer *) | layer |
Instantiates a new basemap.
layer | The layer to be used as the basemap's base layer |
+ (instancetype) basemapWithBaseLayers: | (NSArray< AGSLayer * > *) | baseLayers | |
referenceLayers: | (nullable NSArray< AGSLayer * > *) | referenceLayers | |
Instantiates a new basemap.
baseLayers | The layers to be used as the basemap's base layers |
referenceLayers | The layers to be used as the basemap's reference layers |
+ (instancetype) basemapWithItem: | (AGSItem *) | item |
Instantiates a new basemap.
item | The web map item on ArcGIS Online or an on-premise portal that represents a basemap |
AGSPortalItemTypeWebMap
. + (instancetype) basemapWithStyle: | (AGSBasemapStyle) | style |
Creates a basemap with a style.
style | The basemap style. |
AGSBasemapStyle
+ (nullable instancetype) basemapWithURL: | (NSURL *) | URL |
Instantiate a basemap with a URL to a portal item which is a web basemap.
URL | of the web basemap on ArcGIS Online or an on-premises portal |
|
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
+ (instancetype) darkGrayCanvasVectorBasemap |
Instantiates a new basemap based on ArcGIS Online Dark Gray Canvas basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISDarkGray
. Provided by category AGSBasemap(AGSDeprecated).
- (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) imageryBasemap |
Instantiates a new basemap based on ArcGIS Online World Imagery basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISImageryStandard
. Provided by category AGSBasemap(AGSDeprecated).
+ (instancetype) imageryWithLabelsBasemap |
Instantiates a new basemap based on ArcGIS Online Imagery with Labels basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISImagery
. Provided by category AGSBasemap(AGSDeprecated).
+ (instancetype) imageryWithLabelsVectorBasemap |
Instantiates a new basemap based on ArcGIS Online Imagery Hybrid basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISImagery
. Provided by category AGSBasemap(AGSDeprecated).
- (instancetype) init |
- (instancetype) initWithBaseLayer: | (AGSLayer *) | layer |
Instantiates a new basemap.
layer | The layer to be used as the basemap's base layer |
- (instancetype) initWithBaseLayers: | (NSArray< AGSLayer * > *) | baseLayers | |
referenceLayers: | (nullable NSArray< AGSLayer * > *) | referenceLayers | |
Instantiates a new basemap.
baseLayers | The layers to be used as the basemap's base layers |
referenceLayers | The layers to be used as the basemap's reference layers |
- (instancetype) initWithItem: | (AGSItem *) | item |
Instantiates a new basemap.
item | The item on ArcGIS Online or an on-premise portal that represents a basemap |
- (instancetype) initWithStyle: | (AGSBasemapStyle) | style |
Creates a basemap with a style.
style | The basemap style. |
AGSBasemapStyle
- (nullable instancetype) initWithURL: | (NSURL *) | URL |
Instantiate a basemap with a URL to a portal item which is a web basemap.
URL | of the web basemap on ArcGIS Online or an on-premises portal |
+ (instancetype) lightGrayCanvasBasemap |
Instantiates a new basemap based on ArcGIS Online Light Gray Canvas basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISLightGray
. Provided by category AGSBasemap(AGSDeprecated).
+ (instancetype) lightGrayCanvasVectorBasemap |
Instantiates a new basemap based on ArcGIS Online Light Gray Canvas basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISLightGray
. Provided by category AGSBasemap(AGSDeprecated).
- (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) nationalGeographicBasemap |
Instantiates a new basemap based on ArcGIS Online National Geographic World basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use the National Geographic Style Map. https://www.arcgis.com/home/item.html?id=f33a34de3a294590ab48f246e99958c9 Provided by category AGSBasemap(AGSDeprecated).
+ (instancetype) navigationVectorBasemap |
Instantiates a new basemap based on ArcGIS Online World Navigation Map basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISNavigation
. Provided by category AGSBasemap(AGSDeprecated).
+ (instancetype) oceansBasemap |
Instantiates a new basemap based on ArcGIS Online Oceans basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISOceans
. Provided by category AGSBasemap(AGSDeprecated).
- (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).
+ (instancetype) openStreetMapBasemap |
Instantiates a new basemap based on OpenStreetMap basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleOSMStandard
. Provided by category AGSBasemap(AGSDeprecated).
|
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. |
+ (instancetype) streetsBasemap |
Instantiates a new basemap based on ArcGIS Online World Street basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISStreets
. Provided by category AGSBasemap(AGSDeprecated).
+ (instancetype) streetsNightVectorBasemap |
Instantiates a new basemap based on ArcGIS Online World Street Map (Night) basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISStreetsNight
. Provided by category AGSBasemap(AGSDeprecated).
+ (instancetype) streetsVectorBasemap |
Instantiates a new basemap based on ArcGIS Online World Street Map basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISStreets
. Provided by category AGSBasemap(AGSDeprecated).
+ (instancetype) streetsWithReliefVectorBasemap |
Instantiates a new basemap based on ArcGIS Online Streets (with Relief) basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISStreetsRelief
. Provided by category AGSBasemap(AGSDeprecated).
+ (instancetype) terrainWithLabelsBasemap |
Instantiates a new basemap based on ArcGIS Online Terrain with Labels basmap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISTerrain
. Provided by category AGSBasemap(AGSDeprecated).
+ (instancetype) terrainWithLabelsVectorBasemap |
Instantiates a new basemap based on ArcGIS Online Terrain with Labels basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISTerrain
. Provided by category AGSBasemap(AGSDeprecated).
|
requiredinherited |
Returns JSON representation for this object.
error | encountered during the operation, if any. |
NSDictionary
or NSArray
containing the JSON. Reimplemented in AGSPortalItem.
+ (instancetype) topographicBasemap |
Instantiates a new basemap based on ArcGIS Online World Topographic basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISTopographic
. Provided by category AGSBasemap(AGSDeprecated).
+ (instancetype) topographicVectorBasemap |
Instantiates a new basemap based on ArcGIS Online Topographic basemap.
AGSBasemapType
and its associated basemap helpers has been deprecated. Use initWithStyle:
with AGSBasemapStyleArcGISTopographic
. Provided by category AGSBasemap(AGSDeprecated).
|
readwriterequirednonatomiccopyinherited |
The API key to access API key enabled services and resources in ArcGIS Online.
An API key is a unique key used to authorize access to specific services and resources in ArcGIS Online. It is also used to monitor access to those services. An API key is created and managed in the ArcGIS developer dashboard and is tied to a specific ArcGIS account.
In addition to setting an API key at a global level for your application using the AGSArcGISRuntimeEnvironment::APIKey
property, you can set an AGSAPIKeyResource::APIKey
property on any ArcGIS Runtime class that implements AGSAPIKeyResource
. When you set an individual AGSAPIKeyResource::APIKey
property on an AGSAPIKeyResource
it will override the default key at the global level (on the AGSArcGISRuntimeEnvironment::APIKey
property, in other words), enabling more granular usage telemetry and management for ArcGIS Online resources used by your app. Classes that expose an API key property by implementing AGSAPIKeyResource
include:
|
readnonatomicstrong |
The base layers of this basemap. Base layers are displayed at the bottom in a mapview, and reference layers are displayed at the top, with the map's operational layers sandwiched between them. 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.
|
readwritenonatomicstronginherited |
Security credentials to access the remote resource. Only applicable if the resource is secured.
|
readnonatomicstrong |
The portal item that was used to create the basemap
|
readnonatomicstronginherited |
The error that was encountered during the most recent load operation. Will be nil if the operation succeeded.
|
readrequirednonatomicassigninherited |
Status of the load operation.
|
readwritenonatomiccopy |
The name of the basemap
|
readnonatomicstrong |
The reference layers of this basemap. Base layers are displayed at the bottom in a mapview, and reference layers are displayed at the top, with the map's operational layers sandwiched between them. 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.
|
readwritenonatomicstronginherited |
The AGSRequestConfiguration object which defines the behavior and policies to use when accessing the remote resource. The default will be nil. If it is nil the [AGSRequestConfiguration globalConfiguration] will be used.
|
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.
|
readrequirednonatomicstronginherited |
The URL of the remote resource.