Documentation
¶
Index ¶
- Constants
- type Category
- type ClassCategory
- type ColorStopsType
- type ColorType
- type ComparativeFilter
- func (f *ComparativeFilter) GetAllPossibleTagKeys(sourceLayer string) []*ownmapdal.TagKeyWithType
- func (f *ComparativeFilter) IsObjectShown(sourceLayer string, tags []*ownmap.OSMTag, objectFilterType ownmap.ObjectType) bool
- func (f *ComparativeFilter) Operator() string
- func (f *ComparativeFilter) Type() FilterType
- func (cf *ComparativeFilter) UnmarshalJSON(data []byte) error
- type Filter
- type FilterContainer
- type FilterType
- type Layer
- type LayerType
- type Layout
- type Light
- type LogicalFilter
- type MapboxGLStyle
- func (s *MapboxGLStyle) GetBackground() color.Color
- func (s *MapboxGLStyle) GetNodeStyle(node *ownmap.OSMNode, zoomLevel ownmap.ZoomLevel) (*styling.NodeStyle, errorsx.Error)
- func (s *MapboxGLStyle) GetRelationStyle(relationData *ownmap.RelationData, zoomLevel ownmap.ZoomLevel) (*styling.RelationStyle, errorsx.Error)
- func (s *MapboxGLStyle) GetStyleID() string
- func (s *MapboxGLStyle) GetWantedObjects(zoomLevel ownmap.ZoomLevel) []*ownmapdal.TagKeyWithType
- func (s *MapboxGLStyle) GetWayStyle(tags []*ownmap.OSMTag, zoomLevel ownmap.ZoomLevel) (*styling.WayStyle, errorsx.Error)
- type Metadata
- type NumberOrFunctionWrapperType
- type NumericFunctionType
- type Paint
- type Source
- type Sources
- type SubClassCategory
- type TagWithObjectTypes
- type Transition
- type TypeCategory
- type UnhandledCategory
Constants ¶
View Source
const ( FilterOperatorEquals = "==" FilterOperatorNotEqual = "!=" FilterOperatorAny = "any" FilterOperatorAll = "all" FilterOperatorIn = "in" FilterOperatorNotIn = "!in" )
View Source
const ( FilterCategoryType = "$type" FilterTypePoint = "Point" FilterTypeLineString = "LineString" FilterTypePolygon = "Polygon" FilterCategoryClass = "class" FilterCategorySubclass = "subclass" FilterCategoryIntermittent = "intermittent" FilterCategoryBrunnel = "brunnel" FilterCategoryAdminLevel = "admin_level" FilterCategoryClaimedBy = "claimed_by" )
View Source
const ( SourceLayerTransportation string = "transportation" SourceLayerWaterway string = "waterway" SourceLayerPlace string = "place" )
https://openmaptiles.org/schema/#transportation
View Source
const ( ObjectTypePoint = "Point" ObjectTypeLineString = "LineString" ObjectTypePolygon = "Polygon" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClassCategory ¶
type ClassCategory struct {
// contains filtered or unexported fields
}
func (ClassCategory) GetAllPossibleTagKeys ¶
func (cc ClassCategory) GetAllPossibleTagKeys(sourceLayer string) []*ownmapdal.TagKeyWithType
func (ClassCategory) Matches ¶
func (cc ClassCategory) Matches(operandIdx int, sourceLayer string, objectTags []*ownmap.OSMTag, objectType ownmap.ObjectType) bool
func (ClassCategory) OperandCount ¶
func (cc ClassCategory) OperandCount() int
type ColorStopsType ¶
type ColorStopsType struct { Stops []*colorStop `json:"stops"` Base *float64 `json:"base"` }
func (*ColorStopsType) GetValueAtZoomLevel ¶
func (c *ColorStopsType) GetValueAtZoomLevel(zoomLevel ownmap.ZoomLevel) color.Color
GetValueAtZoomLevel returns the color at a given zoom level for this item. If no color (i.e. not shown), it returns nil
type ColorType ¶
type ColorType struct {
// contains filtered or unexported fields
}
ColorType is the wrapper struct
func (*ColorType) GetColorAtZoomLevel ¶
GetColorAtZoomLevel returns the color at a given zoom level. If there is no color, or if the zoom level doesn't match any of the color definitions, it will return nil
func (*ColorType) UnmarshalJSON ¶
type ComparativeFilter ¶
type ComparativeFilter struct {
// contains filtered or unexported fields
}
func (*ComparativeFilter) GetAllPossibleTagKeys ¶
func (f *ComparativeFilter) GetAllPossibleTagKeys(sourceLayer string) []*ownmapdal.TagKeyWithType
func (*ComparativeFilter) IsObjectShown ¶
func (f *ComparativeFilter) IsObjectShown(sourceLayer string, tags []*ownmap.OSMTag, objectFilterType ownmap.ObjectType) bool
func (*ComparativeFilter) Operator ¶
func (f *ComparativeFilter) Operator() string
func (*ComparativeFilter) Type ¶
func (f *ComparativeFilter) Type() FilterType
func (*ComparativeFilter) UnmarshalJSON ¶
func (cf *ComparativeFilter) UnmarshalJSON(data []byte) error
type Filter ¶
type Filter interface { Type() FilterType Operator() string GetAllPossibleTagKeys(sourceLayer string) []*ownmapdal.TagKeyWithType IsObjectShown(sourceLayer string, tags []*ownmap.OSMTag, objectFilterType ownmap.ObjectType) bool }
type FilterContainer ¶
type FilterContainer struct {
// contains filtered or unexported fields
}
func (FilterContainer) GetTagKeysToFetch ¶
func (f FilterContainer) GetTagKeysToFetch(sourceLayer string) []*ownmapdal.TagKeyWithType
func (FilterContainer) IsObjectShown ¶
func (f FilterContainer) IsObjectShown(sourceLayer string, tags []*ownmap.OSMTag, objectType ownmap.ObjectType) bool
func (*FilterContainer) UnmarshalJSON ¶
func (f *FilterContainer) UnmarshalJSON(data []byte) error
type FilterType ¶
type FilterType int
const ( // FilterTypeLogical is a filter containing 2 (or more) sub-filters FilterTypeLogical FilterType = iota // FilterTypeComparative is a filter containing comparisions on e.g. object classes (it does not contain sub-filters) FilterTypeComparative )
type Layer ¶
type Layer struct { Filter FilterContainer `json:"filter"` ID LayerType `json:"id"` Layout Layout `json:"layout"` MaxZoom *float64 `json:"maxzoom"` Metadata Metadata `json:"metadata"` MinZoom *float64 `json:"minzoom"` Paint *Paint `json:"paint"` Source string `json:"source"` SourceLayer string `json:"source-layer"` Type LayerType `json:"type"` }
func (*Layer) GetLayerNodeStyle ¶
func (*Layer) GetLayerWayStyle ¶
type LayerType ¶
type LayerType string
const ( LayerTypeBackground LayerType = "background" LayerTypeFill LayerType = "fill" LayerTypeLine LayerType = "line" LayerTypeSymbol LayerType = "symbol" LayerTypeRaster LayerType = "raster" LayerTypeCircle LayerType = "circle" LayerTypeFillExtrusion LayerType = "fill-extrusion" LayerTypeHeatmap LayerType = "heatmap" LayerTypeHillshade LayerType = "hillshade" )
type Layout ¶
type Layout struct { Visibility string `json:"visibility"` LineCap string `json:"line-cap"` LineJoin string `json:"line-join"` TextField string `json:"text-field"` TextFont []string `json:"text-font"` TextSize *NumberOrFunctionWrapperType `json:"text-size"` // float64 or {"base": 1.4, "stops": [[10, 8], [20, 14]]} SymbolPlacement interface{} `json:"symbol-placement"` // string or {"base": 1, "stops": [[10, "point"], [11, "line"]]} TextLetterSpacing float64 `json:"text-letter-spacing"` TextRotationAlignment string `json:"text-rotation-alignment"` TextTransform string `json:"text-transform"` IconSize *NumberOrFunctionWrapperType `json:"icon-size"` TextAnchor string `json:"text-anchor"` TextMaxWidth float64 `json:"text-max-width"` TextOffset []float64 `json:"text-offset"` SymbolSpacing float64 `json:"symbol-spacing"` IconImage string `json:"icon-image"` TextPadding float64 `json:"text-padding"` }
type LogicalFilter ¶
type LogicalFilter struct {
// contains filtered or unexported fields
}
func (*LogicalFilter) GetAllPossibleTagKeys ¶
func (f *LogicalFilter) GetAllPossibleTagKeys(sourceLayer string) []*ownmapdal.TagKeyWithType
func (*LogicalFilter) IsObjectShown ¶
func (f *LogicalFilter) IsObjectShown(sourceLayer string, tags []*ownmap.OSMTag, objectFilterType ownmap.ObjectType) bool
func (*LogicalFilter) Operator ¶
func (f *LogicalFilter) Operator() string
func (*LogicalFilter) Type ¶
func (f *LogicalFilter) Type() FilterType
type MapboxGLStyle ¶
type MapboxGLStyle struct {
// contains filtered or unexported fields
}
MapboxGLStyle represents a stylesheet represented in the MapboxGL format. https://docs.mapbox.com/mapbox-gl-js/style-spec/ https://maputnik.github.io/editor
func (*MapboxGLStyle) GetBackground ¶
func (s *MapboxGLStyle) GetBackground() color.Color
func (*MapboxGLStyle) GetNodeStyle ¶
func (*MapboxGLStyle) GetRelationStyle ¶
func (s *MapboxGLStyle) GetRelationStyle(relationData *ownmap.RelationData, zoomLevel ownmap.ZoomLevel) (*styling.RelationStyle, errorsx.Error)
func (*MapboxGLStyle) GetStyleID ¶
func (s *MapboxGLStyle) GetStyleID() string
func (*MapboxGLStyle) GetWantedObjects ¶
func (s *MapboxGLStyle) GetWantedObjects(zoomLevel ownmap.ZoomLevel) []*ownmapdal.TagKeyWithType
type NumberOrFunctionWrapperType ¶
type NumberOrFunctionWrapperType struct {
// contains filtered or unexported fields
}
func (*NumberOrFunctionWrapperType) GetValueAtZoomLevel ¶
func (n *NumberOrFunctionWrapperType) GetValueAtZoomLevel(zoomLevel ownmap.ZoomLevel) float64
func (*NumberOrFunctionWrapperType) UnmarshalJSON ¶
func (n *NumberOrFunctionWrapperType) UnmarshalJSON(data []byte) error
type NumericFunctionType ¶
type NumericFunctionType struct { Type functionTypeName `json:"type"` Base *float64 `json:"base"` // the lowest value possible, if shown? Stops []numericStopType `json:"stops"` }
func (NumericFunctionType) GetValueAtZoomLevel ¶
func (s NumericFunctionType) GetValueAtZoomLevel(zoomLevel ownmap.ZoomLevel) float64
type Paint ¶
type Paint struct { BackgroundColor *ColorType `json:"background-color"` FillColor *ColorType `json:"fill-color"` // for example "hsl(47, 13%, 86%)" FillOpacity *NumberOrFunctionWrapperType `json:"fill-opacity"` FillAntialias interface{} `json:"fill-antialias"` // bool or e.g. {"base": 1, "stops": [[0, false], [9, true]]} LineColor *ColorType `json:"line-color"` LineDashArray []float64 `json:"line-dasharray"` LineGapWidth *NumberOrFunctionWrapperType `json:"line-gap-width"` LineOpacity *NumberOrFunctionWrapperType `json:"line-opacity"` // either float64, or like {"base": 1, "stops": [[11, 0], [16, 1]]} LineOffset *float64 `json:"line-offset"` LineWidth *NumberOrFunctionWrapperType `json:"line-width"` // FillOutlineColor *ColorStopsType `json:"fill-outline-color"` FillOutlineColor *ColorType `json:"fill-outline-color"` FillTranslate interface{} `json:"fill-translate"` FillPattern interface{} `json:"fill-pattern"` TextColor *ColorType `json:"text-color"` TextHaloBlur *float64 `json:"text-halo-blur"` TextHaloColor *ColorType `json:"text-halo-color"` TextHaloWidth *float64 `json:"text-halo-width"` }
type SubClassCategory ¶
type SubClassCategory struct {
// contains filtered or unexported fields
}
func (SubClassCategory) GetAllPossibleTagKeys ¶
func (scc SubClassCategory) GetAllPossibleTagKeys(sourceLayer string) []*ownmapdal.TagKeyWithType
func (SubClassCategory) Matches ¶
func (scc SubClassCategory) Matches(operandIdx int, sourceLayer string, objectTags []*ownmap.OSMTag, objectType ownmap.ObjectType) bool
func (SubClassCategory) OperandCount ¶
func (scc SubClassCategory) OperandCount() int
type TagWithObjectTypes ¶
type TagWithObjectTypes struct { Tag *ownmap.OSMTag ObjectTypes []ownmap.ObjectType }
type Transition ¶
type TypeCategory ¶
type TypeCategory struct {
// contains filtered or unexported fields
}
func (TypeCategory) GetAllPossibleTagKeys ¶
func (TypeCategory) GetAllPossibleTagKeys(sourceLayer string) []*ownmapdal.TagKeyWithType
func (TypeCategory) Matches ¶
func (tc TypeCategory) Matches(operandIdx int, sourceLayer string, objectTags []*ownmap.OSMTag, objectType ownmap.ObjectType) bool
func (TypeCategory) OperandCount ¶
func (tc TypeCategory) OperandCount() int
type UnhandledCategory ¶
type UnhandledCategory struct{}
func (UnhandledCategory) GetAllPossibleTagKeys ¶
func (UnhandledCategory) GetAllPossibleTagKeys(sourceLayer string) []*ownmapdal.TagKeyWithType
func (UnhandledCategory) Matches ¶
func (UnhandledCategory) Matches(operandIdx int, sourceLayer string, objectTags []*ownmap.OSMTag, objectType ownmap.ObjectType) bool
func (UnhandledCategory) OperandCount ¶
func (cc UnhandledCategory) OperandCount() int
Click to show internal directories.
Click to hide internal directories.