Skip to content

Commit 48c033b

Browse files
committed
Rename the layer- element to map-layer
1 parent 570779d commit 48c033b

File tree

5 files changed

+10
-10
lines changed

5 files changed

+10
-10
lines changed

src/background.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ function createMap() {
134134
map.setAttribute("lat", lat);
135135
map.setAttribute("lon", lon);
136136
map.setAttribute("zoom", zoom);
137-
let layer = document.createElement("layer-");
137+
let layer = document.createElement("map-layer");
138138
layer.setAttribute("src", window.location.href);
139139
layer.setAttribute("checked", "");
140140
let title = document.createElement("title");

test/e2e/basics/locale.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<mapml-viewer style="height: 500px;width:500px;" is="web-map" projection="CBMTILE" zoom="2" lat="45.5052040" lon="-75.2202344"
1313
controls>
1414

15-
<layer- label="Basic Features" checked>
15+
<map-layer label="Basic Features" checked>
1616
<map-meta name="projection" content="CBMTILE"></map-meta>
1717
<map-meta name="zoom" content="min=1,max=5,value=0"></map-meta>
1818
<map-meta name="cs" content="gcrs"></map-meta>
@@ -62,7 +62,7 @@ <h1>Test</h1>
6262
</map-polygon>
6363
</map-geometry>
6464
</map-feature>
65-
</layer->
65+
</map-layer>
6666
</mapml-viewer>
6767

6868
</body>

test/e2e/basics/popup.test.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
vertical-align: middle;
3434
}
3535

36-
/* Pre-style to avoid FOUC of inline layer- and fallback content. */
36+
/* Pre-style to avoid FOUC of inline map-layer and fallback content. */
3737
mapml-viewer:not(:defined) > * {
3838
display: none;
3939
}
@@ -49,15 +49,15 @@
4949
supported, or if javascript is disabled. This needs to be defined separately
5050
from the above, because the `:not(:defined)` selector invalidates the entire
5151
declaration in browsers that do not support it. */
52-
layer- {
52+
map-layer {
5353
display: none;
5454
}
5555
</style>
5656
<noscript>
5757
<style>
5858
/* Ensure fallback content (children of the map element) is displayed if
5959
custom/built-in elements is supported but javascript is disabled. */
60-
mapml-viewer:not(:defined) > :not(layer-) {
60+
mapml-viewer:not(:defined) > :not(map-layer) {
6161
display: initial;
6262
}
6363

@@ -73,14 +73,14 @@
7373
</head>
7474
<body>
7575
<mapml-viewer projection="OSMTILE" zoom="10" lon="-75.7" lat="45.4" controls="">
76-
<layer- label="OpenStreetMap" checked="">
76+
<map-layer label="OpenStreetMap" checked="">
7777
<map-extent units="OSMTILE" checked>
7878
<map-input name="z" type="zoom" value="18" min="0" max="18"></map-input>
7979
<map-input name="x" type="location" units="tilematrix" axis="column" min="0" max="262144" ></map-input>
8080
<map-input name="y" type="location" units="tilematrix" axis="row" min="0" max="262144" ></map-input>
8181
<map-link rel="tile" tref="https://tile.openstreetmap.org/{z}/{x}/{y}.png" />
8282
</map-extent>
83-
</layer->
83+
</map-layer>
8484
</mapml-viewer>
8585
</body>
8686
</html>

test/e2e/basics/preferred-content.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</head>
99
<body>
1010
<mapml-viewer style="height: 500px;width:500px;" projection="CBMTILE" zoom="8" lat="46.51231982020816" lon="-63.25669692277839" controls>
11-
<layer- data-testid="test-layer" label="Provinces and Territories" src="../data/cbmt-cbmtile.mapml" checked></layer->
11+
<map-layer data-testid="test-layer" label="Provinces and Territories" src="../data/cbmt-cbmtile.mapml" checked></map-layer>
1212
</mapml-viewer>
1313
</body>
1414
</html>

test/e2e/basics/render.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ test.describe("Render MapML resources test", () => {
166166
expect(projection).toEqual("CBMTILE");
167167
// if this issue gets fixed, the following will fail and should be reversed
168168
// https://github.com/Maps4HTML/MapML.js/issues/677
169-
const disabled = await page.$eval("xpath=//html/body/mapml-viewer/layer-",
169+
const disabled = await page.$eval("xpath=//html/body/mapml-viewer/map-layer",
170170
(layer) => layer.hasAttribute("disabled"));
171171
expect(disabled).toBe(true);
172172
}, {times: 1});

0 commit comments

Comments
 (0)