mapping

package
v0.0.0-...-518b87e Latest Latest
Warning

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

Go to latest
Published: Dec 8, 2015 License: BSD-2-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Datasource

type Datasource struct {
	Type   string `xml:"type,attr"`
	Format string `xml:"format,attr"`
	Val    string `xml:"name,attr"`
	Query  string `xml:"Query"`
}

type Include

type Include struct {
	XMLName xml.Name `xml:"Include"`
	Styles  []*Style `xml:"Style"`
	Layers  []*Layer `xml:"Layer"`
}

type Layer

type Layer struct {
	// contains filtered or unexported fields
}

func (*Layer) LoadSource

func (l *Layer) LoadSource() sources.DataSource

func (*Layer) SourceQuery

func (l *Layer) SourceQuery() string

TODO: remove this, this is just to keep compatibility while I'm refactoring

func (*Layer) Styles

func (l *Layer) Styles() []string

func (*Layer) UnmarshalXML

func (l *Layer) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Map

type Map struct {
	XMLName xml.Name `xml:"Map"`
	Styles  []*Style `xml:"Style"`
	Layers  []*Layer `xml:"Layer"`

	Stroke  color.Hex `xml:"stroke,attr"`
	BgColor color.Hex `xml:"bgcolor,attr"`

	Srs proj.Projection `xml:"srs,attr"`
	// contains filtered or unexported fields
}

func NewMap

func NewMap(path string) (*Map, error)

func (*Map) Bounds

func (m *Map) Bounds() geom.Bbox

func (*Map) FindStyle

func (m *Map) FindStyle(name string) *Style

func (*Map) UnmarshalXML

func (m *Map) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type PathSymbolizer

type PathSymbolizer struct {
	Weight float64   `xml:"width,attr" default:"0.5"`
	Stroke color.Hex `xml:"stroke,attr"`
}

func (*PathSymbolizer) Name

func (s *PathSymbolizer) Name() string

type PolygonSymbolizer

type PolygonSymbolizer struct {
	Fill color.Hex `xml:"fill,attr"`
}

func (*PolygonSymbolizer) Name

func (s *PolygonSymbolizer) Name() string

type Rule

type Rule struct {
	Filter      string
	Symbolizers map[util.SymbolizerType]Symbolizer
}

func (*Rule) UnmarshalXML

func (r *Rule) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error

type Style

type Style struct {
	Name  string  `xml:"name,attr"`
	Rules []*Rule `xml:"Rule"`
}

func (*Style) String

func (s *Style) String() string

type Symbolizer

type Symbolizer interface {
	Name() string
}

type TextSymbolizer

type TextSymbolizer struct {
	Size float64   `xml:"size,attr"`
	Fill color.Hex `xml:"fill,attr"`
	Attr string    `xml:"name,attr"`
}

func (*TextSymbolizer) Name

func (s *TextSymbolizer) Name() string

Jump to

Keyboard shortcuts

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