staticmap

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Apr 15, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

staticmap assists with https://developers.google.com/maps/documentation/maps-static/start

staticmap assists with https://developers.google.com/maps/documentation/maps-static/start

Index

Constants

View Source
const (
	SizeTiny  = "tiny"
	SizeMid   = "mid"
	SizeSmall = "small"

	ColorBlack  = "black"
	ColorBlue   = "blue"
	ColorBrown  = "brown"
	ColorGray   = "gray"
	ColorGreen  = "green"
	ColorOrange = "orange"
	ColorRed    = "red"
	ColorPurple = "purple"
	ColorWhite  = "white"
	ColorYellow = "yellow"
)
View Source
const (
	DefaultSize = "500x500"
	DefaultZoom = 5
	APIURL      = "https://maps.googleapis.com/maps/api/staticmap"

	ParamCenter  = "center"
	ParamKey     = "key"
	ParamMarkers = "markers"
	ParamSize    = "size"
	ParamZoom    = "zoom"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Markers

type Markers struct {
	Size    string
	Color   string
	Label   string // if not empty, must be `^[0-9A=Z]$/
	LatLngs []latlng.LatLng
}

func (*Markers) String

func (m *Markers) String(latLngPrecision uint) string

type MarkersMatrix

type MarkersMatrix [][]Markers

func (MarkersMatrix) WriteFilesPNG

func (mm MarkersMatrix) WriteFilesPNG(filenames []string, sm StaticMap, key string) error

type MarkersSlice

type MarkersSlice []Markers

type StaticMap

type StaticMap struct {
	Center          *latlng.LatLng
	Zoom            uint
	Height          uint
	Width           uint
	MarkersList     []Markers
	LatLngPrecision uint
}

func (*StaticMap) SetDefaultEU

func (sm *StaticMap) SetDefaultEU()

func (*StaticMap) SetDefaultUSAKHI

func (sm *StaticMap) SetDefaultUSAKHI()

func (*StaticMap) SetDefaultUSContiguous

func (sm *StaticMap) SetDefaultUSContiguous()

func (*StaticMap) SetDefaultWorld

func (sm *StaticMap) SetDefaultWorld()

func (*StaticMap) Size

func (sm *StaticMap) Size() string

func (*StaticMap) URL

func (sm *StaticMap) URL(key string) string

func (*StaticMap) WriteFilePNG

func (sm *StaticMap) WriteFilePNG(filename, key string) error

Jump to

Keyboard shortcuts

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