Crate slippy_map_tiles [] [src]

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

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