maxbounds example fixes (#4680)
This commit is contained in:
parent
01790eacda
commit
26df85e841
@ -44,8 +44,8 @@
|
||||
});
|
||||
|
||||
var latlngs = L.rectangle(bounds).getLatLngs();
|
||||
L.polyline(latlngs.concat([latlngs[0]])).addTo(map1);
|
||||
L.polyline(latlngs.concat([latlngs[0]])).addTo(map2);
|
||||
L.polyline(latlngs[0].concat(latlngs[0][0])).addTo(map1);
|
||||
L.polyline(latlngs[0].concat(latlngs[0][0])).addTo(map2);
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
@ -30,9 +30,6 @@
|
||||
maxBounds: bounds
|
||||
});
|
||||
|
||||
var latlngs = L.rectangle(bounds).getLatLngs();
|
||||
L.polyline(latlngs.concat([latlngs[0]])).addTo(map);
|
||||
|
||||
map.setMaxBounds(bounds); // Should not enter infinite recursion
|
||||
|
||||
</script>
|
||||
|
@ -30,8 +30,10 @@
|
||||
maxBounds: bounds
|
||||
});
|
||||
|
||||
|
||||
|
||||
var latlngs = L.rectangle(bounds).getLatLngs();
|
||||
L.polyline(latlngs.concat([latlngs[0]])).addTo(map);
|
||||
L.polyline(latlngs[0].concat(latlngs[0][0])).addTo(map);
|
||||
|
||||
map.setMaxBounds(bounds); // Should not enter infinite recursion
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user