com.esri.core.portal
Class WebMapLayer

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

public class WebMapLayer
extends Object

This class represents an operational layer within a WebMap.

Since:
1.0

Nested Class Summary
static class WebMapLayer.Mode
          The operational mode of an ArcGIS Feature layer.
static class WebMapLayer.Type
          The type of layer in a WebMap.
 
Field Summary
 boolean _isBaseLayer
           
 
Constructor Summary
protected WebMapLayer()
          Constructs an empty WebMapLayer.
protected WebMapLayer(String title, String url)
          Constructs a WebMapLayer with the specified title and the URL.
 
Method Summary
 String fetchOwningSystemURL()
          Gets the OwingSystemURL of the layer.
protected static WebMapLayer fromJson(org.codehaus.jackson.JsonParser parser)
          Constructs and sets the internal state of this WebMapLayer from a response received from the server.
 int[] getBandIds()
          The list of band ids.
 String getCapabilitiesOverride()
          Gets the capabilities override.
 String getColumnDelimiter()
          Gets the column delimiter.
 String getCopyright()
          Gets the copyright.
 int[] getDisplayLevels()
          The list of display levels.
 Envelope getExtent()
          Gets the extent.
 FeatureCollection getFeatureCollection()
          Gets the feature collection.
 String getFormat()
          Gets the format.
 String getID()
          Gets the id.
 int[] getInvisibleLegendLayers()
          Returns a list of ID number whose legend is not shown.
 String getItemId()
          Returns the Item id of the data represented by this operational layer in the WebMap.
 String getLatitudeFieldName()
          Gets the latitude field name.
 String getLayerDefinitionOverride()
          Gets the layer definition override.
 ArrayList<String> getLayerDefinitions()
          Returns the layer definitions of a feature collection.
 List<WebMapSubLayer> getLayers()
          Returns a list of WebMapSubLayer objects which represents the sub-layers of this layer.
 String getLocationType()
          Gets the location type.
 String getLongitudeFieldName()
          Gets the longitude field name.
 String getMapUrl()
          Map URL string for WMS service.
 double getMaxScale()
          Returns the maximum scale.
 double getMinScale()
          Returns the minimum scale.
 WebMapLayer.Mode getMode()
          Returns the mode that an ArcGIS Feature Layer is configured to work in.
 float getOpacity()
          Returns the opacity for this layer specified in the WebMap.
 List<SpatialReference> getSpatialRefs()
          Gets the spatial refs.
 String getTitle()
          Returns the title of this operational layer.
 WebMapLayer.Type getType()
          Returns the type of this Web Map layer.
 String getUrl()
          Returns the URL of a GIS Service layer.
 int[] getVisibleFolders()
          Gets the visible folder's ids.
 int[] getVisibleLayers()
          The list of visible layers.
 WebMapPopupInfo getWebMapPopupInfo()
          Gets the PopupInfo object.
 String getWmsVersion()
          Gets the wms version.
 List<String> getWmsVisibleLayers()
          The list of visible WMS layers.
 boolean hasSubLayerIds()
          Deprecated.  
 boolean isFeatureCollection()
          Deprecated.  
 boolean isReference()
          Tells if this layer is a reference layer.
 boolean isShowLegend()
          Indicates whether the webmap should show the features from this service in the legend.
 boolean isVisible()
          Returns the default visibility of this layer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_isBaseLayer

public boolean _isBaseLayer
Constructor Detail

WebMapLayer

protected WebMapLayer()
Constructs an empty WebMapLayer. Users will never explicitly create an instance of a WebMapLayer.


WebMapLayer

protected WebMapLayer(String title,
                      String url)
Constructs a WebMapLayer with the specified title and the URL. This constructor is invoked when a Web Map does not contain any layers and the base layer is specified in the Item info

Parameters:
title -
url -
Method Detail

getUrl

public String getUrl()
Returns the URL of a GIS Service layer. It is the responsibility of the application to infer the type of service (Dynamic Map Service layer, Tiled Map Service layer, etc) the URL represents. If the Service is either BingMaps or OpenStreetMap then the Url string is the name of the layer.

Returns:
the Url string of a GIS Service layer
Since:
1.0

getID

public String getID()
Gets the id.

Returns:
the id
Since:
10.1.1

isVisible

public boolean isVisible()
Returns the default visibility of this layer

Returns:
true if this layer is visible, false otherwise
Since:
1.0

getLayerDefinitionOverride

public String getLayerDefinitionOverride()
Gets the layer definition override.

Returns:
the _layerDefinitionOverride
Since:
1.0

getCapabilitiesOverride

public String getCapabilitiesOverride()
Gets the capabilities override.

Returns:
the capabilities override
Since:
1.0

getOpacity

public float getOpacity()
Returns the opacity for this layer specified in the WebMap.

Returns:
the opacity. 0 meaning fully transparent, 1 meaning opaque.
Since:
1.0

getLocationType

public String getLocationType()
Gets the location type.

Returns:
the location type
Since:
1.0

getLongitudeFieldName

public String getLongitudeFieldName()
Gets the longitude field name.

Returns:
the longitude field name
Since:
1.0

getWebMapPopupInfo

public WebMapPopupInfo getWebMapPopupInfo()
Gets the PopupInfo object. Only applicable to feature layer.

