Documentation ¶
Index ¶
- Constants
- func ParseColor(colorStr string) (*color.RGBA, error)
- func ParseHexColor(hexColor string) (*color.RGBA, error)
- func ParseRGBAColor(rgbaColor string) (*color.RGBA, error)
- type Config
- func (c *Config) GetFillColor() (*color.RGBA, error)
- func (c *Config) GetLandFillColor() (*color.RGBA, error)
- func (c *Config) GetLandStrokeColor() (*color.RGBA, error)
- func (c *Config) GetLandStrokeWidth() (float64, error)
- func (c *Config) GetStyles() *StyleConfig
- func (c *Config) Parse(source []byte) error
- func (c *Config) ParseFile(filename string) error
- func (c *Config) Query(attribute, value string) (*FeatureStyle, error)
- func (c *Config) QueryId(wayId int64) (*FeatureStyle, error)
- func (c *Config) ShowAll() bool
- type FeatureQuery
- type FeatureStyle
- type FeatureStyleMap
- type LandStyle
- type StyleConfig
Constants ¶
View Source
const NOT_LOADED_ERR = "no loaded styles were found"
View Source
const NO_STYLE_ERR = "no corresponding style found"
Variables ¶
This section is empty.
Functions ¶
func ParseHexColor ¶
ParseHexColor returns a color type which was parsed from a raw hex color string. Adapted from here: https://stackoverflow.com/questions/54197913/parse-hex-string-to-image-color
Types ¶
type Config ¶
func (*Config) GetLandStrokeWidth ¶
func (*Config) GetStyles ¶
func (c *Config) GetStyles() *StyleConfig
type FeatureQuery ¶
type FeatureStyle ¶
type FeatureStyle struct { Queries []FeatureQuery WayIdQueries []int64 `yaml:"way_id_queries"` WayIdExcludes []int64 `yaml:"way_id_excludes"` Exclude []FeatureQuery `yaml:"exclude"` StrokeWidth float64 `yaml:"stroke_width"` StrokeColor string `yaml:"stroke_color"` FillColor string `yaml:"fill_color"` ZIndex int `yaml:"z_index"` Dashed bool }
func (*FeatureStyle) ShouldExclude ¶
ShouldExclude takes in a map of tags (from an OSM Way) and returns whether the style should be excluded or not.
type FeatureStyleMap ¶
type FeatureStyleMap map[string]map[string]*FeatureStyle
type StyleConfig ¶
type StyleConfig struct { FillColor string `yaml:"fill_color"` Land LandStyle ShowAll bool `yaml:"show_all"` Styles []FeatureStyle }
Click to show internal directories.
Click to hide internal directories.