diff --git a/map.js b/map.js new file mode 100644 index 0000000..e31ff7d --- /dev/null +++ b/map.js @@ -0,0 +1,80 @@ +data = { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": + { + "type": "Point", + "coordinates": [137.0420547,35.1455654] + }, + "properties": + { + "名称": "岩崎城址公園", + "画像": "iwasaki.jpg" + } + }, + { + "type": "Feature", + "geometry": + { + "type": "Point", + "coordinates": [137.0876883,35.1306941] + }, + "properties": + { + "名称": "愛知牧場", + "画像": "bokujyou.jpg" + } + }, + { + "type": "Feature", + "geometry": + { + "type": "Point", + "coordinates": [137.0682229,35.1557573] + }, + "properties": + { + "名称": "五色園", + "画像": "goshikien.jpg" + } + }, + { + "type": "Feature", + "geometry": + { + "type": "Point", + "coordinates": [137.0221455,35.1228602] + }, + "properties": + { + "名称": "レトロでんしゃ", + "画像": "retro.jpg" + } + }, + { + "type": "Feature", + "geometry": + { + "type": "Point", + "coordinates": [137.033636,35.12896] + }, + "properties": + { + "名称": "旧市川家住宅", + "画像": "ichikawa.jpg" + } + } + ] +} + + +L.geoJSON(data,{ + onEachFeature: function(feature, layer){ + layer.bindPopup( + "

" + feature.properties.名称 + "

" + + "

" + ) + } +}).addTo(mymap);