mercantile

package
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 15, 2018 License: MIT Imports: 1 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Xy

func Xy(lngLat LngLat) (x, y float64)

Xy returns the Spherical Mercator (x, y) in meters

Types

type Bbox

type Bbox struct {
	Left   float64
	Bottom float64
	Right  float64
	Top    float64
}

Bbox stores a web mercator bounding box, for which tiles should be downloaded.

func XyBounds

func XyBounds(tile TileID) Bbox

XyBounds returns the Spherical Mercator bounding box of a tile

type LngLat

type LngLat struct {
	Lng float64
	Lat float64
}

LngLat represents point in space (lng, lat)

func Ul

func Ul(tile TileID) LngLat

Ul returns the upper left (lon, lat) of a tile

type TileID

type TileID struct {
	X int
	Y int
	Z int
}

TileID represents id of the tile in (x, y, z) format.

func Tile

func Tile(lng float64, lat float64, zoom int) TileID

Tile get the tile containing a longitude and latitude.

func Tiles

func Tiles(west, south, east, north float64, zooms []int) []TileID

Tiles get the tiles intersecting a geographic bounding box.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL