Guest User

Untitled

a guest
Jan 18th, 2019
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. var mapSW = [0, 4096],
  2. mapNE = [4096, 0];
  3. var map = L.map('map').setView([0,0],1);
  4. L.tileLayer('maps/emptyGrid/{z}/{x}/{y}.png', {
  5. minZoom: 1,
  6. maxZoom: 4,
  7. continousWorld: false,
  8. noWrap:true,
  9. crs: L.CRS.Simple,
  10. }).addTo(map)
  11.  
  12. map.setMaxBounds(new L.LatLngBounds(
  13. map.unproject(mapSW, map.getMaxZoom()),
  14. map.unproject(mapNE, map.getMaxZoom())
  15. ));
Add Comment
Please, Sign In to add comment