new IWProjection()
Default constructor.
Methods
-
calculateGridOffset(map)
-
Calculates the offset of the point (0, 0) to a position on the tile grid.
Parameters:
Name Type Description map
IWMap a map Returns:
the offset- Type
- IWPoint
-
clone()
-
Returns a copy of this projection.
-
generateTileInformation(x, y, gridOffset)
-
Generates information like the tile screen position, tile index and tile id for a pixel position.
Parameters:
Name Type Description x
number screen position of the tile y
number screen position of the tile gridOffset
IWPoint offset of (0, 0) to the tile grid Returns:
- Type
- object
-
initialize(xmlDocument)
-
Initializes the projection parameters from a XML document.
Parameters:
Name Type Description xmlDocument
Document a XML document storing all parameters used by the current projection Returns:
- Type
- void
-
meterToPixel(coord)
-
Returns the offset in pixels of the specified coordinate to the map center.
Parameters:
Name Type Description coord
IWCoordinate a coordinate Returns:
- Type
- IWPoint
-
needsReload(size)
-
Checks whether the map has to be reloaded completely to display the specified region.
Parameters:
Name Type Description size
IWSize the size of the visible part of the map in pixels Returns:
- Type
- boolean
-
pixelToMeter(offset)
-
Returns the coordinate of the current map center plus the specified offset in pixels.
Parameters:
Name Type Description offset
IWPoint an offset Returns:
- Type
- IWCoordinate
-
toString()
-
Returns a text representation of this projection.
Returns:
- Type
- String