http://www.google.com/apis/maps/documentation/
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.
These methods are called by the map. You need to implement them.
Methods | Return Value | Description |
---|---|---|
fromLatLngToPixel(latlng, zoom) | GPoint | Returns the map coordinates in pixels for the point at the given geographical coordinates, and the given zoom level. |
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. |
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. |
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) |