|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.esri.android.map.Layer
public abstract class Layer
The base layer for all layers that can be added into MapView
.
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 long |
nativeHandle
|
protected Map<Integer,PopupInfo> |
popUpInfos
|
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 | ||
---|---|---|
protected void |
changeStatus(OnStatusChangedListener.STATUS status)
Changes the STATUS of the layer and notifies the listener. |
|
protected abstract long |
create()
|
|
protected void |
finalize()
|
|
UserCredentials |
getCredentials()
Gets a copy of the credentials attached to the Layer. |
|
SpatialReference |
getDefaultSpatialReference()
Gets the defaultSpatialReference of the Layer. |
|
protected float |
getDpi()
|
|
Polygon |
getExtent()
Gets the current extent. |
|
Envelope |
getFullExtent()
Returns the full extent of the layer. |
|
int |
getHeight()
Gets the height of the Layer in screen units. |
|
long |
getID()
Return the Layer runtime ID which is a long integer. |
|
protected Envelope |
getInitialExtent()
Returns the initial extent of the layer. |
|
String |
getName()
Gets the name of the layer. |
|
float |
getOpacity()
Gets the opacity of the Layer. |
|
Layer |
getParent()
Returns parent layer if the layer is in a group layer otherwise returning null. |
|
protected ExecutorService |
getPoolExecutor()
Returns the ThreadPoolExecutor based on the context. |
|
PopupInfo |
getPopupInfo(int sublayerId)
Gets the PopupInfo associated with the sub-layer id. |
|
String |
getQueryUrl(int subLayerId)
|
|
double |
getResolution()
Gets the resolution of the Layer. |
|
protected ExecutorService |
getServiceExecutor()
Returns the ThreadPoolExecutor based on the context. |
|
SpatialReference |
getSpatialReference()
Gets the current spatial reference of the Layer. |
|
String |
getTitle()
Gets the title of the 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. |
|
int |
getWidth()
Gets the width of the Layer in screen units. |
|
protected abstract void |
initLayer()
Initializes the layer. |
|
boolean |
isInitialized()
Gets the initialized of the Layer. |
|
boolean |
isRecycled()
Returns true or false if the Layer object has been recycled. |
|
boolean |
isShowLegend()
Returns true if legend of the layer will be shown up; by default it is true; The property is usually defined in the web map, a operation layer legend could be on or off. |
|
boolean |
isVisible()
Gets the visibility of the Layer. |
|
boolean |
isWebMapBaselayer()
Returns true if the layer is used as base layer in a web map. |
|
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 |
reinitializeLayer(UserCredentials usercredentials)
Re-initializes the layer with the given credentials. |
|
protected void |
setCredentials(UserCredentials credentials)
Sets the credentials of the Layer. |
|
protected void |
setDefaultSpatialReference(SpatialReference defaultSpatialReference)
Sets the defaultSpatialReference of the Layer. |
|
protected void |
setFullExtent(Envelope extent)
|
|
protected void |
setInitialExtent(Envelope e)
Sets the initial extent of layer. |
|
void |
setName(String name)
Sets the layer name. |
|
void |
setOnStatusChangedListener(OnStatusChangedListener onStatusChangedListener)
Sets the onStatusChangedListener. |
|
void |
setOpacity(float opacity)
Sets the opacity of the Layer. |
|
void |
setPopupInfos(Map<Integer,PopupInfo> popUpInfos)
Sets the popup infos. |
|
void |
setQueryUrls(Map<Integer,String> queryUrls)
|
|
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)
The callback method is invoked when the layer is added to map. |
|
protected boolean |
verifyCredentials()
Returns true if the credentials is valid. |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected volatile long nativeHandle
protected Map<Integer,PopupInfo> popUpInfos
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 <T> T loadServiceInfo(Callable<T> task) throws Exception
task
- the Task to load the service information.
Exception
protected abstract long create()
protected abstract void initLayer()
OnStatusChangedListener.STATUS
event accordingly.
public void reinitializeLayer(UserCredentials usercredentials)
usercredentials
- the new credentials to try.protected void finalize() throws Throwable
finalize
in class Object
Throwable
public void recycle()
public boolean isRecycled()
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.public void setOnStatusChangedListener(OnStatusChangedListener onStatusChangedListener)
OnStatusChangedListener.STATUS.INITIALIZED
or OnStatusChangedListener.STATUS.INITIALIZATION_FAILED
. When the initialization is failed,
you can use the OnStatusChangedListener.STATUS.getError()
to get the error details.
onStatusChangedListener
- The onStatusChangedListener to set.protected void changeStatus(OnStatusChangedListener.STATUS status)
status
- the new STATUS.public boolean isInitialized()
public String getName()
public void setName(String name)
name
- a Stringprotected void setUrl(String url)
url
- the URL pointing to your map service.public String getUrl()
public void setQueryUrls(Map<Integer,String> queryUrls)
queryUrls
- public String getQueryUrl(int subLayerId)
subLayerId
-
public int getUrlHashCode()
protected void setInitialExtent(Envelope e)
e
- --an Envelope object.public UserCredentials getCredentials()
protected void setCredentials(UserCredentials credentials)
credentials
- The credentials to set.protected Envelope getInitialExtent()
protected void setFullExtent(Envelope extent)
public Polygon getExtent()
public Envelope getFullExtent()
protected void updateSpatialReferenceStatus(int SRStatus)
SRStatus
- an integer indicating the spatial reference status of layerpublic long getID()
public String getTitle()
public PopupInfo getPopupInfo(int sublayerId)
PopupInfo
associated with the sub-layer id.
sublayerId
- the sublayer id
PopupInfo
public void setPopupInfos(Map<Integer,PopupInfo> popUpInfos)
popUpInfos
- the popup infospublic SpatialReference getSpatialReference()
public double getResolution()
public int getWidth()
public int getHeight()
public SpatialReference getDefaultSpatialReference()
public boolean isWebMapBaselayer()
public boolean isShowLegend()
public Layer getParent()
protected void setDefaultSpatialReference(SpatialReference defaultSpatialReference)
defaultSpatialReference
- The defaultSpatialReference to set.protected float getDpi()
protected boolean verifyCredentials()
protected long lock()
protected void unlock(long handle)
protected ExecutorService getPoolExecutor()
protected ExecutorService getServiceExecutor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |