From a34731859871596886f5c294c0d35081eba723b3 Mon Sep 17 00:00:00 2001 From: Andreas Stassivik Date: Wed, 6 Nov 2024 12:46:37 -0800 Subject: [PATCH] `MapFullscreen` integration in fullscreen accessibility tutorial --- public/tutorial/accessibility/script/fullscreen.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/public/tutorial/accessibility/script/fullscreen.js b/public/tutorial/accessibility/script/fullscreen.js index 9518ea1..8b357d6 100644 --- a/public/tutorial/accessibility/script/fullscreen.js +++ b/public/tutorial/accessibility/script/fullscreen.js @@ -1,10 +1,17 @@ -import { createFullscreenMap } from '../../../script/leaflet-fullscreen.js' +import { attributionOsm, urlTemplateOsm } from '../../../script/base-layers.js' import { marker } from '../../../leaflet-adapter/marker.js' import { tileLayer } from '../../../leaflet-adapter/tile-layer/tile-layer.js' -import { attributionOsm, urlTemplateOsm } from '../../../script/base-layers.js' +import { MapFullscreen } from '../../../script/leaflet-fullscreen.js' + +function mapFullscreen({ id, ...props }) { + return new MapFullscreen(id, { + fullscreenControl: true, + ...props, + }) +} const altText = 'Kyiv', - map = createFullscreenMap({ + map = mapFullscreen({ center: [50.4501, 30.5234], id: 'map', zoom: 4,