Documentation ¶
Overview ¶
Package globe builds 3D visualizations on the earth.
Index ¶
- Variables
- type Globe
- func (g *Globe) CenterOn(lat, lng float64)
- func (g *Globe) DrawCountryBoundaries(style ...Option)
- func (g *Globe) DrawDot(lat, lng float64, radius float64, style ...Option)
- func (g *Globe) DrawGraticule(interval float64, style ...Option)
- func (g *Globe) DrawLandBoundaries(style ...Option)
- func (g *Globe) DrawLine(lat1, lng1, lat2, lng2 float64, style ...Option)
- func (g *Globe) DrawMeridian(lng float64, style ...Option)
- func (g *Globe) DrawMeridians(interval float64, style ...Option)
- func (g *Globe) DrawParallel(lat float64, style ...Option)
- func (g *Globe) DrawParallels(interval float64, style ...Option)
- func (g *Globe) DrawRect(minlat, minlng, maxlat, maxlng float64, style ...Option)
- func (g *Globe) Image(side int) *image.RGBA
- func (g *Globe) SavePNG(filename string, side int) error
- type Option
- type Style
Constants ¶
This section is empty.
Variables ¶
var DefaultStyle = Style{ GraticuleColor: color.Gray{192}, LineColor: color.Gray{32}, DotColor: color.NRGBA{255, 0, 0, 255}, Background: color.White, LineWidth: 0.1, Scale: 0.7, }
DefaultStyle specifies out-of-the box style options.
Functions ¶
This section is empty.
Types ¶
type Globe ¶
type Globe struct {
// contains filtered or unexported fields
}
Globe is a globe visualization.
func (*Globe) DrawCountryBoundaries ¶
DrawCountryBoundaries draws country boundaries on the globe. Uses the default LineColor unless overridden by style Options.
func (*Globe) DrawDot ¶
DrawDot draws a dot at (lat, lng) with the given radius. Uses the default DotColor unless overridden by style Options.
func (*Globe) DrawGraticule ¶
DrawGraticule draws a latitude/longitude grid at the given interval. Uses the default GraticuleColor unless overridden by style Options.
func (*Globe) DrawLandBoundaries ¶
DrawLandBoundaries draws land boundaries on the globe. Uses the default LineColor unless overridden by style Options.
func (*Globe) DrawLine ¶
DrawLine draws a line between (lat1, lng1) and (lat2, lng2) along the great circle. Uses the default LineColor unless overridden by style Options.
func (*Globe) DrawMeridian ¶
DrawMeridian draws the meridian at longitude lng. Uses the default GraticuleColor unless overridden by style Options.
func (*Globe) DrawMeridians ¶
DrawMeridians draws meridians at the given interval. Uses the default GraticuleColor unless overridden by style Options.
func (*Globe) DrawParallel ¶
DrawParallel draws the parallel of latitude lat. Uses the default GraticuleColor unless overridden by style Options.
func (*Globe) DrawParallels ¶
DrawParallels draws parallels at the given interval. Uses the default GraticuleColor unless overridden by style Options.
func (*Globe) DrawRect ¶
DrawRect draws the rectangle with the given corners. Sides are drawn along great circles, as in DrawLine. Uses the default LineColor unless overridden by style Options.