File tree Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Expand file tree Collapse file tree 5 files changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ function createMap() {
134
134
map . setAttribute ( "lat" , lat ) ;
135
135
map . setAttribute ( "lon" , lon ) ;
136
136
map . setAttribute ( "zoom" , zoom ) ;
137
- let layer = document . createElement ( "layer- " ) ;
137
+ let layer = document . createElement ( "map-layer " ) ;
138
138
layer . setAttribute ( "src" , window . location . href ) ;
139
139
layer . setAttribute ( "checked" , "" ) ;
140
140
let title = document . createElement ( "title" ) ;
Original file line number Diff line number Diff line change 12
12
< mapml-viewer style ="height: 500px;width:500px; " is ="web-map " projection ="CBMTILE " zoom ="2 " lat ="45.5052040 " lon ="-75.2202344 "
13
13
controls >
14
14
15
- < layer- label ="Basic Features " checked >
15
+ < map-layer label ="Basic Features " checked >
16
16
< map-meta name ="projection " content ="CBMTILE "> </ map-meta >
17
17
< map-meta name ="zoom " content ="min=1,max=5,value=0 "> </ map-meta >
18
18
< map-meta name ="cs " content ="gcrs "> </ map-meta >
@@ -62,7 +62,7 @@ <h1>Test</h1>
62
62
</ map-polygon >
63
63
</ map-geometry >
64
64
</ map-feature >
65
- </ layer- >
65
+ </ map-layer >
66
66
</ mapml-viewer >
67
67
68
68
</ body >
Original file line number Diff line number Diff line change 33
33
vertical-align : middle;
34
34
}
35
35
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. */
37
37
mapml-viewer : not (: defined ) > * {
38
38
display : none;
39
39
}
49
49
supported, or if javascript is disabled. This needs to be defined separately
50
50
from the above, because the `:not(:defined)` selector invalidates the entire
51
51
declaration in browsers that do not support it. */
52
- layer- {
52
+ map-layer {
53
53
display : none;
54
54
}
55
55
</ style >
56
56
< noscript >
57
57
< style >
58
58
/* Ensure fallback content (children of the map element) is displayed if
59
59
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 ) {
61
61
display : initial;
62
62
}
63
63
73
73
</ head >
74
74
< body >
75
75
< mapml-viewer projection ="OSMTILE " zoom ="10 " lon ="-75.7 " lat ="45.4 " controls ="">
76
- < layer- label ="OpenStreetMap " checked ="">
76
+ < map-layer label ="OpenStreetMap " checked ="">
77
77
< map-extent units ="OSMTILE " checked >
78
78
< map-input name ="z " type ="zoom " value ="18 " min ="0 " max ="18 "> </ map-input >
79
79
< map-input name ="x " type ="location " units ="tilematrix " axis ="column " min ="0 " max ="262144 " > </ map-input >
80
80
< map-input name ="y " type ="location " units ="tilematrix " axis ="row " min ="0 " max ="262144 " > </ map-input >
81
81
< map-link rel ="tile " tref ="https://tile.openstreetmap.org/{z}/{x}/{y}.png " />
82
82
</ map-extent >
83
- </ layer- >
83
+ </ map-layer >
84
84
</ mapml-viewer >
85
85
</ body >
86
86
</ html >
Original file line number Diff line number Diff line change 8
8
</ head >
9
9
< body >
10
10
< 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 >
12
12
</ mapml-viewer >
13
13
</ body >
14
14
</ html >
Original file line number Diff line number Diff line change @@ -166,7 +166,7 @@ test.describe("Render MapML resources test", () => {
166
166
expect ( projection ) . toEqual ( "CBMTILE" ) ;
167
167
// if this issue gets fixed, the following will fail and should be reversed
168
168
// 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 " ,
170
170
( layer ) => layer . hasAttribute ( "disabled" ) ) ;
171
171
expect ( disabled ) . toBe ( true ) ;
172
172
} , { times : 1 } ) ;
You can’t perform that action at this time.
0 commit comments