Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- leafletMap = L.map('mapDiv',options)
- .setView(defaultLocation, defaultZoom)
- //Layer= L.tileLayer("http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png")
- // .addTo(leafletMap);
- Layer= L.tileLayer("http://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}")
- .addTo(leafletMap);
- L.control.scale({ position: 'bottomleft' }).addTo(leafletMap);
- var tileOptions = {
- maxZoom: 20, // max zoom to preserve detail on
- tolerance: 5, // simplification tolerance (higher means simpler)
- extent: 4096, // tile extent (both width and height)
- buffer: 64, // tile buffer on each side
- debug: 0, // logging level (0 to disable, 1 or 2)
- indexMaxZoom: 21, // max zoom in the initial tile index
- indexMaxPoints: 100000, // max number of points per tile in the index
- };
- //-------------------------------------------------
- }
- if(tileLayer !=null)
- {
- leafletMap.removeLayer(tileLayer);
- }
- tileIndex = geojsonvt(data, tileOptions);
- tileLayer = L.canvasTiles()
- .params({ debug: false, padding: 5 })
- .drawing(drawingOnCanvas)
Add Comment
Please, Sign In to add comment