Documentation ¶
Overview ¶
Package nzmap is for drawing large scale context maps in SVG format of the New Zealand region. There are no external dependencies.
Calling code can draw markers on the maps as required. The closing </svg> tag must also be added.
var b bytes.Buffer var pts nzmap.Points pts.Medium(b) for _, p := range pts { if p.Visible() { b.WriteString(fmt.Sprintf("<path d=\"M%d %d l5 0 l-5 -8 l-5 8 Z\" stroke-width=\"0\" fill=\"blue\" opacity=\"0.7\"></path>", p.X(), p.Y())) } } b.WriteString("</svg>")
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Point ¶
type Point struct {
Longitude, Latitude float64
Value float64 // Points can be sorted by Value.
Stroke, Fill, Opacity string // Optional for any later drawing funcs
Size int // Optional for any later drawing funcs
// contains filtered or unexported fields
}
func (*Point) Icon ¶
Icon selects a small low resolution coastline map of New Zealand, and possibly surrounding regions, that is suitable for icon size maps.
func (*Point) Visible ¶
Visible returns true if p is visible on the SVG canvas. Icon() or Map() must be called to set this value.
Click to show internal directories.
Click to hide internal directories.