(crs)
| 30 | } |
| 31 | }); |
| 32 | function createMap(crs) { |
| 33 | testDiv = window.document.createElement('div'); |
| 34 | testDiv.setAttribute('id', 'map'); |
| 35 | testDiv.style.styleFloat = 'left'; |
| 36 | // testDiv.style.marginLeft = '8px'; |
| 37 | // testDiv.style.marginTop = '50px'; |
| 38 | testDiv.style.width = '500px'; |
| 39 | testDiv.style.height = '500px'; |
| 40 | window.document.body.appendChild(testDiv); |
| 41 | |
| 42 | map = L.map('map', { |
| 43 | preferCanvas: true, |
| 44 | crs: crs || L.CRS.EPSG4326, |
| 45 | center: { lon: 0, lat: 0 }, |
| 46 | maxZoom: 18, |
| 47 | zoom: 1 |
| 48 | }); |
| 49 | tiledMapLayer(url).addTo(map); |
| 50 | return { testDiv, map }; |
| 51 | } |
| 52 | beforeAll(() => { |
| 53 | mockCreateTile(); |
| 54 | }); |
no test coverage detected