Returns:
PopupInfo object.
Since:
10.1.1

getLatitudeFieldName

public String getLatitudeFieldName()
Gets the latitude field name.

Returns:
the latitude field name
Since:
1.0

getColumnDelimiter

public String getColumnDelimiter()
Gets the column delimiter.

Returns:
the column delimiter
Since:
1.0

getSpatialRefs

public List<SpatialReference> getSpatialRefs()
Gets the spatial refs.

Returns:
the spatial refs
Since:
10.1.1

getExtent

public Envelope getExtent()
Gets the extent.

Returns:
the extent
Since:
10.1.1

getCopyright

public String getCopyright()
Gets the copyright.

Returns:
the copyright text
Since:
10.1.1

getFormat

public String getFormat()
Gets the format.

Returns:
the image format
Since:
10.1.1

getWmsVersion

public String getWmsVersion()
Gets the wms version.

Returns:
the wms version
Since:
10.1.1

getMapUrl

public String getMapUrl()
Map URL string for WMS service.

Returns:
Map URL string.
Since:
10.1.1

getWmsVisibleLayers

public List<String> getWmsVisibleLayers()
The list of visible WMS layers. The getLayers() method returns all layers regardless of visibility. Use this method to get a list of the layers that are initially visible. If this returns null then all of the layers will be visible.

Returns:
an array of visible WMS layers
Since:
10.1.1

getTitle

public String getTitle()
Returns the title of this operational layer.

Returns:
the title
Since:
1.0

getLayers

public List<WebMapSubLayer> getLayers()
Returns a list of WebMapSubLayer objects which represents the sub-layers of this layer. For example, if the layer is the tiled map service layer, a sub-layer may have a layer ID, an optional Popup information. If the layer is a feature collection, a sub-layer may have a layer ID, layer definition and feature set.

Returns:
A list of sub-layers.
Since:
10.1.1

getItemId

public String getItemId()
Returns the Item id of the data represented by this operational layer in the WebMap.

Returns:
the Item id
Since:
1.0

isReference

public boolean isReference()
Tells if this layer is a reference layer. This property is applicable only to base map layers within a WebMap

Returns:
true if this layer is a reference layer, else false
Since:
1.0

getVisibleLayers

public int[] getVisibleLayers()
The list of visible layers. This property is applicable only when the URL obtained through getUrl() represents a Dynamic Map Service Layer.

Returns:
an array of visible layers
Since:
1.0

getInvisibleLegendLayers

public int[] getInvisibleLegendLayers()
Returns a list of ID number whose legend is not shown.

Returns:
an array of layer id.
Since:
1.0

getDisplayLevels

public int[] getDisplayLevels()
The list of display levels. This property is applicable only when the URL obtained through getUrl() represents a Tiled Map Service Layer.

Returns:
an array of display levels
Since:
1.0

getBandIds

public int[] getBandIds()
The list of band ids. This property is applicable only when the URL obtained through getUrl() represents an Image Service Layer.

Returns:
an array of band ids
Since:
1.0

getMode

public WebMapLayer.Mode getMode()
Returns the mode that an ArcGIS Feature Layer is configured to work in.

Returns:
the WebMapLayer.Mode
Since:
1.0

getType

public WebMapLayer.Type getType()
Returns the type of this Web Map layer.

Returns:
the WebMapLayer.Type
Since:
1.0

isFeatureCollection

public boolean isFeatureCollection()
Deprecated. 

Tells if this layer is a feature collection.

Returns:
true if this layer is a feature collection, else false
Since:
1.0

getFeatureCollection

public FeatureCollection getFeatureCollection()
Gets the feature collection.

Returns:
the feature collection
Since:
10.1.1

getMinScale

public double getMinScale()
Returns the minimum scale.

Returns:
the minimum scale.
Since:
10.1.1

getMaxScale

public double getMaxScale()
Returns the maximum scale.

Returns:
the maximum scale.
Since:
10.1.1

getLayerDefinitions

public ArrayList<String> getLayerDefinitions()
Returns the layer definitions of a feature collection.

Returns:
An ArrayList of layer definitions for a feature collection.
Since:
1.0

hasSubLayerIds

public boolean hasSubLayerIds()
Deprecated. 

Returns true if the layer specified the sub-layer ids.

Returns:
true if the layer specified the sub-layer ids.
Since:
1.0

isShowLegend

public boolean isShowLegend()
Indicates whether the webmap should show the features from this service in the legend.

Returns:
boolean.
Since:
10.1.1

getVisibleFolders

public int[] getVisibleFolders()
Gets the visible folder's ids. Only applicable to the KML Layer type.

Returns:
visible folder's ids.
Since:
10.1.1

fetchOwningSystemURL

public String fetchOwningSystemURL()
                            throws Exception
Gets the OwingSystemURL of the layer.

Returns:
the OwingSystemURL as a string.
Throws:
Exception - if the action can not be completed.
Since:
10.1.1

fromJson

protected static WebMapLayer fromJson(org.codehaus.jackson.JsonParser parser)
                               throws PortalException
Constructs and sets the internal state of this WebMapLayer from a response received from the server.

Parameters:
parser -
Returns:
an initialized WebMap
Throws:
PortalException - if the action can not be completed.
Since:
1.0


Copyright © 2012. All Rights Reserved.