tile

package
v0.0.0-...-2686f8f Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ElipsWGS84 mercator WGS84 Eccentricity
	ElipsWGS84 = Elips{Eccentricity: 0.08181919084262157}
	// ElipsSpherical mercator for spherical Eccentricity
	ElipsSpherical = Elips{Eccentricity: 0}
)

Functions

func ConvertToTile

func ConvertToTile(lat, long, zoom float64, proj *Elips) (x, y int)

ConvertToTile convert latitude and longtitude to XYZ tile for specified mercator projection

Types

type Elips

type Elips struct {
	Eccentricity float64
}

Elips contains eccentrcity for calculating

type Tile

type Tile struct {
	X     int
	Y     int
	Z     int
	Image []byte
}

Tile contains coords and image []byte

func (Tile) GetNearby

func (t Tile) GetNearby(side int) []Tile

GetNearby return all nearby tiles for specified square side

Jump to

Keyboard shortcuts

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