Skip to content

Commit

Permalink
Merge branch 'main' of github.com:sfomuseum/go-http-protomaps
Browse files Browse the repository at this point in the history
  • Loading branch information
sfomuseumbot committed Dec 23, 2022
2 parents 07f3f71 + 781040b commit 1f94793
Show file tree
Hide file tree
Showing 4 changed files with 3,007 additions and 1,184 deletions.
15 changes: 5 additions & 10 deletions cmd/example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,12 @@
var tile_url = document.body.getAttribute("data-protomaps-tile-url");

const map = L.map('map');
map.setView([37.61799, -122.370943], 14);

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]]]

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

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

new L.Hash(map);
</script>
Expand Down
Binary file modified cmd/example/sfo.pmtiles
Binary file not shown.
Loading

0 comments on commit 1f94793

Please sign in to comment.