Skip to content

Commit

Permalink
update to protomaps.js v0.1.0 per issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisaaronland committed Apr 30, 2021
1 parent 34009ed commit c283114
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3,600 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

![](docs/images/go-http-leaflet-protomaps-sfo.png)

`go-http-protomaps` is an HTTP middleware package for including Protomaps.js assets in web applications.
`go-http-protomaps` is an HTTP middleware package for including Protomaps.js (v0.1.0) assets in web applications.

## Documentation

Expand Down
7 changes: 1 addition & 6 deletions cmd/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,9 @@
var tile_url = document.body.getAttribute("data-protomaps-tile-url");

const map = L.map('map');

const p = new pmtiles.PMTiles(tile_url);

console.log("P", p);

p.metadata().then(m => {

console.log("HELLO");
p.metadata(m => {
let bounds_str = m.bounds.split(',')
let bounds = [[+bounds_str[1],+bounds_str[0]],[+bounds_str[3],+bounds_str[2]]]
layer = new protomaps.LeafletLayer({url:p, bounds:bounds})
Expand Down
2 changes: 1 addition & 1 deletion protomaps.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func DefaultProtomapsOptions() *ProtomapsOptions {
opts := &ProtomapsOptions{
CSS: []string{},
JS: []string{
"/javascript/protomaps.js",
"/javascript/protomaps.min.js",
"/javascript/pmtiles.js",
},
}
Expand Down
Loading

0 comments on commit c283114

Please sign in to comment.