mapillary-js/examples/doc/viewer-from-map.html
Oscar Lorentzon ee05699636 chore: upgrade doc dependencies and three
Simplify import handling. Import three examples correctly.
Install three in doc project to avoid linting issues.
2021-08-02 10:42:27 +02:00

51 lines
1.3 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>Viewer From Map</title>
<link rel="icon" href="data:," />
<meta charset="utf-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=no"
/>
<link rel="stylesheet" href="/dist/mapillary.css" />
<link
rel="stylesheet"
href="/node_modules/mapbox-gl/dist/mapbox-gl.css"
/>
<script src="/node_modules/mapbox-gl/dist/mapbox-gl.js"></script>
<style>
body {
margin: 0;
padding: 0;
}
html,
body,
.viewer {
width: 100%;
height: 100%;
}
</style>
</head>
<body>
<script type="module">
import {
accessToken,
mapboxAccessToken,
} from "/doc-src/.access-token/token.js";
import { init } from "/doc-src/src/js/examples/viewer-from-map.js";
const container = document.createElement("div");
container.className = "viewer";
document.body.appendChild(container);
init({ accessToken, mapboxAccessToken, container });
</script>
</body>
</html>