|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.maps.client.MapType
public final class MapType
A MapType is a sequence of tile layers, a map projection, a tile size, and
assorted other settings, link colors, and copyrights.
There are three predefine map types: normalMap
,
satelliteMap
, and hybridMap
.
You can create instances of this class to define custom map types. In order
to show them on the map, use the MapWidget.addMapType(MapType)
method. You can use
TileLayerOverlay
to add to (rather than entirely replace) the map's tile layers.
MapWidget.addMapType(MapType)
,
TileLayerOverlay
Constructor Summary | |
---|---|
MapType(TileLayer[] layers,
Projection projection,
java.lang.String name)
Creates a new custom map type from the tile layers, projection, and name. |
|
MapType(TileLayer[] layers,
Projection projection,
java.lang.String name,
MapTypeOptions options)
Creates a new custom map type from the tile layers, projection, name, and options. |
Method Summary | |
---|---|
void |
addMapTypeNewCopyrightHandler(MapTypeNewCopyrightHandler handler)
Add a handler for "newcopyright" events. |
static MapType |
getAerialHybridMap()
This map type displays a transparent layer of major streets on top of aerial imagery. |
static MapType |
getAerialMap()
This map type displays a transparent layer of major streets on satellite images. |
java.lang.String |
getAlt()
Returns to the map the alternative text of this map type. |
int |
getBoundsZoomLevel(LatLngBounds bounds,
Size viewSize)
Returns the highest resolution zoom level that shows show the given geographical bounds in a map of the given pixel size. |
java.lang.String[] |
getCopyrights(LatLngBounds bounds,
int zoomLevel)
Returns the copyrights for the given bounds and zoom level. |
static java.util.List<MapType> |
getDefaultMapTypes()
Returns G_DEFAULT_MAP_TYPES as an Java Array of MapType objects. |
static MapType |
getEarthMap()
Returns a map type that shows Google Earth using the browser plugin. |
java.lang.String |
getErrorMessage()
Returns the error message that is displayed in areas and zoom levels where this map type does not have map tiles. |
static MapType |
getHybridMap()
Returns a map type that shows transparent street maps over Google Earth satellite images. |
java.lang.String |
getLinkColor()
Returns the color that used for a hyperlinks displayed on the map. |
static MapType |
getMapmakerHybridMap()
This map type displays a transparent layer of major streets created using Google Mapmaker on satellite images. |
static java.util.List<MapType> |
getMapmakerMapTypes()
Turns G_MAPMAKER_MAP_TYPES into an immutable of MapType objects. |
static MapType |
getMapmakerNormalMap()
This map type displays a street map with tiles created using Google Mapmaker. |
static MapType |
getMarsElevationMap()
Returns a map type displays a shaded relief map of the surface of Mars. |
static MapType |
getMarsInfraredMap()
Returns a map type displays a shaded infrared map of the surface of Mars. |
static java.util.List<MapType> |
getMarsMapTypes()
Turns G_MARS_MAP_TYPES into an immutable of MapType objects. |
static MapType |
getMarsVisibleMap()
Returns a map type that displays photographs taken from orbit around Mars. |
int |
getMaximumResolution()
Returns the highest zoom level at which this map type is defined for a given point. |
int |
getMinimumResolution()
Returns the lowest zoom level at which this map type is defined for a given point. |
static MapType |
getMoonElevationMap()
Returns a map type that displays a shaded terrain map of the surface of the Moon. |
static java.util.List<MapType> |
getMoonMapTypes()
Turns G_MOON_MAP_TYPES into an immutable list of MapType objects. |
static MapType |
getMoonVisibleMap()
Returns a map type that displays photographs taken from orbit around the moon. |
java.lang.String |
getName(boolean shortName)
Returns the translated, human-readable string name of the map type. |
static MapType |
getNormalMap()
Returns the normal street map type. |
com.google.gwt.core.client.JavaScriptObject |
getPeer()
Returns the native JavaScript object representing this MapType. |
static MapType |
getPhysicalMap()
Returns a map type that shows a terrain view. |
Projection |
getProjection()
Returns the projection used by this map type. |
static MapType |
getSatelliteMap()
Returns a map type that shows Google Earth satellite images. |
static java.util.List<MapType> |
getSkyMapTypes()
Turns G_SKY_MAP_TYPES into an immutable list of MapType objects. |
static MapType |
getSkyVisibleMap()
Returns a map type shows a mosaic of the sky. |
int |
getSpanZoomLevel(LatLng center,
LatLng span,
Size viewSize)
Returns the highest resolution zoom level required to show the given span with the given center point. |
java.lang.String |
getTextColor()
Returns the color used for text displayed on the map. |
TileLayer[] |
getTileLayers()
Returns the array of tile layers in the z-order they should be displayed. |
int |
getTileSize()
Returns the tile size of this map's tile layers. |
java.lang.String |
getUrlArg()
Returns the URL argument used to refer to this map type. |
void |
removeMapTypeNewCopyrightHandler(MapTypeNewCopyrightHandler handler)
Removes a single handler of this map type previously added with addMapTypeNewCopyrightHandler(MapTypeNewCopyrightHandler) . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MapType(TileLayer[] layers, Projection projection, java.lang.String name)
layers
- the map type's tile layersprojection
- the projection to be used for this map typename
- the name of the map typepublic MapType(TileLayer[] layers, Projection projection, java.lang.String name, MapTypeOptions options)
layers
- the map type's tile layersprojection
- the projection to be used for this map typename
- the name of the map typeoptions
- options for this map typeMethod Detail |
---|
public static MapType getAerialHybridMap()
public static MapType getAerialMap()
public static java.util.List<MapType> getDefaultMapTypes()
public static MapType getEarthMap()
public static MapType getHybridMap()
public static MapType getMapmakerHybridMap()
public static MapType getMapmakerNormalMap()
public static java.util.List<MapType> getMapmakerMapTypes()
public static MapType getMarsElevationMap()
public static MapType getMarsInfraredMap()
public static java.util.List<MapType> getMarsMapTypes()
public static MapType getMarsVisibleMap()
public static MapType getMoonElevationMap()
public static java.util.List<MapType> getMoonMapTypes()
public static MapType getMoonVisibleMap()
public static MapType getNormalMap()
public static MapType getPhysicalMap()
public static MapType getSatelliteMap()
public static java.util.List<MapType> getSkyMapTypes()
public static MapType getSkyVisibleMap()
public void addMapTypeNewCopyrightHandler(MapTypeNewCopyrightHandler handler)
handler
- handler to invoke on mouse click events.public java.lang.String getAlt()
public int getBoundsZoomLevel(LatLngBounds bounds, Size viewSize)
bounds
- the bounds to showviewSize
- the size of the viewport in pixels
public java.lang.String[] getCopyrights(LatLngBounds bounds, int zoomLevel)
bounds
- the current viewportzoomLevel
- the current zoom level
public java.lang.String getErrorMessage()
public java.lang.String getLinkColor()
public int getMaximumResolution()
public int getMinimumResolution()
public java.lang.String getName(boolean shortName)
MapTypeControl
.
shortName
- true
to return the abbreviated name
public com.google.gwt.core.client.JavaScriptObject getPeer()
public Projection getProjection()
public int getSpanZoomLevel(LatLng center, LatLng span, Size viewSize)
center
- the center of the viewportspan
- the span of the viewportviewSize
- the size of the viewport in pixels
public java.lang.String getTextColor()
public TileLayer[] getTileLayers()
public int getTileSize()
public java.lang.String getUrlArg()
public void removeMapTypeNewCopyrightHandler(MapTypeNewCopyrightHandler handler)
addMapTypeNewCopyrightHandler(MapTypeNewCopyrightHandler)
.
handler
- the handler to remove
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |