PixelProjection class

Inheritance

Constructors

PixelProjection.new(int zoomLevel)

Properties

hashCode int
The hash code for this object.
no setterinherited
mapsize int
the size of the whole map in mappixel. At scalefactor 1 (or zoomLevel 0) the _mapSize is equal to the tileSize.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scalefactor → Scalefactor
no setterinherited
tileSize double
the size of a tile in mappixel. Each tile has the same width and height.
final

Methods

boundaryAbsolute(Tile tile) → MapRectangle
boundingBoxOfTile(Tile tile) BoundingBox
The bounding box of this tile in lat/lon coordinates
inherited
boundingBoxOfTileNumbers(int top, int left, int bottom, int right) BoundingBox
inherited
boundingBoxOfTiles(Tile upperLeft, Tile lowerRight) BoundingBox
inherited
boundingBoxToRectangle(BoundingBox boundingBox) → MapRectangle
getCenter(Tile tile) Mappoint
Returns the center point of the given tile in absolute pixel coordinates
getLeftUpper(Tile tile) Mappoint
Returns the top-left point of this tile in absolute pixel coordinates.
latitudeDiffPerPixel(double latitude, double pixelDiff) double
latitudeToPixelY(double latitude) double
Converts a latitude coordinate (in degrees) to a pixel Y coordinate at a certain zoom level.
latitudeToTileY(double latitude) int
Converts a latitude coordinate (in degrees) to a tile Y number at a certain zoom level.
inherited
latLonToPixel(ILatLong latLong) Mappoint
Calculates the absolute pixel position for a map size and tile size
longitudeToPixelX(double longitude) double
Converts a longitude coordinate (in degrees) to a pixel X coordinate at a certain zoom level.
longitudeToTileX(double longitude) int
@param scaleFactor the scale factor for which the size of the world map should be returned. @return the horizontal and vertical size of the map in pixel at the given scale. @throws IllegalArgumentException if the given scale factor is < 1 Converts a longitude coordinate (in degrees) to the tile X number at a certain zoom level.
inherited
meterPerPixel(ILatLong latLong) double
returns the meters per pixel at the current zoomlevel. Returns 0 at +/-90°
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pixelRelativeToLeftUpper(ILatLong latLong, Mappoint leftUpper) → RelativeMappoint
Calculates the absolute pixel position for a tile and tile size relative to origin
pixelRelativeToTile(ILatLong latLong, Tile tile) → RelativeMappoint
Calculates the absolute pixel position for a tile and tile size relative to origin
pixelToLatLong(double pixelX, double pixelY) ILatLong
pixelXToLongitude(double pixelX) double
Converts a pixel X coordinate at a certain map size to a longitude coordinate.
pixelXToTileX(double pixelX) int
Converts a pixel X coordinate to the tile X number.
pixelYToLatitude(double pixelY) double
Converts a pixel Y coordinate at a certain map size to a latitude coordinate.
pixelYToTileY(double pixelY) int
Converts a pixel Y coordinate to the tile Y number.
tileXToLongitude(int tileX) double
Converts a tile X number at a certain zoom level to a longitude coordinate (left side of the tile).
inherited
tileYToLatitude(int tileY) double
Converts a tile Y number at a certain zoom level to a latitude coordinate.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

calculateFittingZoomlevel(BoundingBox boundary, Size size) int
Find the maximum zoomLevel where the boundary fits in given the current screensize. This is an expensive operations since we probe each zoomLevel until we find the correct one. Use it sparingly.