Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTileHandler ¶
func NewTileHandler(opts *TileHandlerOptions) (http.Handler, error)
NewTileHandler return a new `http.Handler` instance serving MVT vector tiles.
Types ¶
type GetFeaturesCallbackFunc ¶
type GetFeaturesCallbackFunc func(*http.Request, string, *maptile.Tile) (map[string]*geojson.FeatureCollection, error)
GetFeaturesCallbackFunc defines the method signature for custom functions to derive a collection of named `geojson.FeatureCollection` instances for a given tile request.
type TileHandlerOptions ¶
type TileHandlerOptions struct { // GetFeaturesCallback is the `GetFeaturesCallbackFunc` used to derive a collection of named `geojson.FeatureCollection` instances for a given tile request. GetFeaturesCallback GetFeaturesCallbackFunc // Simplify is a boolean flag to signal that tile data should be simplified (using DouglasPeucker) before being returned by the handler. Simplify bool // Timings is a boolean flag to enable logging timing information (using `log/slog.Debug`). Timings bool }
Click to show internal directories.
Click to hide internal directories.