|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.map.Layer
public abstract class Layer
This class contains methods that the JMap/Map will need to call on individual Layer classes to change extent, draw, etc.
Nested Class Summary | |
---|---|
static class |
Layer.LayerStatus
|
Field Summary | |
---|---|
protected UserCredentials |
_credentials
Gets the direct access of the credentials; You can access the credentials by the getCredentials() or
setCredentials(UserCredentials) ; but those two methods copy the instance internally. |
protected int |
_progress
Default this to 100 so that layers that don't stream, such as feature layers will always contribute 100% to the total streaming progress for the map. |
protected ArrayList<Double> |
_resolutionList
The _resolution list. |
protected Object |
serviceInfo
|
Constructor Summary | |
---|---|
|
Layer()
Instantiates an object of Layer. |
protected |
Layer(boolean initLayer)
|
protected |
Layer(long handle)
Instantiates an object of Layer. |
Method Summary | ||
---|---|---|
void |
addLayerInitializeCompleteListener(LayerInitializeCompleteListener listener)
Add a listener for the LayerCreateComplete event. |
|
protected abstract void |
createNativeLayer()
|
|
protected void |
finalize()
|
|
protected void |
fireLayerCreateCompleteEvent()
Fire layer create complete event. |
|
protected void |
fireLayerCreateErrorEvent(Exception e)
|
|
protected void |
fireLayerCreateErrorEvent(String error)
Fire layer create error event. |
|
String |
getCopyrightText()
Gets the copyright text. |
|
protected UserCredentials |
getCredentialsInternal()
This method should be used internally whenever credentials are required. |
|
SpatialReference |
getDefaultSpatialReference()
Gets the defaultSpatialReference of the Layer. |
|
String |
getDescription()
Gets the description. |
|
Exception |
getException()
|
|
Envelope |
getExtent()
Gets the current extent. |
|
Envelope |
getFullExtent()
Returns the full extent of the layer. |
|
protected Envelope |
getInitialExtent()
Returns the initial extent of the layer. |
|
String |
getInitializationError()
|
|
protected long |
getLayerHandle()
|
|
abstract LayerLegendInfoCollection |
getLegend()
|
|
JMap |
getMap()
Gets the parent component. |
|
protected MapServer |
getMapServer()
|
|
protected void |
getMapServerInfo(String url,
UserCredentials credentials)
Gets the map server info. |
|
protected void |
getMapServerLegendInfo(String url,
List<DynamicLayerInfo> dynamicLayerInfos)
|
|
double |
getMaxScale()
Gets the maximum scale at which this layer will be displayed. |
|
double |
getMinScale()
Gets the minimum scale at which this layer will be displayed. |
|
String |
getName()
|
|
float |
getOpacity()
Gets the opacity of the Layer. |
|
ArcGISPopupInfo |
getPopupInfo(int sublayerId)
|
|
double |
getResolution()
Gets the resolution of the Layer. |
|
List<Double> |
getResolutionList()
Get a list of resolutions for each defined zoom level for the layer. |
|
String |
getServiceDescription()
Gets the service description. |
|
SpatialReference |
getSpatialReference()
Gets the current spatial reference of the Layer. |
|
Layer.LayerStatus |
getStatus()
Gets the status of this layer. |
|
String |
getUrl()
Gets the URL of the map service associated with the layer. |
|
int |
getUrlHashCode()
A convenience method that returns the hash code of the map service URL. |
|
protected abstract void |
init(boolean isVisible,
int[] visibleLayers,
String title,
float opacity)
This method is called only when composing a Map from a Web Map. |
|
void |
initializeAsync()
Asynchronously initializes the layer, allowing the application to remain responsive while the layer initializes. |
|
protected abstract void |
initializeNativeLayer()
|
|
protected LayerLegendInfoCollection |
internalGetLayerLegendInfos(String url,
List<DynamicLayerInfo> dynamicLayerInfos)
|
|
protected abstract void |
internalInit()
|
|
protected boolean |
isHidingNoDataTiles()
|
|
protected boolean |
isInitialized()
|
|
protected boolean |
isReady()
Returns true if this layer is initialized. |
|
boolean |
isShowingCopyright()
Returns whether this layer's copyright should be shown. |
|
boolean |
isVisible()
Gets the visibility of the Layer. |
|
protected
|
loadServiceInfo(Callable<T> task)
If the Layer is loaded as a WebMapLayer and the OnWebMapLoadListener is specified, the service information will be loaded interactively. |
|
protected long |
lock()
|
|
void |
recycle()
Releases resources referenced by the Layer so that they can be recycled. |
|
void |
reinitializeAsync(UserCredentials userCredentials)
Asynchronously re-initializes a failed layer that has failed due to missing credentials. |
|
void |
removeLayerInitializeCompleteListener(LayerInitializeCompleteListener listener)
Remove a listener for the LayerCreateComplete event. |
|
void |
setCopyrightText(String copyrightText)
Sets the copyright text. |
|
protected void |
setCredentials(UserCredentials credentials)
Sets the credentials of the Layer. |
|
protected void |
setDefaultSpatialReference(SpatialReference defaultSpatialReference)
Sets the defaultSpatialReference of the Layer. |
|
void |
setDescription(String description)
Sets the description. |
|
protected void |
setError(String errorMessage)
Sets the error. |
|
protected void |
setException(Exception e)
|
|
protected void |
setFullExtent(Envelope extent)
|
|
protected void |
setInitialExtent(Envelope e)
Sets the initial extent of layer. |
|
protected void |
setLayerHandle(long layerHandle)
|
|
protected void |
setMap(JMap parent)
Every layer is provided a reference to the parent JComponent that contains that layer. |
|
protected void |
setMapServer(MapServer _mapServer)
|
|
void |
setName(String name)
Sets the name. |
|
void |
setOpacity(float opacity)
Sets the opacity of the Layer. |
|
void |
setPopupInfos(Map<Integer,ArcGISPopupInfo> popupInfos)
|
|
void |
setServiceDescription(String serviceDescription)
Sets the description. |
|
void |
setShowingCopyright(boolean show)
Sets whether to show this layer's copyright. |
|
protected void |
setStatus(Layer.LayerStatus status)
Sets the status. |
|
protected void |
setUrl(String url)
Sets the URL of the map service associated with the layer. |
|
void |
setVisible(boolean visible)
Sets the visibility of the Layer. |
|
protected void |
unlock(long handle)
|
|
protected void |
updateSpatialReferenceStatus(int SRStatus)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected int _progress
protected ArrayList<Double> _resolutionList
protected UserCredentials _credentials
getCredentials()
or
setCredentials(UserCredentials)
; but those two methods copy the instance internally.
protected Object serviceInfo
Constructor Detail |
---|
protected Layer(boolean initLayer)
public Layer()
protected Layer(long handle)
Method Detail |
---|
protected long getLayerHandle()
public ArcGISPopupInfo getPopupInfo(int sublayerId)
public void setPopupInfos(Map<Integer,ArcGISPopupInfo> popupInfos)
protected void setLayerHandle(long layerHandle)
public Layer.LayerStatus getStatus()
protected void setStatus(Layer.LayerStatus status)
status
- the new statusprotected boolean isReady()
protected boolean isInitialized()
public boolean isShowingCopyright()
JMap
copyright is not showing.
JMap.isShowingCopyright()
,
JMap.setShowingCopyright(boolean)
public void setShowingCopyright(boolean show)
JMap
copyright is not showing.
show
- true to show copyright, false otherwise.JMap.isShowingCopyright()
,
JMap.setShowingCopyright(boolean)
public String getCopyrightText()
public void setCopyrightText(String copyrightText)
MapOverlay
.
copyrightText
- the new copyright textpublic String getDescription()
public void setDescription(String description)
description
- the new descriptionpublic String getName()
public void setName(String name)
name
- the new nameprotected void setUrl(String url)
url
- the URL pointing to your map service.public String getUrl()
public int getUrlHashCode()
public String getServiceDescription()
public void setServiceDescription(String serviceDescription)
serviceDescription
- the new descriptionpublic String getInitializationError()
protected void getMapServerInfo(String url, UserCredentials credentials) throws Exception
url
- the URL
Exception
PeProjectionException
protected void getMapServerLegendInfo(String url, List<DynamicLayerInfo> dynamicLayerInfos)
protected void setError(String errorMessage)
errorMessage
- the new errorprotected void setException(Exception e)
public void addLayerInitializeCompleteListener(LayerInitializeCompleteListener listener)
listener
- Class implementing LayerCreateCompleteListenerpublic void removeLayerInitializeCompleteListener(LayerInitializeCompleteListener listener)
listener
- Class implementing LayerCreateCompleteListenerpublic void initializeAsync()
protected abstract void internalInit()
public void reinitializeAsync(UserCredentials userCredentials)
userCredentials
- the user credentialspublic Exception getException()
public JMap getMap()
protected void setMap(JMap parent)
parent
- the new parent componentpublic double getResolution()
protected boolean isHidingNoDataTiles()
protected abstract void init(boolean isVisible, int[] visibleLayers, String title, float opacity)
isVisible
- visibleLayers
- title
- opacity
- protected void fireLayerCreateCompleteEvent()
protected void fireLayerCreateErrorEvent(String error)
error
- the errorprotected void fireLayerCreateErrorEvent(Exception e)
public List<Double> getResolutionList()
public SpatialReference getDefaultSpatialReference()
protected void setDefaultSpatialReference(SpatialReference defaultSpatialReference)
defaultSpatialReference
- The defaultSpatialReference to set.public SpatialReference getSpatialReference()
public double getMinScale()
public double getMaxScale()
protected void updateSpatialReferenceStatus(int SRStatus)
protected abstract void createNativeLayer()
protected abstract void initializeNativeLayer()
protected void finalize() throws Throwable
finalize
in class Object
Throwable
public void recycle()
public boolean isVisible()
public void setVisible(boolean visible)
visible
- The visibility to set.public float getOpacity()
public void setOpacity(float opacity)
opacity
- the opacity to set.protected void setInitialExtent(Envelope e)
e
- --an Envelope object.protected Envelope getInitialExtent()
protected void setFullExtent(Envelope extent)
public Envelope getExtent()
public Envelope getFullExtent()
protected long lock()
protected void unlock(long handle)
protected MapServer getMapServer()
protected void setMapServer(MapServer _mapServer)
public abstract LayerLegendInfoCollection getLegend()
protected LayerLegendInfoCollection internalGetLayerLegendInfos(String url, List<DynamicLayerInfo> dynamicLayerInfos)
protected UserCredentials getCredentialsInternal()
protected void setCredentials(UserCredentials credentials)
credentials
- The credentials to set.protected <T> T loadServiceInfo(Callable<T> task) throws Exception
task
- the Task to load the service information.
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |