Skip to content

Commit

Permalink
update to support protomaps.js v0.15.0
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisaaronland committed Jul 15, 2021
1 parent 3252680 commit f64d33a
Show file tree
Hide file tree
Showing 4 changed files with 3,310 additions and 2,694 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 (v0.3.5) assets in web applications.
`go-http-protomaps` is an HTTP middleware package for including Protomaps.js (v0.15.0) assets in web applications.

## Documentation

Expand Down
10 changes: 4 additions & 6 deletions cmd/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@

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

// var layer = new protomaps.LeafletLayer({url: tile_url});
// layer.addTo(map);

const p = new protomaps.PMTiles(tile_url);

p.metadata().then(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})
layer.addTo(map)
map.fitBounds(bounds)

var layer = protomaps.leafletLayer({url: tile_url, bounds:bounds});
layer.addTo(map);
map.fitBounds(bounds)
});

new L.Hash(map);
Expand Down
Loading

0 comments on commit f64d33a

Please sign in to comment.