styling

package
v0.0.0-...-14f1a14 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: LGPL-2.1 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const BUILTIN_STYLEID = "__ownmap_builtin"

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomBasicStyle

type CustomBasicStyle struct{}

func (*CustomBasicStyle) GetBackground

func (*CustomBasicStyle) GetBackground() color.Color

func (*CustomBasicStyle) GetNodeStyle

func (*CustomBasicStyle) GetNodeStyle(node *ownmap.OSMNode, zoomLevel ownmap.ZoomLevel) (*NodeStyle, errorsx.Error)

func (*CustomBasicStyle) GetRelationStyle

func (s *CustomBasicStyle) GetRelationStyle(relationData *ownmap.RelationData, zoomLevel ownmap.ZoomLevel) (*RelationStyle, errorsx.Error)

func (*CustomBasicStyle) GetStyleID

func (*CustomBasicStyle) GetStyleID() string

func (*CustomBasicStyle) GetWantedObjects

func (*CustomBasicStyle) GetWantedObjects(zoomLevel ownmap.ZoomLevel) []*ownmapdal.TagKeyWithType

func (*CustomBasicStyle) GetWayStyle

func (*CustomBasicStyle) GetWayStyle(tags []*ownmap.OSMTag, zoomLevel ownmap.ZoomLevel) (*WayStyle, errorsx.Error)

type ItemStyle

type ItemStyle interface {
	GetZIndex() int
}

type NodeStyle

type NodeStyle struct {
	TextSize  int
	TextColor color.Color
	ZIndex    int
}

func (*NodeStyle) GetZIndex

func (ns *NodeStyle) GetZIndex() int

type RelationStyle

type RelationStyle struct {
	ZIndex int
}

func (*RelationStyle) GetZIndex

func (rs *RelationStyle) GetZIndex() int

type Style

type Style interface {
	GetNodeStyle(node *ownmap.OSMNode, zoomLevel ownmap.ZoomLevel) (*NodeStyle, errorsx.Error)
	GetWayStyle(tags []*ownmap.OSMTag, zoomLevel ownmap.ZoomLevel) (*WayStyle, errorsx.Error)
	GetRelationStyle(relationData *ownmap.RelationData, zoomLevel ownmap.ZoomLevel) (*RelationStyle, errorsx.Error)
	GetBackground() color.Color
	GetStyleID() string
	GetWantedObjects(zoomLevel ownmap.ZoomLevel) []*ownmapdal.TagKeyWithType
}

type StyleSet

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

func NewStyleSet

func NewStyleSet(styles []Style, defaultStyleID string) (*StyleSet, errorsx.Error)

func (*StyleSet) GetAllStyleIDs

func (s *StyleSet) GetAllStyleIDs() []string

func (*StyleSet) GetDefaultStyle

func (s *StyleSet) GetDefaultStyle() Style

func (*StyleSet) GetStyleByID

func (s *StyleSet) GetStyleByID(id string) Style

type WayStyle

type WayStyle struct {
	FillColor      color.Color
	LineColor      color.Color
	LineDashPolicy []float64
	LineWidth      float64
	ZIndex         int
}

func (*WayStyle) GetZIndex

func (ws *WayStyle) GetZIndex() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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