render

package
v0.0.0-...-0f27594 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

package render provides methods for producing map tiles derived from Who's On First records.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RenderSVGWithFeatures

func RenderSVGWithFeatures(ctx context.Context, opts *SVGOptions, features ...*geojson.Feature) error

Render SVG data for one or more geojson.Feature instances.

Types

type SVGOptions

type SVGOptions struct {
	// The size of the tile to render
	TileSize float64 `json:"tile_size"`
	// An optional extent to assign the final SVG output.
	TileExtent *geom.Extent `json:"tile_extent"`
	// A valid io.Writer where SVG data will be written to.
	Writer io.Writer
	// A valid SVG stroke value.
	Stroke string `json:"stroke"`
	// A valid SVG stroke-width value.
	StrokeWidth float64 `json:"stroke_width"`
	// A valid SVG stroke-opacity value.
	StrokeOpacity float64 `json:"stroke_opacity"`
	// A valid SVG fill value.
	Fill string `json:"fill"`
	// A valid SVG fill-opacity value.
	FillOpacity float64 `json:"fill_opacity"`
}

SVGOptions defines common configuration options for the RenderSVGWithFeatures method.

func DefaultSVGOptions

func DefaultSVGOptions() *SVGOptions

DefaultSVGOptions returns default configuration options for using with the DefaultSVGOptions method.

Jump to

Keyboard shortcuts

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