0

Centre map view on spawn marker if left-clicked

This commit is contained in:
Nicolas F
2016-07-12 18:27:09 +02:00
committed by Andrew Chin
parent 9bcf2d5542
commit ebfd40c995

View File

@@ -139,6 +139,9 @@ overviewer.util = {
ovconf.spawn[2],
ovconf);
var ohaimark = L.marker(latlng, {icon: spawnIcon, title: "Spawn"});
ohaimark.on('click', function(ev) {
overviewer.map.setView(ev.latlng);
});
overviewer.collections.spawnMarker = ohaimark
overviewer.collections.spawnMarker.addTo(overviewer.map);
} else {