(container)
| 269 | } |
| 270 | |
| 271 | function initCanvas(container) { |
| 272 | const devicePixelRatio = window.devicePixelRatio || 1; |
| 273 | container.width = width * devicePixelRatio; |
| 274 | container.height = height * devicePixelRatio; |
| 275 | container.style.width = `${width}px`; |
| 276 | container.style.height = `${height}px`; |
| 277 | container.getContext("2d").scale(devicePixelRatio, devicePixelRatio); |
| 278 | } |
| 279 | |
| 280 | export function initMap(staticContainer, dynamicContainer, mapWidth, mapHeight, mode) { |
| 281 | if (animationId !== null) { |