]> git.openstreetmap.org Git - chef.git/commitdiff
imagery: enable worldCopyJump in leaflet
authorGrant Slater <git@firefishy.com>
Wed, 22 Jul 2020 23:10:04 +0000 (00:10 +0100)
committerGrant Slater <git@firefishy.com>
Wed, 22 Jul 2020 23:10:04 +0000 (00:10 +0100)
cookbooks/imagery/templates/default/imagery.js.erb

index b42705d70c8c3bdf1f0b42b7a835de8e6c5c3123..607e6e8fe3a11090e8e22afd31f23ee9d60c6eb3 100644 (file)
@@ -1,6 +1,8 @@
 function createMap(divName) {
   // Create a map
-  var map = L.map(divName).fitBounds(<%= @bbox.to_json %>);
+  var map = L.map(divName, {
+    worldCopyJump: true
+  }).fitBounds(<%= @bbox.to_json %>);
 
   // Create a layer switcher
   var layers = L.control.layers(null, null, {collapsed:false}).addTo(map);