|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.maps.client.geom.Projection
public abstract class Projection
This is the interface for map projections. A map projection instance is
passed to the constructor of MapType
.
This interface is implemented by the class MercatorProjection
, which
is used by all predefined map types. You can implement this interface if you
want to define map types with different map projections.
Field Summary | |
---|---|
protected com.google.gwt.core.client.JavaScriptObject |
jsoPeer
|
Constructor Summary | |
---|---|
|
Projection()
Create a new Projection instance and bind it to this implementation. |
protected |
Projection(com.google.gwt.core.client.JavaScriptObject jsoPeer)
Create a new Projection instance by wrapping an existing GProjection object. |
Method Summary | |
---|---|
abstract Point |
fromLatLngToPixel(LatLng latlng,
int zoomLevel)
Returns the map coordinates in pixels for the point at the given geographical coordinates, and the given zoom level. |
abstract LatLng |
fromPixelToLatLng(Point point,
int zoomLevel,
boolean unbounded)
Returns the geographical coordinates for the point at the given map coordinates in pixels, and the given zoom level. |
abstract double |
getWrapWidth(int zoomLevel)
Returns to the map the periodicity in x-direction, i.e. |
abstract boolean |
tileCheckRange(TileIndex index,
int zoomLevel,
int tileSize)
Indicates to the map if the tile index is in a valid range for the map type. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final com.google.gwt.core.client.JavaScriptObject jsoPeer
Constructor Detail |
---|
public Projection()
protected Projection(com.google.gwt.core.client.JavaScriptObject jsoPeer)
jsoPeer
- object to wrap.Method Detail |
---|
@Exported public abstract Point fromLatLngToPixel(LatLng latlng, int zoomLevel)
latlng
- map coordinates to translate.zoomLevel
- zoom level to translate.
@Exported public abstract LatLng fromPixelToLatLng(Point point, int zoomLevel, boolean unbounded)
point
- the point at the given map coordinates in pixels to translate.zoomLevel
- zoom level to translate.unbounded
- if true
, causes the geographical longitude coordinate
not to wrap when beyond the -180 or 180 degrees meridian.
@Exported public abstract double getWrapWidth(int zoomLevel)
zoomLevel
- the zoom level to use.
@Exported public abstract boolean tileCheckRange(TileIndex index, int zoomLevel, int tileSize)
index
- the tile index to check. The coordinates may be modified to
point to another instance of the same tile in the case that the
map contains more than one copy of the earth, and hence the same
tile at different tile coordinates.zoomLevel
- the zoom level to checktileSize
-
true
if the tile index is in a valid range for the map type.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |