Newer
Older
PastandPresentMap / inosyo / overlay.js
@syotar inoue syotar inoue on 20 Dec 2018 573 bytes overlay.jsを編集
var maps= L.map("map").setView([38.891, 139.824], 16);
L.tileLayer('//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
 attribution:
   '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(maps);

maps.on("click", function(e){ //map click Event
    var popup = L.popup()
    .setLatLng(e.latlng) //
    .setContent('<h1>ここの位置情報だよ</h1><p>'+e.latlng+'</p>')
    .openOn(maps);

});

L.marker([38.899011,139.818411]).bindPopup("nyaaaaaa").addTo(maps);

L.marker([38.904439,139.828604 ]).bindPopup("<h1>noguso</h1>").addTo(maps);