Centre map view on spawn marker if left-clicked

This commit is contained in:
Nicolas F
2017-02-19 11:35:34 -05:00
committed by Andrew Chin
parent 9bcf2d5542
commit ebfd40c995
+3
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 {