Skip to content

Commit

Permalink
deploy: c530f52
Browse files Browse the repository at this point in the history
  • Loading branch information
Bigismall committed Dec 8, 2024
1 parent 0dae026 commit 9f25e7c
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 0 deletions.
41 changes: 41 additions & 0 deletions osmbuildings/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<!DOCTYPE html>
<html lang="en">
<head>
<title>OSM Buildings</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<style>
html, body {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
}

#map {
width: 100%;
height: 100%;
}

</style>
<link rel="stylesheet" href="osmbuildings.css">
<script src="osmbuildings.js"></script>
</head>

<body>
<div id="map"></div>
<script>
const osmb = new OSMBuildings({
container: 'map',
zoom: 16,
minZoom: 16,
maxZoom: 19,
position: { latitude: 54.374705, longitude: 18.46673 },
state: true, // stores map position/rotation in url
attribution: '© 3D <a href="https://osmbuildings.org/copyright/">OSM Buildings</a>'
});
osmb.addMapTiles('https://tile.openstreetmap.de/{z}/{x}/{y}.png');
osmb.addGeoJSONTiles('https://{s}.data.osmbuildings.org/0.2/59fcc2e8/tile/{z}/{x}/{y}.json');
</script>
</body>
</html>
52 changes: 52 additions & 0 deletions osmbuildings/osmbuildings.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@

.osmb {
position: relative;
width: 100%;
height: 100%;
cursor: default;
}

.osmb-viewport {
width: 100%;
height: 100%;
}

.osmb-attribution {
position: absolute;
right: 0;
bottom: 0;
padding: 1px 3px;
background: rgba(255, 255, 255, 0.5);
font: 11px sans-serif;
z-index: 10;
white-space: nowrap;
text-overflow: ellipsis;
overflow: hidden;
max-width: 100%;
}

@media screen and (max-width: 480px) {
.osmb-attribution {
right: auto;
left: 0;
}
}

.osmb-attribution a {
text-decoration: none;
color: #0078A8;
}

.osmb-attribution a:visited {
text-decoration: none;
color: #0078A8;
}

.osmb-attribution a:hover {
text-decoration: underline;
color: #0078A8;
}

.osmb-popup {
position: absolute;
}
1 change: 1 addition & 0 deletions osmbuildings/osmbuildings.js

Large diffs are not rendered by default.

0 comments on commit 9f25e7c

Please sign in to comment.