|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.esri.core.map.LayerModel
public abstract class LayerModel
The LayerMOdel class represents the base class for all layer models. You would work with one 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 images, calculating map extent and so on.
| Constructor Summary | |
|---|---|
LayerModel()
Instantiates an empty LayerModel. |
|
LayerModel(SpatialReference coordsys,
Envelope full)
Instantiates a LayerModel with the spatial coordinates system of the layer and full extent of the map. |
|
| Method Summary | |
|---|---|
void |
centerAt(Point centerPt)
Re-centers the map to the given point. |
Point |
getCenter()
Gets the center point of the map. |
SpatialReference |
getDefaultSpatialReference()
Returns the default spatial coordinates of the model, which is specified in the constructor. |
Envelope |
getExtent()
Gets the current map extent. |
Envelope |
getFullExtent()
Gets the full extent of the layer. |
double |
getResolution()
Gets the current map resolutions based on the map extent and screen size settings. |
SpatialReference |
getSpatialReference()
Gets the spatial coordinates used by the map view. |
void |
pan(float dx,
float dy)
Moves the layer by the given pixels. |
void |
resize(int newWidth,
int newHeight)
Resizes the map with the screen width and screen height. |
void |
setExtent(Envelope ext,
int width,
int height,
SpatialReference sr)
Sets the map extent. |
void |
setExtent(Point centerPt,
double resolution,
int width,
int height,
SpatialReference sr)
Sets the extent using the center point and the resolution. |
void |
setFullExtent(Envelope fullExtent)
Sets the full extent of the layer. |
void |
setResolution(double res)
Sets the resolution of the layer. |
void |
setScreenSize(int w,
int h)
Sets the screen size. |
double |
zoom(float pdx,
float pdy,
double to)
Zooms the map to the given resolution at the pivot screen point. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LayerModel()
public LayerModel(SpatialReference coordsys,
Envelope full)
coordsys - the default spatial reference of the layer.full - the full extent of the layer.| Method Detail |
|---|
public void setExtent(Envelope ext,
int width,
int height,
SpatialReference sr)
The spatial coordinates of the center point will be used as the layer's spatial reference, and the map image will be returned in this coordinate system.
ext - the new map extent.width - the screen width in pixelsheight - the screen height in pixels
public void setExtent(Point centerPt,
double resolution,
int width,
int height,
SpatialReference sr)
centerPt - the map center;width - map width in pixelsheight - map height in pixelssr - the coordinates of the map extent
public void resize(int newWidth,
int newHeight)
newWidth - the screen width in pixels.newHeight - the screen height in pixels.public void centerAt(Point centerPt)
centerPt - the new map center;public Envelope getExtent()
public Point getCenter()
public void pan(float dx,
float dy)
dx - the offset x coordinate in pixels.dy - the offset y coordinate in pixels.
public double zoom(float pdx,
float pdy,
double to)
to - the new resolution.pdx - the x coordinate of the center offset.pdy - the y coordinate of the center offset.public SpatialReference getDefaultSpatialReference()
public SpatialReference getSpatialReference()
public void setScreenSize(int w,
int h)
w - the width in pixels.h - the height in pixels.public void setResolution(double res)
res - the new resolution.public double getResolution()
public void setFullExtent(Envelope fullExtent)
fullExtent - the new extent.public Envelope getFullExtent()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||