slippy trials

This commit is contained in:
Expo on server
2024-05-16 19:50:28 +01:00
parent 26566cafad
commit fe7e3dbc5a
30 changed files with 2945 additions and 1 deletions

1
map/test2/apikey Normal file
View File

@@ -0,0 +1 @@
yBwA37PS2BsXxx7WM9Rr

12
map/test2/index.html Normal file
View File

@@ -0,0 +1,12 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Quick Start</title>
</head>
<body>
<div id="map"></div>
<script type="module" src="./main.js"></script>
</body>

18
map/test2/main.js Normal file
View File

@@ -0,0 +1,18 @@
import './style.css';
import Map from '/javascript/ol/Map.js';
import OSM from '/javascript/ol/source/OSM.js';
import TileLayer from '/javascript/ol/layer/Tile.js';
import View from '/javascript/ol/View.js';
const map = new Map({
target: 'map',
layers: [
new TileLayer({
source: new OSM(),
}),
],
view: new View({
center: [0, 0],
zoom: 2,
}),
});

14
map/test2/style.css Normal file
View File

@@ -0,0 +1,14 @@
@import "/javascript/ol/ol.css";
html,
body {
margin: 0;
height: 100%;
}
#map {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
}