com.mapitz.gwt.googleMaps.client
Class GMapType

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.mapitz.gwt.googleMaps.client.GMapType

public class GMapType
extends com.google.gwt.core.client.JavaScriptObject

The are some predefined map types. This class can be used to define custom map types. In order to pass them to the map, use the GMap2 constructor, or the GMap2.addMapType() method.
This class can also be subclassed. Constructor arguments can be omitted if instantiated as a prototype. A subclass constructor must invoke the GMapType constructor using call().

Author:
aglaforge

Method Summary
static GMapType create(GTileLayer[] layers, GProjection projection, java.lang.String name)
          GMapType(layers, projection, name, opts?) Constructs a map type with the given tile layers, projection, name, and optional parameters.
static GMapType create(GTileLayer[] layers, GProjection projection, java.lang.String name, GMapTypeOptions opts)
          GMapType(layers, projection, name, opts?) Constructs a map type with the given tile layers, projection, name, and optional parameters.
static GMapType[] G_DEFAULT_MAP_TYPES()
          G_DEFAULT_MAP_TYPES An array of all three predefined map types described above.
static GMapType G_HYBRID_MAP()
          G_HYBRID_MAP This map type shows transparent street maps over Google Earth satellite images.
static GMapType G_NORMAL_MAP()
          G_NORMAL_MAP This is the normal street map type.
static GMapType G_SATELLITE_MAP()
          G_SATELLITE_MAP This map type shows Google Earth satellite images.
 int getBoundsZoomLevel(GLatLngBounds bounds, GSize viewSize)
          getBoundsZoomLevel(bounds, viewSize) none Returns to the map the zoom level at which the map section defined by bounds fits into the map view of the given size in pixels.
 java.lang.String[] getCopyrights(GLatLngBounds bounds, int zoom)
          getCopyrights(bounds, zoom) Array of String Returns to the map the copyright messages appropriate for the region described by bounds at the given zoom level.
 java.lang.String getErrorMessage()
          getErrorMessage() String Returns to the map the error message that is displayed in areas or on zoom level where this map type doesn't have map tiles.
 java.lang.String getLinkColor()
          getLinkColor() String Returns to the map the color that is best used for a hyperlink that is overlaid on the map.
 int getMaximumResolution()
          getMaximumResolution(latlng?) Number Returns to the map the highest zoom level at which this map type is defined.
 int getMaximumResolution(GLatLng latlng)
          getMaximumResolution(latlng?) Number Returns to the map the highest zoom level at which this map type is defined.
 int getMinimumResolution()
          getMinimumResolution(latlng?) Number Returns to the map the lowest zoom level at which this map type is defined.
 int getMinimumResolution(GLatLng latlng)
          getMinimumResolution(latlng?) Number Returns to the map the lowest zoom level at which this map type is defined.
 java.lang.String getName(boolean opt_short)
          getName(opt_short) String Returns to the map the name of the map type to be used as the button label in the GMapTypeControl.
 GProjection getProjection()
          getProjection() GProjection Returns to the map the projection of this map type.
 int getSpanZoomLevel(GLatLng center, GLatLng span, GSize viewSize)
          getSpanZoomLevel(center, span, viewSize) Number Returns to the map the zoom level at which the map section defined by center and span fits into the map view of the given size in pixels.
 java.lang.String getTextColor()
          getTextColor() String Returns to the map the color that is best used for text that is overlaid on the map.
 GTileLayer[] getTileLayers()
          getTileLayers() Array of GTileLayer Returns to the map the array of tile layers.
 int getTileSize()
          getTileSize() Number Returns to the map the map tile size in pixels of this map type.
 java.lang.String getUrlArg()
          getUrlArg() String Returns to the map a value that is used as a URL paramater value to identify this map type in permalinks to the current map view.
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

create

public static GMapType create(GTileLayer[] layers,
                              GProjection projection,
                              java.lang.String name)
