com.esri.core.portal
Class WebMap

java.lang.Object
  extended by com.esri.core.portal.WebMap

public class WebMap
extends Object

This class represents a WebMap and provides access to the base layers and operational layers within a WebMap.

Since:
1.0

Constructor Summary
protected WebMap(org.codehaus.jackson.JsonParser parser, PortalItem item)
          Constructs an empty WebMap.
protected WebMap(PortalItem item)
          Constructs an empty WebMap.
 
Method Summary
 String getApplicationPropertiesJson()
          Returns the Json string representing the application properties defined in the web map.
 BaseMap getBaseMap()
          Returns the BaseMap of this WebMap.
 List<Bookmark> getBookmarks()
          Returns a list of bookmarks defined for this WebMap.
 UserCredentials getCredentials()
          Returns the user credentials using on this webmap object.
 PortalItem getInfo()
          Returns the PortalItem that describes this WebMap.
 Envelope getInitExtent()
          Gets the initial extent of the web map.
 List<WebMapLayer> getOperationalLayers()
          Returns the operational layers of this WebMap.
 List<WebMapQuery> getPredefinedQueries()
          Returns a list of predefined query that were authored with this WebMap.
 String getVersion()
          Returns the version of this WebMap.
static WebMap newInstance(BaseMap basemap, Envelope extent, SpatialReference sr)
          Creates a WebMap using a BaseMap and Extent.
static WebMap newInstance(org.codehaus.jackson.JsonParser parser, Envelope extent, SpatialReference sr)
          Creates a WebMap using JSON data and Extent.
static WebMap newInstance(PortalItem portalitem)
          Creates a WebMap using an PortalItem.
static WebMap newInstance(String itemId, Portal portal)
          Creates a WebMap using an Item's id obtained from a Portal.
static void newInstance(String itemId, Portal portal, CallbackListener<WebMap> callbackListener)
          Creates a WebMap using an Item's id obtained from a Portal.
static void newInstance(URL itemIdURL, String username, String password, CallbackListener<WebMap> callbackListener)
          Creates a WebMap from a URL to an item id that represents this Web Map stored in a Portal.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WebMap

protected WebMap(org.codehaus.jackson.JsonParser parser,
                 PortalItem item)
          throws Exception
Constructs an empty WebMap. Users will never programmatically create a new instance of a WebMap.

Throws:
Exception

WebMap

protected WebMap(PortalItem item)
          throws Exception
Constructs an empty WebMap. Users will never programmatically create a new instance of a WebMap.

Throws:
Exception
Method Detail

getInfo

public PortalItem getInfo()
Returns the PortalItem that describes this WebMap.

Returns:
the PortalItem that describes this WebMap
Since:
1.0

getBaseMap

public BaseMap getBaseMap()
Returns the BaseMap of this WebMap.

Returns:
the BaseMap
Since:
1.0

getOperationalLayers

public List<WebMapLayer> getOperationalLayers()
Returns the operational layers of this WebMap.

Returns:
a list of WebMapLayer
Since:
1.0

getBookmarks

public List<Bookmark> getBookmarks()
Returns a list of bookmarks defined for this WebMap.

Returns:
a list of Bookmark
Since:
10.1.1

getPredefinedQueries

public List<WebMapQuery> getPredefinedQueries()
Returns a list of predefined query that were authored with this WebMap.

Returns:
a list of Tasks
Since:
10.1.1

getVersion

public String getVersion()
Returns the version of this WebMap.

Returns:
the version
Since:
1.0

getApplicationPropertiesJson

public String getApplicationPropertiesJson()
Returns the Json string representing the application properties defined in the web map.

Returns:
a json string.
Since:
10.1.1

newInstance

public static void newInstance(URL itemIdURL,
                               String username,
                               String password,
                               CallbackListener<WebMap> callbackListener)
Creates a WebMap from a URL to an item id that represents this Web Map stored in a Portal. A user name and password will be required if the requested WebMap is accessible only to authorized users. If a token is supplied with the URL, then the uname and pwd are ignored.

Parameters:
itemIdURL - A URL to an item stored in a portal
username - the username of a Portal user
password - the password of a Portal user
callbackListener - the listener returns with a initialized webmap
Since:
1.0

newInstance

public static void newInstance(String itemId,
                               Portal portal,
                               CallbackListener<WebMap> callbackListener)
Creates a WebMap using an Item's id obtained from a Portal. This constructor is useful for applications that prefer persisting the Item Id of an Item previously obtained from a Portal and then using the Id to retrieve the associated Item data.

Parameters:
itemId - the item ID - item id of the item
portal - the Portal - portal the user is a member of
callbackListener - - callback returns with an initialized webmap
Since:
1.0

newInstance

public static WebMap newInstance(String itemId,
                                 Portal portal)
                          throws Exception
Creates a WebMap using an Item's id obtained from a Portal. This constructor is useful for applications that prefer persisting the Item Id of an Item previously obtained from a Portal and then using the Id to retrieve the associated Item data.

Parameters:
itemId - the item ID - item id of the item
portal - the Portal - portal the user is a member of
Returns:
the web map
Throws:
Exception - the exception
Since:
1.0

newInstance

public static WebMap newInstance(PortalItem portalitem)
                          throws Exception
Creates a WebMap using an PortalItem.

Parameters:
portalitem - the given PortalItem.
Returns:
the web map
Throws:
Exception - the exception
Since:
1.0

newInstance

public static WebMap newInstance(org.codehaus.jackson.JsonParser parser,
                                 Envelope extent,
                                 SpatialReference sr)
                          throws Exception
Creates a WebMap using JSON data and Extent. Be cautious when using this method to create a WebMap, as there isn't a PortalItem backing it.

Parameters:
parser - the parser
extent - the extent
sr - the sr
Returns:
the web map
Throws:
Exception - the exception
Since:
1.0

newInstance

public static WebMap newInstance(BaseMap basemap,
                                 Envelope extent,
                                 SpatialReference sr)
Creates a WebMap using a BaseMap and Extent. Be cautious when using this method to create a WebMap, as there isn't a PortalItem backing it.

Parameters:
basemap - the base map of the webmap
extent - the full extent of the web map.
sr - the spatial reference of the map extent.
Returns:
the web map
Since:
1.0

getCredentials

public UserCredentials getCredentials()
Returns the user credentials using on this webmap object.

Returns:
The user credentials
Since:
1.0

getInitExtent

public Envelope getInitExtent()
Gets the initial extent of the web map.

Returns:
the extent in EPSG:4326
Since:
1.0


Copyright © 2012. All Rights Reserved.