MCPcopy Index your code
hub / github.com/SuperMap/iClient-JavaScript / createMap

Function createMap

test/leaflet/overlay/GraphicLayerSpec.js:32–51  ·  view source on GitHub ↗
(crs)

Source from the content-addressed store, hash-verified

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 });

Callers 1

Calls 4

tiledMapLayerFunction · 0.90
createElementMethod · 0.80
mapMethod · 0.80
addToMethod · 0.45

Tested by

no test coverage detected