Skip to content

Instantly share code, notes, and snippets.

@sheeeng
Last active May 20, 2025 13:21
Show Gist options
  • Save sheeeng/2c55d5ed236781512cf54393134480b8 to your computer and use it in GitHub Desktop.
Save sheeeng/2c55d5ed236781512cf54393134480b8 to your computer and use it in GitHub Desktop.
[GeoJSON] 嚴島神社 大鳥居 (The Great Torii of Itsukushima Shrine)
<!DOCTYPE html>
<html>
<head>
<title>Itsukushima Torii Map</title>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" />
<style>
#map { height: 400px; width: 100%; }
</style>
</head>
<body>
<div id="map"></div>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script>
<script>
const map = L.map('map').setView([34.297510, 132.318146], 18);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>'
}).addTo(map);
// Load GeoJSON from the Gist
fetch('https://gist.githubusercontent.com/sheeeng/2c55d5ed236781512cf54393134480b8/raw/the_great_torii_of_itsukushima_shrine.geojson')
.then(res => res.json())
.then(data => {
L.geoJSON(data, {
pointToLayer: (feature, latlng) => {
return L.marker(latlng).bindPopup(feature.properties.name);
}
}).addTo(map);
});
</script>
</body>
</html>
Display the source blob
Display the rendered blob
Raw
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"name": "嚴島神社 大鳥居 (The Great Torii of Itsukushima Shrine)",
"description": "The iconic floating torii gate of Itsukushima Shrine, Miyajima, Japan.",
"height": "16.6 meters",
"tide_info": "Submerged at high tide, fully visible at low tide.",
"heritage_status": "UNESCO World Heritage Site"
},
"geometry": {
"type": "Point",
"coordinates": [132.31814583531204, 34.297510217328146]
}
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment