|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.esri.core.map.LayerModel
com.esri.core.map.TiledLayerModel
public abstract class TiledLayerModel
Base class for all tiled layer models. You would typically work with one of the higher level classes, for example, use TiledLayer for cached data; DynamicLayer for non-cached data;
In a Model-View-Controller architecture, this class represents the Model. It handles fetching map tiles, calculating map extent and so on.
| Nested Class Summary | |
|---|---|
static class |
TiledLayerModel.TileGrid
TileGrid holds the tiles to fill the current map extent. |
| Constructor Summary | |
|---|---|
TiledLayerModel(SpatialReference coordsys,
Envelope full,
com.esri.core.internal.value.TileInfo tci)
Instantiates a tiled layer model with the given tile information. |
|
| Method Summary | |
|---|---|
int |
getLevel()
Gets the current level number. |
int |
getLodTileHeight()
Gets the default tile height in pixels. |
int |
getLodTileWidth()
Gets the default tile width in pixels. |
List<Double> |
getResolutions()
Gets the resolution list supported by the associated map service. |
abstract byte[] |
getTile(int lev,
int row,
int col)
This method provides implementation of fetching a tile from a map service. |
void |
setExtent(Point centerPt,
double resolution,
int width,
int height,
SpatialReference sr)
Sets the extent using the center point and the resolution. |
void |
setResolution(double res)
Sets the resolution of the layer. |
TiledLayerModel.TileGrid |
toGrid()
Calculates the grid based on the current map extent. |
TiledLayerModel.TileGrid |
toGridStateless(Envelope mapExtent,
double mapResolution)
Calculates the grid based on the current map extent. |
protected double |
updateLOD(double destResolution)
Reset the model instance to the new resolution. |
protected double |
updateLOD(int levelId)
Resets the model instance to the given level. |
double |
zoom(float pdx,
float pdy,
double to)
Zooms the map to the given resolution at the pivot screen point. |
void |
zoomin(int px,
int py)
Zooms in one level on the current map. |
void |
zoomout(int px,
int py)
Zooms out one level on the current map. |
| Methods inherited from class com.esri.core.map.LayerModel |
|---|
centerAt, getCenter, getDefaultSpatialReference, getExtent, getFullExtent, getResolution, getSpatialReference, pan, resize, setExtent, setFullExtent, setScreenSize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TiledLayerModel(SpatialReference coordsys,
Envelope full,
com.esri.core.internal.value.TileInfo tci)
coordsys - the default map spatial reference.full - the full map extent.tci - the level of details for tiles.| Method Detail |
|---|
public void setExtent(Point centerPt,
double resolution,
int width,
int height,
SpatialReference sr)
LayerModel
setExtent in class LayerModelcenterPt - the map center;width - map width in pixelsheight - map height in pixelssr - the coordinates of the map extentpublic TiledLayerModel.TileGrid toGrid()
public TiledLayerModel.TileGrid toGridStateless(Envelope mapExtent,
double mapResolution)
protected double updateLOD(int levelId)
levelId - the level id.
protected double updateLOD(double destResolution)
destResolution - the new resolution to set.
public void zoomin(int px,
int py)
px - the pivot x in screen coordinate.py - the pivot y in screen coordinate.
public void zoomout(int px,
int py)
px - the pivot x in screen coordinate.py - the pivot y in screen coordinate.
public double zoom(float pdx,
float pdy,
double to)
LayerModel
zoom in class LayerModelpdx - the x coordinate of the center offset.pdy - the y coordinate of the center offset.to - the new resolution.public void setResolution(double res)
LayerModel
setResolution in class LayerModelres - the new resolution.public int getLodTileWidth()
toGrid().
public int getLodTileHeight()
toGrid().
public List<Double> getResolutions()
public int getLevel()
public abstract byte[] getTile(int lev,
int row,
int col)
throws Exception
lev - the level number of the tile.col - the column id of the tilerow - the row id of the tile.
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||