Guest User

Untitled

a guest
Dec 2nd, 2016
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.19 KB | None | 0 0
  1. leafletMap = L.map('mapDiv',options)
  2. .setView(defaultLocation, defaultZoom)
  3. //Layer= L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png")
  4. // .addTo(leafletMap);
  5. Layer= L.tileLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}")
  6. .addTo(leafletMap);
  7. L.control.scale({ position: 'bottomleft' }).addTo(leafletMap);
  8.  
  9. var tileOptions = {
  10. maxZoom: 20, // max zoom to preserve detail on
  11. tolerance: 5, // simplification tolerance (higher means simpler)
  12. extent: 4096, // tile extent (both width and height)
  13. buffer: 64, // tile buffer on each side
  14. debug: 0, // logging level (0 to disable, 1 or 2)
  15.  
  16. indexMaxZoom: 21, // max zoom in the initial tile index
  17. indexMaxPoints: 100000, // max number of points per tile in the index
  18. };
  19. //-------------------------------------------------
  20. }
  21. if(tileLayer !=null)
  22. {
  23. leafletMap.removeLayer(tileLayer);
  24. }
  25. tileIndex = geojsonvt(data, tileOptions);
  26.  
  27.  
  28.  
  29. tileLayer = L.canvasTiles()
  30. .params({ debug: false, padding: 5 })
  31. .drawing(drawingOnCanvas)
Add Comment
Please, Sign In to add comment