Google.Maps.Coord.MercatorTileCoords

An immutable representation of the x,y coordinates of a Google Maps tile.

Summary

For more information, see Map and Tile Coordinates.

Inheritance

Inherits from: IEquatable< MercatorTileCoords >

Constructors and Destructors

MercatorTileCoords(int x, int y, int zoom, bool normalize)
The TileCoord constructor.

Public attributes

X
readonly int
The x coordinate.
Y
readonly int
The y coordinate.
Zoom
readonly int
The zoom level.

Public functions

East(out MercatorTileCoords east, bool normalize)
bool
Produces the MercatorTileCoords to the immediate east of this tile coordinate. Returns true if the coordinate to the east falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not.
Equals(MercatorTileCoords other)
bool
Implements the IEquatable{T} interface.
Equals(object obj)
override bool
Overrides the Equals() method.
GetHashCode()
override int
Overrides the GetHashCode() method.
Neighbors(bool normalize)
Generates an array of coordinates for the tiles surrounding the supplied tile, accounting for boundaries, without wrapping.
North(out MercatorTileCoords north, bool normalize)
bool
Produces the MercatorTileCoords to the immediate north of this tile coordinate. Returns true if the coordinate to the north falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not.
Offset(out MercatorTileCoords offset, int xOffset, int yOffset, bool normalize)
bool
Produces the MercatorTileCoords offset from this tile coordinate by the specified X and Y. Returns true if this coordinate falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not.
South(out MercatorTileCoords south, bool normalize)
bool
Produces the MercatorTileCoords to the immediate south of this tile coordinate. Returns true if the coordinate to the south falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not.
ToString()
override string
Returns the formatted string representation of this TileCoord.
West(out MercatorTileCoords west, bool normalize)
bool
Produces the MercatorTileCoords to the immediate west of this tile coordinate. Returns true if the coordinate to the west falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not.

Public attributes

X

readonly int Google::Maps::Coord::MercatorTileCoords::X

The x coordinate.

This value is returned by the MaxValue() method. The X coordinates wrap. For more information, see Map and Tile Coordinates.

Y

readonly int Google::Maps::Coord::MercatorTileCoords::Y

The y coordinate.

The Y coordinates are clamped. For more information, see Map and Tile Coordinates.

Zoom

readonly int Google::Maps::Coord::MercatorTileCoords::Zoom

The zoom level.

Public functions

East

bool Google::Maps::Coord::MercatorTileCoords::East(
  out MercatorTileCoords east,
  bool normalize
)

Produces the MercatorTileCoords to the immediate east of this tile coordinate. Returns true if the coordinate to the east falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not.

Details
Parameters
east
This parameter is filled with the tile coordinate to the immediate east of this one.
normalize
Whether the returned coordinate should be normalized.

Equals

bool Google::Maps::Coord::MercatorTileCoords::Equals(
  MercatorTileCoords other
)

Implements the IEquatable{T} interface.

Details
Parameters
other
The other TileCoord to compare with this one.
Returns
A boolean value that indicates whether the specified TileCoord and this one are equal.

Equals

override bool Google::Maps::Coord::MercatorTileCoords::Equals(
  object obj
)

Overrides the Equals() method.

Details
Parameters
obj
The other object to compare with this TileCoord.

GetHashCode

override int Google::Maps::Coord::MercatorTileCoords::GetHashCode()

Overrides the GetHashCode() method.

MercatorTileCoords

 Google::Maps::Coord::MercatorTileCoords::MercatorTileCoords(
  int x,
  int y,
  int zoom,
  bool normalize
)

The TileCoord constructor.

Details
Parameters
x
The x coordinate.
y
The y coordinate.
zoom
The zoom level.
normalize
If this parameter is true, then the x coordinate is wrapped, and the y coordinate is clamped to the extent of the tile coordinate space at this zoom level.

Neighbors

MercatorTileCoords[] Google::Maps::Coord::MercatorTileCoords::Neighbors(
  bool normalize
)

Generates an array of coordinates for the tiles surrounding the supplied tile, accounting for boundaries, without wrapping.

Details
Parameters
normalize
If true, neighbours on the other side of the anti-meridian will be included, otherwise only tiles on the same edge of the map will be returned.
Returns
The coordinates of neighboring tiles

North

bool Google::Maps::Coord::MercatorTileCoords::North(
  out MercatorTileCoords north,
  bool normalize
)

Produces the MercatorTileCoords to the immediate north of this tile coordinate. Returns true if the coordinate to the north falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not.

Details
Parameters
north
This parameter is filled with the tile coordinate to the immediate north of this one.
normalize
Whether the returned coordinate should be normalized.

Offset

bool Google::Maps::Coord::MercatorTileCoords::Offset(
  out MercatorTileCoords offset,
  int xOffset,
  int yOffset,
  bool normalize
)

Produces the MercatorTileCoords offset from this tile coordinate by the specified X and Y. Returns true if this coordinate falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not.

Details
Parameters
offset
This parameter is filled with the tile coordinate whose position relative to this one is specified by xOffset and yOffset.
xOffset
The number of tiles to move to the east (negative for west, zero to stay in place).
yOffset
The number of tiles to move to the south (negative for north, zero to stay in place).
normalize
Whether the returned coordinate should be normalized.

South

bool Google::Maps::Coord::MercatorTileCoords::South(
  out MercatorTileCoords south,
  bool normalize
)

Produces the MercatorTileCoords to the immediate south of this tile coordinate. Returns true if the coordinate to the south falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not.

Details
Parameters
south
This parameter is filled with the tile coordinate to the immediate south of this one.
normalize
Whether the returned coordinate should be normalized.

ToString

override string Google::Maps::Coord::MercatorTileCoords::ToString()

Returns the formatted string representation of this TileCoord.

West

bool Google::Maps::Coord::MercatorTileCoords::West(
  out MercatorTileCoords west,
  bool normalize
)

Produces the MercatorTileCoords to the immediate west of this tile coordinate. Returns true if the coordinate to the west falls within the valid bounds of the tile coordinate space before any optional wrapping is applied. False if not.

Details
Parameters
west
This parameter is filled with the tile coordinate to the immediate west of this one.
normalize
Whether the returned coordinate should be normalized.