GMapType(layers, projection, name, opts?) Constructs a map type with the given tile layers, projection, name, and optional parameters.


create

public static GMapType create(GTileLayer[] layers,
                              GProjection projection,
                              java.lang.String name,
                              GMapTypeOptions opts)
GMapType(layers, projection, name, opts?) Constructs a map type with the given tile layers, projection, name, and optional parameters.


getSpanZoomLevel

public int getSpanZoomLevel(GLatLng center,
                            GLatLng span,
                            GSize viewSize)
getSpanZoomLevel(center, span, viewSize) Number Returns to the map the zoom level at which the map section defined by center and span fits into the map view of the given size in pixels.


getBoundsZoomLevel

public int getBoundsZoomLevel(GLatLngBounds bounds,
                              GSize viewSize)
getBoundsZoomLevel(bounds, viewSize) none Returns to the map the zoom level at which the map section defined by bounds fits into the map view of the given size in pixels.


getName

public java.lang.String getName(boolean opt_short)
getName(opt_short) String Returns to the map the name of the map type to be used as the button label in the GMapTypeControl.


getProjection

public GProjection getProjection()
getProjection() GProjection Returns to the map the projection of this map type.


getTileSize

public int getTileSize()
getTileSize() Number Returns to the map the map tile size in pixels of this map type. The tiles are assumed to be quadratic. All tile layers have the same tile size.


getTileLayers

public GTileLayer[] getTileLayers()
getTileLayers() Array of GTileLayer Returns to the map the array of tile layers.


getMinimumResolution

public int getMinimumResolution(GLatLng latlng)
getMinimumResolution(latlng?) Number Returns to the map the lowest zoom level at which this map type is defined.


getMinimumResolution

public int getMinimumResolution()
getMinimumResolution(latlng?) Number Returns to the map the lowest zoom level at which this map type is defined.


getMaximumResolution

public int getMaximumResolution(GLatLng latlng)
getMaximumResolution(latlng?) Number Returns to the map the highest zoom level at which this map type is defined.


getMaximumResolution

public int getMaximumResolution()
getMaximumResolution(latlng?) Number Returns to the map the highest zoom level at which this map type is defined.


getTextColor

public java.lang.String getTextColor()
getTextColor() String Returns to the map the color that is best used for text that is overlaid on the map. Used for the color of the text of the copyright message displayed by the copyroght control.


getLinkColor

public java.lang.String getLinkColor()
getLinkColor() String Returns to the map the color that is best used for a hyperlink that is overlaid on the map. Used for the color of the link to the terms of use displayed by the copyroght control.


getErrorMessage

public java.lang.String getErrorMessage()
getErrorMessage() String Returns to the map the error message that is displayed in areas or on zoom level where this map type doesn't have map tiles.


getCopyrights

public java.lang.String[] getCopyrights(GLatLngBounds bounds,
                                        int zoom)
getCopyrights(bounds, zoom) Array of String Returns to the map the copyright messages appropriate for the region described by bounds at the given zoom level. This is used by the GCopyrightControl to display the copyright message on the map.


getUrlArg

public java.lang.String getUrlArg()
getUrlArg() String Returns to the map a value that is used as a URL paramater value to identify this map type in permalinks to the current map view. This is currently only used by the maps application.


G_NORMAL_MAP

public static GMapType G_NORMAL_MAP()
G_NORMAL_MAP This is the normal street map type.


G_SATELLITE_MAP

public static GMapType G_SATELLITE_MAP()
G_SATELLITE_MAP This map type shows Google Earth satellite images.


G_HYBRID_MAP

public static GMapType G_HYBRID_MAP()
G_HYBRID_MAP This map type shows transparent street maps over Google Earth satellite images.


G_DEFAULT_MAP_TYPES

public static GMapType[] G_DEFAULT_MAP_TYPES()
G_DEFAULT_MAP_TYPES An array of all three predefined map types described above.