|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.maryanovsky.map.client.MapLocationModel
public class MapLocationModel
Represents the location on the map displayed by a MapWidget
: latitude
and longitude coordinates and a zoom.
Constructor Summary | |
---|---|
MapLocationModel(int minZoom,
int maxZoom,
LatLng center,
int zoom)
Creates a new MapLocationModel with the specified arguments. |
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener listener)
Adds the specified ChangeListener to receive notifications
when this MapLocationModel changes. |
int |
clampToLegal(int zoom)
Returns the nearest legal zoom to the specified one. |
LatLng |
getCenter()
Returns the location of the center. |
int |
getMaxZoom()
Returns the biggest possible zoom in this model. |
int |
getMinZoom()
Returns the smallest possible zoom in this model. |
int |
getZoom()
Returns the zoom. |
boolean |
isLegalZoom(int zoom)
Returns whether the specified zoom is within the zoom bounds of this MapLocationModel . |
void |
removeChangeListener(ChangeListener listener)
Removes the specified ChangeListener from receiving
notifications when this MapLocationModel changes. |
void |
set(LatLng center,
int zoom)
Sets both the center and zoom in one call (to avoid a temporary state where either the zoom or the center are wrong). |
void |
set(MapLocationModel mapLocationModel)
Copies all relevant information from the specified MapLocationModel to this one. |
void |
setCenter(LatLng center)
Sets the center to the specified location. |
void |
setZoom(int zoom)
Sets the zoom to the specified value. |
void |
zoomCheck(int zoom)
Checks whether the specified zoom is within our zoom bounds of our and throws an IllegalArgumentException exception if not. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapLocationModel(int minZoom, int maxZoom, LatLng center, int zoom)
MapLocationModel
with the specified arguments.
minZoom
- The minimum possible zoom.maxZoom
- The maximum possible zoom.center
- The location of the center of the view.zoom
- The zoom of the view.Method Detail |
---|
public void addChangeListener(ChangeListener listener)
ChangeListener
to receive notifications
when this MapLocationModel
changes.
addChangeListener
in interface HasChange
public void removeChangeListener(ChangeListener listener)
ChangeListener
from receiving
notifications when this MapLocationModel
changes.
removeChangeListener
in interface HasChange
public int getMinZoom()
public int getMaxZoom()
public boolean isLegalZoom(int zoom)
MapLocationModel
.
public void zoomCheck(int zoom)
IllegalArgumentException
exception if not.
public int clampToLegal(int zoom)
public LatLng getCenter()
public void setCenter(LatLng center)
public int getZoom()
public void setZoom(int zoom)
public void set(LatLng center, int zoom)
public void set(MapLocationModel mapLocationModel)
MapLocationModel
to this one.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |