com.mapitz.gwt.googleMaps.client
Class GProjection

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.mapitz.gwt.googleMaps.client.GProjection
Direct Known Subclasses:
GMercatorProjection

public abstract class GProjection
extends com.google.gwt.core.client.JavaScriptObject

This is the interface for map projections. A map projection instance is passed to the constructor of GMapType. This interface is implemented by the class GMercatorProjection, which is used by all predefined map types. You can implement this interface if you want to define map types with different map projections.

Author:
aglaforge

Method Summary
 GPoint fromLatLngToPixel(GLatLng latlng, int zoom)
          fromLatLngToPixel(latlng, zoom) GPoint Returns the map coordinates in pixels for the point at the given geographical coordinates, and the given zoom level.
 GLatLng fromPixelToLatLng(GPoint pixel, int zoom, boolean unbounded)
          fromPixelToLatLng(pixel, zoom, unbounded) none Returns the geographical coordinates for the point at the given map coordinates in pixels, and the given zoom level.
 GLatLng fromPixelToLatLng(GProjection self, GPoint pixel, int zoom)
          fromPixelToLatLng(pixel, zoom, unbounded) none Returns the geographical coordinates for the point at the given map coordinates in pixels, and the given zoom level.
 void getWrapWidth(GProjection self, int zoom)
          getWrapWidth(zoom) none Returns to the map the periodicity in x-direction, i.e.
 void tileCheckRange(GProjection self, GPoint tile, int zoom, int tilesize)
          tileCheckRange(tile, zoom, tilesize) none Returns to the map if the tile index is in a valid range for the map type.
 
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

fromLatLngToPixel

public GPoint fromLatLngToPixel(GLatLng latlng,
                                int zoom)
fromLatLngToPixel(latlng, zoom) GPoint Returns the map coordinates in pixels for the point at the given geographical coordinates, and the given zoom level.

Parameters:
latlng -
zoom -
Returns:

fromPixelToLatLng

public GLatLng fromPixelToLatLng(GPoint pixel,
                                 int zoom,
                                 boolean unbounded)
fromPixelToLatLng(pixel, zoom, unbounded) none Returns the geographical coordinates for the point at the given map coordinates in pixels, and the given zoom level. Flag unbounded causes the geographical longitude coordinate not to wrap when beyond the -180 or 180 degrees meridian.

Parameters:
pixel -
zoom -
unbounded -
Returns:

fromPixelToLatLng

public GLatLng fromPixelToLatLng(GProjection self,
                                 GPoint pixel,
                                 int zoom)
fromPixelToLatLng(pixel, zoom, unbounded) none Returns the geographical coordinates for the point at the given map coordinates in pixels, and the given zoom level. Flag unbounded causes the geographical longitude coordinate not to wrap when beyond the -180 or 180 degrees meridian.

Parameters:
self -
pixel -
zoom -
Returns:

tileCheckRange

public void tileCheckRange(GProjection self,
                           GPoint tile,
                           int zoom,
                           int tilesize)
tileCheckRange(tile, zoom, tilesize) none Returns to the map if the tile index is in a valid range for the map type. Otherwise the map will display an empty tile. It also may modify the tile index 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.

Parameters:
self -
tile -
zoom -
tilesize -

getWrapWidth

public void getWrapWidth(GProjection self,
                         int zoom)
getWrapWidth(zoom) none Returns to the map the periodicity in x-direction, i.e. the number of pixels after which the map repeats itself because it wrapped once round the earth. By default, returns Infinity, i.e. the map will not repeat itself. This is used by the map to compute the placement of overlays on map views that contain more than one copy of the earth (this usually happens only at low zoom levels). (Since 2.46)

Parameters:
self -
zoom -