Skip to content

Commit

Permalink
globe
Browse files Browse the repository at this point in the history
  • Loading branch information
itanka9 committed Jan 31, 2025
1 parent f69404c commit 3782c8a
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions src/globe/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>MapGL Globe</title>
<meta name="description" content="Getting into Globe with MapGL" />
<meta name="category" content="Globe" />
<style>
html,
body,
#container {
margin: 0;
width: 100%;
height: 100%;
overflow: hidden;
}
</style>
</head>
<body>
<div id="container"></div>
<script src="https://mapgl.2gis.com/api/js/v0.0.360"></script>
<script>
const map = new mapgl.Map('container', {
center: [0, 25.23584],
zoom: 3,
zoomControl: false,
// API key can be used on 2gis.github.io/mapgl-examples only!
key: 'f1e71868-5c3d-4743-825c-90485bebbef4',
style: 'c080bb6a-8134-4993-93a1-5b4d8c36a59b',
styleState: { globeEnabled: true }
});

function move () {
const c = map.getCenter();
let x = c[0] + 18;
map.setCenter([x, c[1]], { duration: 6000, normalize: false });
}

move(); setInterval(move, 6000);
</script>
</body>
</html>
Binary file added src/globe/preview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3782c8a

Please sign in to comment.