AGSWebMap Class Reference
Description
Instances of this class represent a webmap. A webmap is essentially a simple configuration file that describes the contents to be displayed in a map. You can use, create, and share webmaps interactively on www.ArcGIS.com or your own ArcGIS Portal.
Instantiating an object of AGSWebMap
loads the webmap by retrieving its data from a server. To view the contents of the webmap, you need to open it using openIntoMapView: (AGSWebMap)
The webmap's delegate is kept informed whenver operations performed by the webmap complete successfully or encounter an error. For exmaple, as each layer in the webmap is loaded successfully, the delegate is informed. If any layers fail to load, the delegate is given an opportunity to skip to the next layer, or re-try loading the current layer with proper credentials if the layer was using a secured service. If the webmap contains a Bing Maps layer, the delegate is asked to provide a valid Bing Maps app ID to use with that layer.
Note, you should always open a webmap into a map view on the main thread.
- See also:
- Conceptual Doc: Viewing a Web Map
- Since:
- 1.8
List of all members.
Member Function Documentation
Cancels opening the webmap.
- Since:
- 1.8
- (void) continueOpenAndSkipCurrentLayer |
|
|
|
|
Continues opening the webmap and skips the current layer that failed.
- Since:
- 1.8
- (void) continueOpenWithCredential: |
|
(AGSCredential *) |
credential |
|
|
Continues opening the webmap with a credential.
- Since:
- 1.8
- (void) decodeWithJSON: |
|
(NSDictionary *) |
json |
|
[optional, inherited] |
Decode object from JSON representation.
- Parameters:
-
| json | The JSON representation of the object to be decoded. |
- Since:
- 1.0
- (NSDictionary *) encodeToJSON |
|
|
|
[optional, inherited] |
Encode and return JSON representation for object.
- Returns:
- JSON representation of object.
- Since:
- 1.0
- (id) initWithItemId: |
|
(NSString *) |
itemId |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
Initializes a webmap. The delegate
will be informed when the webmap data is successfully retrieved from the server or if an error is encountered.
- Parameters:
-
| itemId | The item id of the webmap on ArcGIS.com |
| cred | The credential to access the webmap. |
- Since:
- 2.0
- (id) initWithItemId: |
|
(NSString *) |
itemId |
portal: |
|
(AGSPortal *) |
portal | |
|
|
| | |
Initializes a webmap based on the given portal and itemId. The item's type must be AGSPortalItemTypeWebMap
.
The delegate
will be informed when the webmap data is successfully retrieved from the server or if an error is encountered.
- Parameters:
-
| itemId | The id of the item which is a webmap |
| portal | The portal where the item resides |
- Since:
- 2.2
- (id) initWithItemId: |
|
(NSString *) |
itemId |
sharingEndPoint: |
|
(NSURL *) |
sharingEndPoint |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
Initializes a webmap. The delegate
will be informed when the webmap data is successfully retrieved from the server or if an error is encountered.
- Parameters:
-
| itemId | The item id of the webmap. |
| sharingEndPoint | The sharing endpoint of the portal where the webmap is stored. For example, http://<my_arcgis_portal>/sharing/rest . Can be nil, in which case it is assumed the webmap is stored on ArcGIS.com. |
| cred | The credential to access the webmap. |
- Since:
- 2.0
- (id) initWithJSON: |
|
(NSDictionary *) |
json |
|
[optional, inherited] |
Initialize and return object from JSON representation.
- Parameters:
-
| json | The JSON representation of the object to be created. |
- Returns:
- Object decoded from JSON representation.
- Since:
- 1.0
Reimplemented in AGSWebMapFeatureCollection.
Initializes a webmap based on the given portal item. The item's type must be AGSPortalItemTypeWebMap
.
The delegate
will be informed when the webmap's data is successfully retrieved from the server or if an error is encountered.
- Parameters:
-
| item | The item which is a webmap |
- Since:
- 2.2
- (id) initWithURL: |
|
(NSURL *) |
url |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
Initializes a webmap. The delegate
will be informed when the webmap data is successfully retrieved from the server or if an error is encountered.
- Parameters:
-
| url | where the webmap's data can be accessed. For example, http://<my_arcgis_portal>/sharing/content/items/<web_map_id>/data |
| cred | The credential to access the webmap. |
- Since:
- 2.0
Starts opening a webmap into an AGSMapView. This method must be called on the main thread. The mapview will be reset before opening the webmap.
- Parameters:
-
| mapView | The mapView to open the webmap into. |
- Since:
- 1.8
Starts opening a webmap into an AGSMapView.
- Parameters:
-
| mapView | The mapView to open the webmap into. |
| baseMap | The alternate base map to use for opening the webmap. Can pass nil for this parameter, in which case it will use the default basemap. |
- Since:
- 2.2
Starts opening a webmap into an AGSMapView. The other openIntoMapView methods all reset the AGSMapView before-hand. This method gives you the option of overriding that behavior. This is useful if you have your own basemap layers and you want to open the AGSWebMap over those layers. If you want to add only the operational layers (skipping the basemap layers), you can pass in an empty AGSWebMapBaseMap for the baseMap parameter. To get an empty AGSWebMapBaseMap you simply alloc and init it.
- Parameters:
-
| mapView | The mapView to open the webmap into. |
| baseMap | The alternate base map to use for opening the webmap. Can pass nil for this parameter, in which case it will use the default basemap. |
| reset | Whether or not you want this method to reset the AGSMapView before it starts opening the AGSWebMap. |
- Since:
- 2.2
Returns the AGSPopupInfo that is associated with the AGSDynamicMapSerciceLayer. This method does not create a new AGSPopupInfo. It returns a reference to an existing AGSPopupInfo.
- Since:
- 2.0
- (AGSPopupInfo*) popupInfoForMapServiceLayerWithURL: |
|
(NSURL *) |
url |
sublayerId: |
|
(NSInteger) |
sublayerId | |
|
|
| | |
Returns the AGSPopupInfo that is associated with the layer of a particular url. This method does not create a new AGSPopupInfo. It returns a reference to an existing AGSPopupInfo.
- Since:
- 2.0
Returns an autoreleased webmap. The delegate
will be informed when the webmap data is successfully retrieved from the server or if an error is encountered.
- Parameters:
-
| itemId | The item id of the webmap on ArcGIS.com |
| cred | The credential to access the webmap. |
- Since:
- 2.0
Returns an autoreleased webmap based on the given portal and itemId. The item's type must be AGSPortalItemTypeWebMap
.
The delegate
will be informed when the webmap data is successfully retrieved from the server or if an error is encountered.
- Parameters:
-
| itemId | The id of the item which is a webmap |
| portal | The portal where the item resides |
- Since:
- 2.2
+ (AGSWebMap*) webMapWithItemId: |
|
(NSString *) |
itemId |
sharingEndPoint: |
|
(NSURL *) |
sharingEndPoint |
credential: |
|
(AGSCredential *) |
cred | |
|
|
| | |
Returns an autoreleased webmap. The delegate
will be informed when the webmap data is successfully retrieved from the server or if an error is encountered.
- Parameters:
-
| itemId | The item id of the webmap. |
| sharingEndPoint | The sharing endpoint of the portal where the webmap is stored. For example, http://<my_arcgis_portal>/sharing/rest . Can be nil, in which case it is assumed the webmap is stored on ArcGIS.com. |
| cred | The credential to access the webmap. |
- Since:
- 2.0
Returns an autoreleased webmap based on the given portal item. The item's type must be AGSPortalItemTypeWebMap
.
The delegate
will be informed when the webmap data is successfully retrieved from the server or if an error is encountered.
- Parameters:
-
| item | The item which is a webmap |
- Since:
- 2.2
Returns an autoreleased webmap. The delegate
will be informed when the webmap data is successfully retrieved from the server or if an error is encountered.
- Parameters:
-
| url | where the webmap's data can be accessed. For example, http://<my_arcgis_portal>/sharing/content/items/<web_map_id>/data |
| cred | The credential to access the webmap. |
- Since:
- 2.0
Property Documentation
The basemap layer(s) in this webmap.
- Since:
- 2.2
- (NSArray*) bookmarks [read, retain] |
The bookmarks that this AGSWebMap contains.
- Since:
- 2.0
The delegate for the webmap.
- Since:
- 1.8
- (BOOL) loaded [read, assign] |
Whether or not the webmap is loaded.
- Since:
- 2.0
- (NSArray*) operationalLayers [read, retain] |
An array of AGSWebMapLayerInfo
objects representing the operational layers in this webmap.
- Since:
- 2.2
An instance of AGSPortalItem
class representing this webmap.
- Since:
- 2.2
- (NSArray*) queries [read, retain] |
An array of AGSWebMapQuery
objects representing the predefined queries that were authored with this webmap.
- Since:
- 2.2
- (NSURL*) URL [read, copy] |
The URL where the webmap's data can be accessed from. For example, http://<my_arcgis_portal>/sharing/content/items/<web_map_id>/data
- Since:
- 1.8
- (float) version [read, assign] |
This webmap's version information.
- Since:
- 2.2
- (BOOL) zoomToDefaultExtentOnOpen [read, write, assign] |
Determines whether the webmap zooms to the default webmap extent when it is opened into a mapview.
- Since:
- 1.8