kopia lustrzana https://github.com/altilunium/vmap
31 wiersze
899 B
HTML
31 wiersze
899 B
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset='utf-8' />
|
|
<title>OpenMapTiles OSM Bright style</title>
|
|
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
|
|
<script src='maplibre-gl.js'></script>
|
|
<link href='maplibre-gl.css' rel='stylesheet' />
|
|
<script src="pmtiles-2.5.0.js"></script>
|
|
|
|
|
|
<style>
|
|
body { margin:0; padding:0; }
|
|
#map { position:absolute; top:0; bottom:0; width:100%; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id='map'></div>
|
|
<script>
|
|
let protocol = new pmtiles.Protocol();
|
|
maplibregl.addProtocol("pmtiles",protocol.tile);
|
|
console.log(maplibregl)
|
|
var map = new maplibregl.Map({
|
|
container: 'map',
|
|
style: 'styles/maptiler-basic.json',
|
|
center: [106.99811303126697,-6.295502009348816],
|
|
zoom: 11
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |