protomaps

package module
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2021 License: BSD-3-Clause Imports: 9 Imported by: 6

README

go-http-protomaps

Go HTTP middleware for the Protomaps Leaflet package.

Documentation

Documentation remains to be written. In the meantime have a look at the cmd/example/main.go application.

See also

Documentation

Index

Constants

This section is empty.

Variables

View Source
var INCLUDE_LEAFLET = true

Functions

func AppendAssetHandlers

func AppendAssetHandlers(mux *http.ServeMux) error

func AppendAssetHandlersWithPrefix

func AppendAssetHandlersWithPrefix(mux *http.ServeMux, prefix string) error

func AppendResourcesHandler

func AppendResourcesHandler(next http.Handler, opts *ProtomapsOptions) http.Handler

func AppendResourcesHandlerWithPrefix

func AppendResourcesHandlerWithPrefix(next http.Handler, opts *ProtomapsOptions, prefix string) http.Handler

func AssetsHandler

func AssetsHandler() (http.Handler, error)

func AssetsHandlerWithPrefix

func AssetsHandlerWithPrefix(prefix string) (http.Handler, error)

func FileHandlerFromPath added in v0.0.3

func FileHandlerFromPath(path string, prefix string) (string, http.Handler, error)

FileHandlerFromPath will take a path and create a http.FileServer handler instance for the files in its root directory. The handler is returned with a relative URI for the filename in 'path' to be assigned to a net/http ServeMux instance.

Types

type ProtomapsOptions

type ProtomapsOptions struct {
	JS      []string
	CSS     []string
	TileURL string
}

func DefaultProtomapsOptions

func DefaultProtomapsOptions() *ProtomapsOptions

Directories

Path Synopsis
cmd
example command

Jump to

Keyboard shortcuts

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