mirror of
https://github.com/mapillary/mapillary-js.git
synced 2026-01-18 13:56:53 +00:00
54 lines
1.1 KiB
HTML
54 lines
1.1 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
|
|
<head>
|
|
<title>MapillaryJS Data Provider</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" />
|
|
<script src="dist/mapillary.js"></script>
|
|
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
}
|
|
|
|
html,
|
|
body {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
#mly {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<div id="mly"></div>
|
|
|
|
<script>
|
|
class MyDataProvder extends Mapillary.API.FalcorDataProvider {
|
|
constructor(options) { super(options); }
|
|
getImageTile() { return Promise.reject(new Error("Error")); }
|
|
}
|
|
|
|
const clientId = "QjI1NnU0aG5FZFZISE56U3R5aWN4ZzpkYzg0NzE3MDA0YTRhZjlh";
|
|
const viewer = new Mapillary.Viewer({
|
|
apiClient: new MyDataProvder({ clientToken: clientId }),
|
|
component: { cover: false },
|
|
container: "mly",
|
|
imageId: "zarcRdNFZwg3FkXNcsFeGw",
|
|
});
|
|
|
|
window.addEventListener("resize", function () { viewer.resize(); });
|
|
</script>
|
|
</body>
|
|
|
|
</html>
|