proxy.golang.org : github.com/sfomuseum/go-http-protomaps : v0.0.6
`go-http-protomaps` is an HTTP middleware package for including Protomaps.js assets in web applications. It exports two principal methods: * `protomaps.AppendAssetHandlers(*http.ServeMux)` which is used to append HTTP handlers to a `http.ServeMux` instance for serving Protomaps JavaScript files, and related assets. * `protomaps.AppendResourcesHandler(http.Handler, *ProtomapsOptions)` which is used to rewrite any HTML produced by previous handler to include the necessary markup to load Protomaps JavaScript files and related assets. Example (Note the way we are embedding the HTML and .pmtiles database as an embed.FS instance)
Registry -
Documentation -
Download -
JSON -
codemeta.json
purl: pkg:golang/github.com/sfomuseum/go-http-protomaps@v0.0.6
Published:
Indexed: