|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.esri.adf.web.ags.data.AGSTileFunctionality
public class AGSTileFunctionality
| Field Summary | |
|---|---|
protected AGSMapResource |
agsMapRes
|
protected java.lang.String |
baseUrl
|
protected WebLodInfo |
currLodInfo
|
protected ContainingTile |
currOriginContainingTile
|
protected java.util.ArrayList<WebLodInfo> |
lodInfos
|
protected AGSMapFunctionality |
mfunc
|
protected WebPoint |
origin
|
protected com.esri.arcgisws.TileCacheInfo |
tci
|
protected int |
tileHeight
|
protected java.lang.String |
tileImageFormat
|
protected int |
tileWidth
|
protected boolean |
tilingAvailable
|
protected boolean |
useVirtualCacheDirectory
|
protected WebMap |
wmap
|
| Fields inherited from interface com.esri.adf.web.data.TileFunctionality |
|---|
FUNCTIONALITY_NAME |
| Constructor Summary | |
|---|---|
AGSTileFunctionality()
|
|
| Method Summary | |
|---|---|
protected com.esri.arcgisws.EnvelopeN |
adjustCurrentMapExtent()
|
void |
applyCandidateTileInfo(CandidateTileInfo candidate)
Computes the tiles to be fetched by applying the info contained in the given candidate tile. |
void |
computeCurrentOriginContainingTile()
Computes the top-left tile for the current extent. |
void |
destroyFunctionality()
The cleanup chores (such as releasing held resources) for the functionality must be performed in this method. |
java.lang.String |
getBaseUrl()
Returns the base URL for the tiled images. |
WebLodInfo |
getCurrentLodInfo()
Returns the level of detail (LOD) used to display the current extent. |
ContainingTile |
getCurrentOriginContainingTile()
Returns the top-left tile for the current extent. |
java.util.List<WebLodInfo> |
getLodInfos()
Returns a List of the levels of detail (LODs) supported by this resource. |
WebPoint |
getOrigin()
Returns the origin of the tiling scheme used by this resource. |
AGSMapResource |
getResource()
Returns the GISResource associated with this functionality. |
int |
getTileHeight()
Returns the height of the tiled images. |
java.lang.String |
getTileImageFormat()
Returns the format of the tiled images. |
int |
getTileWidth()
Returns the width of the tiled images. |
long |
getTokenExpiration()
Return the token expiration duration in minutes. |
void |
initFunctionality(GISResource resource)
The initialization chores for the functionality must be performed in this method. |
boolean |
isTilingAvailable()
Returns true if tiling is available for this resource. |
boolean |
isUseVirtualCacheDirectory()
Returns true if tiles are to be fetched using a direct URL to the tile image. |
void |
setTokenExpiration(long minutes)
Sets the token expiration duration in minutes. |
void |
setUseVirtualCacheDirectory(boolean useVirtualCacheDirectory)
|
void |
zoomToLevel(int level)
Zooms the map to the given level of detail (LOD). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected AGSMapResource agsMapRes
protected AGSMapFunctionality mfunc
protected WebMap wmap
protected boolean tilingAvailable
protected WebLodInfo currLodInfo
protected ContainingTile currOriginContainingTile
protected java.util.ArrayList<WebLodInfo> lodInfos
protected WebPoint origin
protected java.lang.String baseUrl
protected java.lang.String tileImageFormat
protected com.esri.arcgisws.TileCacheInfo tci
protected int tileWidth
protected int tileHeight
protected boolean useVirtualCacheDirectory
| Constructor Detail |
|---|
public AGSTileFunctionality()
| Method Detail |
|---|
public void initFunctionality(GISResource resource)
GISFunctionality
The initialization chores for the functionality must be performed in this method. This method is called by the
resource when the functionality needs to be initialized. This happens either when the resource
itself is being initialized or if users add this functionality to the resource using the
GISResource.addFunctionality(String, GISFunctionality) method after the resource has already
been initialized.
Classes which implement this method should maintain the resource as a class instance variable and
return the same in the GISFunctionality.getResource() method. The functionality is ready for use only after this method has
been called.
initFunctionality in interface GISFunctionalityresource - the GISResource that this functionality supportsGISResource.init(WebContext)public void destroyFunctionality()
GISFunctionality
The cleanup chores (such as releasing held resources) for the functionality must be performed in this method. This
method is called by the GISResource when the resource itself is being destroyed.
The functionality is no longer usable after this method has been called.
destroyFunctionality in interface GISFunctionalityGISResource.destroy()public void computeCurrentOriginContainingTile()
TileFunctionalityComputes the top-left tile for the current extent.
This is important because only this information is passed by the
MapControl to the client browser. The JavaScript residing on the browser
uses this information to fetch the required tiles by directly requesting the tile images from the server.
computeCurrentOriginContainingTile in interface TileFunctionalitypublic void applyCandidateTileInfo(CandidateTileInfo candidate)
TileFunctionalityComputes the tiles to be fetched by applying the info contained in the given candidate tile.
If there are no matching LODs for the LOD info contained in the candidate, no tiles will be fetched for this
functionality and subsequent calls to TileFunctionality.getCurrentOriginContainingTile() will return null.
applyCandidateTileInfo in interface TileFunctionalitycandidate - the CandidateTileInfo based on which the tiles to be fetched will be computedprotected com.esri.arcgisws.EnvelopeN adjustCurrentMapExtent()
public void zoomToLevel(int level)
TileFunctionalityZooms the map to the given level of detail (LOD). If the requested level is not supported no action should be taken.
zoomToLevel in interface TileFunctionalitylevel - the level of detail (LOD) that the map should be zoomed topublic AGSMapResource getResource()
GISFunctionality
Returns the GISResource associated with this functionality.
The resource passed to GISFunctionality.initFunctionality(GISResource) is maintained as a class variable and is accessible
through this method.
getResource in interface GISFunctionalityGISResource associated with this functionalitypublic boolean isTilingAvailable()
TileFunctionalityReturns true if tiling is available for this resource.
If users try to use this functionality even when tiled maps are not supported by this resource, this method should
return false. The WebMap uses this method to determine if it should fetch tiles or dynamically export
images.
isTilingAvailable in interface TileFunctionalitypublic ContainingTile getCurrentOriginContainingTile()
TileFunctionalityReturns the top-left tile for the current extent.
This is important because only this information is passed by the
MapControl to the client browser. The JavaScript residing on the browser
uses this information to fetch the required tiles by directly requesting the tile images from the server.
getCurrentOriginContainingTile in interface TileFunctionalitypublic java.util.List<WebLodInfo> getLodInfos()
TileFunctionality
Returns a List of the levels of detail (LODs) supported by this resource.
The map tiles are generated by the server for pre-defined scales (LODs). This information is important to compute which LOD should be used to display the current extent requested by the user.
getLodInfos in interface TileFunctionalityList of the levels of detail supported by this resourcepublic WebLodInfo getCurrentLodInfo()
TileFunctionalityReturns the level of detail (LOD) used to display the current extent.
The map tiles are generated by the server for pre-defined scales (LODs). This information is important to compute which LOD should be used to display the current extent requested by the user.
getCurrentLodInfo in interface TileFunctionalitypublic WebPoint getOrigin()
TileFunctionalityReturns the origin of the tiling scheme used by this resource.
getOrigin in interface TileFunctionalitypublic java.lang.String getBaseUrl()
TileFunctionalityReturns the base URL for the tiled images. The client-side JavaScript append the virtual path or append the query string to this base URL to fetch the appropriate tiled image from the server.
getBaseUrl in interface TileFunctionalitypublic int getTileWidth()
TileFunctionalityReturns the width of the tiled images.
getTileWidth in interface TileFunctionalitypublic int getTileHeight()
TileFunctionalityReturns the height of the tiled images.
getTileHeight in interface TileFunctionalitypublic void setUseVirtualCacheDirectory(boolean useVirtualCacheDirectory)
public boolean isUseVirtualCacheDirectory()
TileFunctionalityReturns true if tiles are to be fetched using a direct URL to the tile image. If false, the tiles are fetched using a query string encoded URL.
isUseVirtualCacheDirectory in interface TileFunctionalitypublic java.lang.String getTileImageFormat()
TileFunctionalityReturns the format of the tiled images. (For ex. jpg, png, etc.)
getTileImageFormat in interface TileFunctionalitypublic void setTokenExpiration(long minutes)
minutes - the token expiration duration in minutespublic long getTokenExpiration()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||