mirror of
https://github.com/hyperknot/openfreemap.git
synced 2026-05-21 14:02:15 +00:00
website work
This commit is contained in:
28
website/map.html
Normal file
28
website/map.html
Normal file
@@ -0,0 +1,28 @@
|
||||
<div id="map"></div>
|
||||
|
||||
<script>
|
||||
const map = new maplibregl.Map({
|
||||
style: "https://tiles.openfreemap.org/styles/liberty",
|
||||
center: [-74.5, 40],
|
||||
zoom: 9,
|
||||
container: "map",
|
||||
});
|
||||
|
||||
let nav = new maplibregl.NavigationControl({showCompass:false});
|
||||
map.addControl(nav, 'top-right');
|
||||
|
||||
|
||||
let scale = new maplibregl.ScaleControl({
|
||||
maxWidth: 80,
|
||||
unit: 'imperial'
|
||||
});
|
||||
map.addControl(scale);
|
||||
|
||||
scale.setUnit('metric');
|
||||
|
||||
|
||||
let marker = new maplibregl.Marker()
|
||||
.setLngLat([30.5, 50.5])
|
||||
.addTo(map);
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user