com.esri.adf.web.data
Interface TileFunctionality

All Superinterfaces:
GISFunctionality
All Known Implementing Classes:
AGSTileFunctionality, VETileFunctionality

public interface TileFunctionality
extends GISFunctionality

The TileFunctionality interface is implemented by functionalities to provide tiled mapping capability for the resource. For instance, the AGSTileFunctionality provides mapping for ArcGIS Server resources.

The WebMap works with tiled map functionalities referenced by the resources by the name FUNCTIONALITY_NAME. The WebMap as well as the MapControl use the methods provided by this functionality to fetch the appropriate tiles for the user.

Currently the WebMap will use the tile functionality only if it is supported by the bottom-most map resource.

Note that if you were to implement this functionality for resoures other than ArcGIS Server, you'll either need to write your own client-side JavaScript to handle your tiling schemes or conform to the tiling schemes and URL patterns followed by the cached map services provided by ArcGIS server.


Field Summary
static String FUNCTIONALITY_NAME
           The name that should be given to the TileFunctionality in order for it to be consumed by the WebMap
 
Method Summary
 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.
 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.
 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.
 int getTileHeight()
           Returns the height of the tiled images.
 String getTileImageFormat()
           Returns the format of the tiled images.
 int getTileWidth()
           Returns the width of the tiled images.
 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 zoomToLevel(int level)
           Zooms the map to the given level of detail (LOD).
 
Methods inherited from interface com.esri.adf.web.data.GISFunctionality
destroyFunctionality, getResource, initFunctionality
 

Field Detail

FUNCTIONALITY_NAME

static final String FUNCTIONALITY_NAME

The name that should be given to the TileFunctionality in order for it to be consumed by the WebMap

See Also:
Constant Field Values
Method Detail

isTilingAvailable

boolean isTilingAvailable()

Returns 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.

Returns:
true if tiling is available

isUseVirtualCacheDirectory

boolean isUseVirtualCacheDirectory()

Returns 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.

Returns:
true if tiles are to be fetched using a direct URL to the tile image

computeCurrentOriginContainingTile

void computeCurrentOriginContainingTile()

Computes 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

ContainingTile getCurrentOriginContainingTile()

Returns 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.

Returns:
the top-left tile for the current extent.

getLodInfos

List<WebLodInfo> getLodInfos()

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.

Returns:
a List of the levels of detail supported by this resource

getCurrentLodInfo

WebLodInfo getCurrentLodInfo()

Returns 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.

Returns:
the level of detail (LOD) used to display the current extent

zoomToLevel

void zoomToLevel(int level)

Zooms the map to the given level of detail (LOD). If the requested level is not supported no action should be taken.

Parameters:
level - the level of detail (LOD) that the map should be zoomed to

getOrigin

WebPoint getOrigin()

Returns the origin of the tiling scheme used by this resource.

Returns:
the origin of the tiling scheme used by this resource

getBaseUrl

String getBaseUrl()

Returns 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.

Returns:
the base URL for the tiled images

getTileWidth

int getTileWidth()

Returns the width of the tiled images.

Returns:
the width of the tiled images

getTileHeight

int getTileHeight()

Returns the height of the tiled images.

Returns:
the height of the tiled images

getTileImageFormat

String getTileImageFormat()

Returns the format of the tiled images. (For ex. jpg, png, etc.)

Returns:
the format of the tiled images. (For ex. jpg, png, etc.)

applyCandidateTileInfo

void applyCandidateTileInfo(CandidateTileInfo candidate)

Computes 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 getCurrentOriginContainingTile() will return null.

Parameters:
candidate - the CandidateTileInfo based on which the tiles to be fetched will be computed