Struct slippy_map_tiles::Tile [] [src]

pub struct Tile { /* fields omitted */ }

A single tile.

Methods

impl Tile
[src]

[src]

Constucts a Tile with the following zoom, x and y values.

Returns None if the x/y are invalid for that zoom level, or if the zoom is >= 100.

Examples

assert!(Tile::new(0, 3, 3).is_none());

[src]

zoom of this tile

[src]

X value of this tile

[src]

Y value of tile

[src]

Constucts a Tile with the following zoom, x and y values based on a TMS URL. Returns None if the TMS url is invalid, or those

Examples

let t = Tile::from_tms("/10/547/380.png");
assert_eq!(t, Tile::new(10, 547, 380));
assert_eq!(Tile::from_tms("foobar"), None);

[src]

Returns the parent tile for this tile, i.e. the tile at the zoom-1 that this tile is inside.

assert_eq!(Tile::new(1, 0, 0).unwrap().parent(), Tile::new(0, 0, 0));

None if there is no parent, which is at zoom 0.

assert_eq!(Tile::new(0, 0, 0).unwrap().parent(), None);

[src]

Returns the subtiles (child) tiles for this tile. The 4 tiles at zoom+1 which cover this tile. Returns None if this is at the maximum permissable zoom level, and hence there are no subtiles.

let t = Tile::new(0, 0, 0).unwrap();
let subtiles: [Tile; 4] = t.subtiles().unwrap();
assert_eq!(subtiles[0], Tile::new(1, 0, 0).unwrap());
assert_eq!(subtiles[1], Tile::new(1, 1, 0).unwrap());
assert_eq!(subtiles[2], Tile::new(1, 0, 1).unwrap());
assert_eq!(subtiles[3], Tile::new(1, 1, 1).unwrap());

[src]

Iterate on all child tiles of this tile

[src]

Returns the LatLon for the centre of this tile.

[src]

Returns the LatLon for the centre of this tile.

[src]

Returns the LatLon of the top left, i.e. north west corner, of this tile.

[src]

Returns the LatLon of the top right, i.e. north east corner, of this tile.

[src]

Returns the LatLon of the bottom left, i.e. south west corner, of this tile.

[src]

Returns the LatLon of the bottom right, i.e. south east corner, of this tile.

[src]

[src]

[src]

[src]

[src]

Returns the TC (TileCache) path for storing this tile.

[src]

Returns the MP (MapProxy) path for storing this tile.

[src]

Returns the TS (TileStash safe) path for storing this tile.

[src]

Returns the Z/X/Y representation of this tile

[src]

Returns the ZXY path for storing this tile.

[src]

Returns the ModTileMetatile path for storing this tile

[src]

Returns an iterator that yields all the tiles possible, starting from 0/0/0. Tiles are generated in a breath first manner, with all zoom 1 tiles before zoom 2 etc.

let mut all_tiles_iter = Tile::all();

[src]

Returns an iterator that yields all the tiles from zoom 0 down to, and including, all the tiles at max_zoom zoom level. Tiles are generated in a breath first manner, with all zoom 1 tiles before zoom 2 etc.

[src]

The BBox for this tile.

[src]

[src]

Trait Implementations

impl PartialEq for Tile
[src]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl Eq for Tile
[src]

impl Debug for Tile
[src]

[src]

Formats the value using the given formatter.

impl Clone for Tile
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl Copy for Tile
[src]

impl Hash for Tile
[src]

[src]

Feeds this value into the given [Hasher]. Read more

1.3.0
[src]

Feeds a slice of this type into the given [Hasher]. Read more