Class MMProjection
Object
|
+--MMProjection
-
Direct Known Subclasses:
-
MMMercatorProjection
- class
MMProjection
Defined in MultimapOpenAPI
|
Constructor Summary |
MMProjection
( )
An abstract class, the methods of which should be overridden to be used
by an MMMapType.
|
|
Method Summary |
void
|
checkTileRange( <MMPoint> tile, <integer> zoom_factor, tilesize )
Checks whether the given tile coordinates are valid for the projection.
|
MMPoint
|
fromLatLonToPixel( <MMLatLon> pos, <integer> zoom_factor )
Returns map coordinates in pixels for a point with the given coordinates, at the specified zoom factor.
|
MMLatLon
|
fromPixelToLatLon( <MMPoint> pixel, <integer> zoom_factor, unbounded )
Returns map coordinates in lat/lon for a point with the given coordinates in pixels, at the specified zoom factor.
|
MMPoint
|
getAxisMultiplier()
Custom map tiles are numbered from 0,0 in the top left with numbers
increasing to the right and downwards.
|
void
|
getWrapWidth( <integer> zoom_factor )
Returns the number of pixels after which the map repeats itself because it has wrapped around the earth.
|
MMProjection
MMProjection( )
An abstract class, the methods of which should be overridden to be used
by an MMMapType.
Parameters:
zoom_factors - The number of zoom factors you want this projection to work over.
checkTileRange
void checkTileRange( <MMPoint> tile, <integer> zoom_factor, tilesize )
Checks whether the given tile coordinates are valid for the projection. It may also modify the coordinates of the tile to allow wrapping of tiles.
Parameters:
tile - Coordinates of a tile. *
zoom_factor - The zoom factor to check the tile at.
tile_size - The size of the tile.
fromLatLonToPixel
MMPoint fromLatLonToPixel( <MMLatLon> pos, <integer> zoom_factor )
Returns map coordinates in pixels for a point with the given coordinates, at the specified zoom factor.
Parameters:
pos - Geographic position of the point.
zoom_factor - The zoom factor at which you want the pixels returned.
fromPixelToLatLon
MMLatLon fromPixelToLatLon( <MMPoint> pixel, <integer> zoom_factor, unbounded )
Returns map coordinates in lat/lon for a point with the given coordinates in pixels, at the specified zoom factor.
Parameters:
pixel - Pixel position of the point.
zoom_factor - The zoom factor at which you want the coordinates returned.
getAxisMultiplier
MMPoint getAxisMultiplier()
Custom map tiles are numbered from 0,0 in the top left with numbers
increasing to the right and downwards. By returning a point with
either the X or the Y as -1 you can reverse the direction that the
axis work and the corner that they start from. You should always return
a value for X and a value for Y of either 1 or -1, any other values
will give unpredictable results.
Returns:
By default returns (1,1).
getWrapWidth
void getWrapWidth( <integer> zoom_factor )
Returns the number of pixels after which the map repeats itself because it has wrapped around the earth.
Parameters:
zoom_factor - The zoom factor to check.
Documentation generated by
JSDoc on Tue Feb 26 16:25:19 2008