Documentation ¶
Index ¶
- Constants
- Variables
- func BlankTile() image.Image
- func FetchImage(url string) (image.Image, error)
- func V(lat, lon float64, zoom int) pixel.Vec
- type Coord
- type ImageTile
- type Loader
- type Map
- func (m *Map) Bounds() pixel.Rect
- func (m *Map) Center() Coord
- func (m *Map) CenterVec() pixel.Vec
- func (m *Map) Coord(v pixel.Vec) Coord
- func (m *Map) Draw(tg pixel.Target, mt pixel.Matrix)
- func (m *Map) FetchAsync()
- func (m *Map) FetchSync() error
- func (m *Map) Push(p Pusher, coords ...Coord)
- func (m *Map) SetBounds(bounds pixel.Rect)
- func (m *Map) SetCenter(center Coord)
- func (m *Map) SetCenterVec(center pixel.Vec)
- func (m *Map) SetOptions(opts Options)
- func (m *Map) SetZoom(zoom int)
- func (m *Map) Vec(c Coord) pixel.Vec
- func (m *Map) Visible(c Coord) bool
- func (m *Map) Zoom() int
- type Options
- type Pusher
- type Tile
Constants ¶
View Source
const ( MaxZ = 23 MinLat = -85.05112878 MaxLat = 85.05112878 MinLon = -180 MaxLon = 180 EarthRadiusM = 6378137 TileSize = 256 )
Earth Parameters
Variables ¶
View Source
var ( Placeholder = pixel.PictureDataFromImage( image.NewRGBA(image.Rect(0, 0, TileSize, TileSize)), ) )
View Source
var UserAgent = "Slippy/Go-Test"
Functions ¶
Types ¶
type Coord ¶
type Coord [2]float64
Coord is a simple struct for hold WGS-84 Lat Lon coordinates in degrees
func C ¶
C that have been clipped to Max/Min Lat/Lon This can be used as a constructor to assert bad values will be clipped
type ImageTile ¶
func (*ImageTile) SetPicture ¶
func (t *ImageTile) SetPicture(pic *pixel.PictureData)
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
Map draws a slippy map onto a pixel target
func (*Map) CenterVec ¶
CenterVec returns the vec that corresponds to the coordinate of the center of the map
func (*Map) Coord ¶
Coord returns the pixels coordinate assuming the camera is at 0,0 and the map was drawn with the identify matrix
func (*Map) SetCenterVec ¶
SetCenterVec sets the center of the map view to the coordinate which corresponds to the provided vec
func (*Map) Vec ¶
Vec returns the coordinate's pixel assuming the camera is at 0,0 and the map was drawn with the identify matrix
Click to show internal directories.
Click to hide internal directories.