Documentation ¶
Index ¶
- Variables
- func ConfigFonts() string
- func ConfigPlugins() string
- func RegisterDatasources(path string) error
- func RegisterFonts(path string) error
- func SetLogLevel(level LogLevel)
- func Version() string
- type ImageFormat
- type LogLevel
- type Map
- func (m *Map) Free()
- func (m *Map) Load(stylesheetFile string) error
- func (m *Map) LoadString(stylesheet string) error
- func (m *Map) Projection() *Projection
- func (m *Map) Render(opts RenderOpts) ([]byte, error)
- func (m *Map) RenderToFile(path string) error
- func (m *Map) Resize(width, height uint32)
- func (m *Map) SRS() string
- func (m *Map) SetBufferSize(s int)
- func (m *Map) SetMaxConnections(count int)
- func (m *Map) SetSRS(srs string)
- func (m *Map) Zoom(minx, miny, maxx, maxy float64)
- func (m *Map) ZoomAll() error
- type Projection
- type RenderOpts
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrMapnikError = errors.New("mapnik")
Functions ¶
func ConfigFonts ¶
func ConfigFonts() string
func ConfigPlugins ¶
func ConfigPlugins() string
func RegisterDatasources ¶
func RegisterFonts ¶
func SetLogLevel ¶
func SetLogLevel(level LogLevel)
Types ¶
type ImageFormat ¶
type ImageFormat string
const ( Png256 ImageFormat = "png256" Jpeg100 ImageFormat = "jpeg100" Jpeg80 ImageFormat = "jpeg80" )
func (ImageFormat) String ¶
func (f ImageFormat) String() string
type Map ¶
type Map struct {
// contains filtered or unexported fields
}
func (*Map) LoadString ¶
LoadString initializes the map not from a file but from a stylesheet provided as a string.
func (*Map) Projection ¶
func (m *Map) Projection() *Projection
func (*Map) Render ¶
func (m *Map) Render(opts RenderOpts) ([]byte, error)
Render returns the map as an encoded image.
func (*Map) RenderToFile ¶
func (*Map) SetBufferSize ¶
func (*Map) SetMaxConnections ¶
type Projection ¶
type Projection struct {
// contains filtered or unexported fields
}
Projection from one reference system to the other.
func (Projection) Forward ¶
func (p Projection) Forward(x, y float64) (_x, _y float64)
func (*Projection) Free ¶
func (p *Projection) Free()
type RenderOpts ¶
type RenderOpts struct { Scale float64 ScaleFactor float64 Format ImageFormat // Format for the image ('jpeg80', 'png256', etc.) }
Click to show internal directories.
Click to hide internal directories.