Documentation ¶
Index ¶
- func CalcCorner(tc TileCoordinate, height float64, width float64) (TileCoordinate, TileCoordinate)
- func ConcatImages(imgs [][]image.Image) image.Image
- func CropImage(img image.Image, center TileCoordinate, rect Rect) image.Image
- func DownloadImage(gc GeoCoordinate, zoom uint, rect Rect, now time.Time, duration time.Duration, ...) error
- func DownloadImageTile(tile Tile, now time.Time, duration time.Duration, filepath string) error
- func FetchBorderImage(gc GeoCoordinate, zoom uint, rect Rect) (image.Image, error)
- func FetchImage(gc GeoCoordinate, zoom uint, rect Rect, now time.Time, duration time.Duration) (image.Image, error)
- func FetchImageTile(tile Tile, now time.Time, duration time.Duration) (image.Image, error)
- func FetchJmaImage(gc GeoCoordinate, zoom uint, rect Rect, now time.Time, duration time.Duration) (image.Image, error)
- func FetchMapImage(gc GeoCoordinate, zoom uint, rect Rect, datatype string) (image.Image, error)
- func Overlay(bottom image.Image, middle image.Image, top image.Image) (image.Image, error)
- type GeoCoordinate
- type Rect
- type Tile
- type TileCoordinate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CalcCorner ¶
func CalcCorner(tc TileCoordinate, height float64, width float64) (TileCoordinate, TileCoordinate)
func DownloadImage ¶
func DownloadImageTile ¶
func FetchBorderImage ¶
func FetchImage ¶
func FetchImageTile ¶
func FetchJmaImage ¶
func FetchMapImage ¶
Types ¶
type GeoCoordinate ¶
type GeoCoordinate struct { Lat float64 `validate:"gte=-85.0511287798,lte=85.0511287798,required"` Lon float64 `validate:"required"` }
func (GeoCoordinate) GetTile ¶
func (g GeoCoordinate) GetTile(zoom uint) Tile
func (GeoCoordinate) GetTileCoordinate ¶
func (g GeoCoordinate) GetTileCoordinate(zoom uint) TileCoordinate
func (GeoCoordinate) IsValid ¶
func (g GeoCoordinate) IsValid() bool
func (GeoCoordinate) Normalize ¶
func (g GeoCoordinate) Normalize() GeoCoordinate
func (GeoCoordinate) String ¶
func (g GeoCoordinate) String() string
type Tile ¶
type Tile struct { Zoom uint `validate:"gte=0,lte=18,required"` X uint `json:"tile_x" validate:"required"` Y uint `json:"tile_y" validate:"required"` }
For the definition of Tile struct, see: https://maps.gsi.go.jp/development/siyou.html#siyou-url .
func (Tile) ToBorderMapURL ¶
type TileCoordinate ¶
type TileCoordinate struct { Zoom uint `validate:"gte=0,lte=18,required"` X float64 `json:"tilecoordinate_x" validate:"required"` Y float64 `json:"tilecoordinate_y" validate:"required"` }
func (TileCoordinate) GetTile ¶
func (tc TileCoordinate) GetTile() Tile
func (TileCoordinate) IsValid ¶
func (tc TileCoordinate) IsValid() bool
func (TileCoordinate) String ¶
func (tc TileCoordinate) String() string
func (TileCoordinate) ToGeoCoordinate ¶
func (tc TileCoordinate) ToGeoCoordinate() GeoCoordinate
Source Files ¶
Click to show internal directories.
Click to hide internal directories.