[][src]Crate slippy_map_tiles

Abstractions and functions for working with OpenStreetMap (etc.) tiles

Examples

use slippy_map_tiles::Tile;

let t = Tile::new(6, 35, 23).unwrap();

You cannot create invalid tiles

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

Structs

AllSubTilesIterator
AllTilesIterator

Iterates over all the tiles in the world.

AllTilesToZoomIterator

Iterates over all the tiles from 0/0/0 up to, and including, max_zoom.

BBox

A Bounding box

BBoxTilesIterator
LatLon

A single point in the world.

Metatile

Metatiles are NxN tiles

MetatilesIterator

Iterates over all the metatiles in the world.

ModTileMetatile

Metatiles as found by mod_tile, always 8x8

Tile

A single tile.

Functions

lat_lon_to_tile

Return the x,y of a tile which has this lat/lon for this zoom level

merc_location_to_tile_coords

Return the x,y of a tile which (for this zoom) has this web mercator 3857 x/y, and then the x,y of the pixel within that image (presuming a 256x256 image)

size_bbox_zoom

How many tiles does this bbox cover at this zoom If there is an overflow for usize, None is returned, if not, a Some(...)

size_bbox_zoom_metatiles

How many metatiles, of this scale, does this bbox cover at this zoom If there is an overflow for usize, None is returned, if not, a Some(...) This is less likely to overflow than size_bbox_zoom because metatiles are larger

xy_to_zorder
zorder_to_xy