Skip to content

Commit

Permalink
update docs; add LeafletLayer example in JS (disabled)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisaaronland committed May 11, 2021
1 parent 51e7c7a commit 89db3c3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 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.1.0) assets in web applications.
`go-http-protomaps` is an HTTP middleware package for including Protomaps.js (v0.2.0) assets in web applications.

## Documentation

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

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 => {
Expand All @@ -24,7 +28,7 @@
layer.addTo(map)
map.fitBounds(bounds)
});

new L.Hash(map);
</script>
</body>
Expand Down

0 comments on commit 89db3c3

Please sign in to comment.