|
22 | 22 | <body> |
23 | 23 | <map data-testid="map1" is="web-map" projection="CBMTILE" zoom="2" lat="45.5052040" lon="-75.2202344" controls> |
24 | 24 |
|
25 | | - <layer- label="Arizona" checked> |
| 25 | + <layer- data-testid="arizona" label="Arizona" checked> |
26 | 26 | <map-meta name="projection" content="CBMTILE"></map-meta> |
27 | 27 | <map-meta name="zoom" content="min=0,max=5,value=0"></map-meta> |
28 | 28 | <map-meta name="extent" |
29 | 29 | content="cs=tilematrix,top-left-vertical=0,top-left-horizontal=0,bottom-right-vertical=5,bottom-right-horizontal=5"></map-meta> |
30 | | - |
| 30 | + <!-- Local-content styles rendered as style/link in same order as found, in expected shadow root location --> |
31 | 31 | <map-link id="first" rel="stylesheet" type="text/css" href="first.css"></map-link> |
32 | | - <map-style> |
| 32 | + <map-style id="second"> |
33 | 33 | .second { |
34 | 34 | stroke: aqua; |
35 | 35 | } |
36 | 36 | </map-style> |
37 | | - <map-style> |
| 37 | + <map-style id="third"> |
38 | 38 | .third { |
39 | 39 | stroke: blue |
40 | 40 | } |
@@ -88,40 +88,50 @@ <h1>Colorado</h1> |
88 | 88 | </map-geometry> |
89 | 89 | </map-feature> |
90 | 90 | </layer-> |
91 | | - <layer- label="Alabama" checked> |
| 91 | + <layer- data-testid="alabama" label="Alabama" checked> |
92 | 92 | <map-meta name="zoom" content="min=0,max=10"></map-meta> |
93 | 93 | <map-extent units="CBMTILE" checked hidden> |
94 | 94 | <map-input name="z" type="zoom" min="2" max="18" ></map-input> |
95 | 95 | <map-input name="xmin" type="location" units="gcrs" axis="longitude" position="top-left" min="-76" max="-74" ></map-input> |
96 | 96 | <map-input name="ymin" type="location" units="gcrs" axis="latitude" position="bottom-right" min="45" max="46" ></map-input> |
97 | 97 | <map-input name="xmax" type="location" units="gcrs" axis="longitude" position="bottom-right" min="-76" max="-74" ></map-input> |
98 | 98 | <map-input name="ymax" type="location" units="gcrs" axis="latitude" position="top-left" min="45" max="46" ></map-input> |
99 | | - <map-link rel="features" tref="data/alabama_feature.mapml?{xmin}{ymin}{xmax}{ymax}{z}" ></map-link> |
| 99 | + <!-- Local layer content map-link[rel=features] remote styles rendered as style/link in same order as found, in expected shadow root location --> |
| 100 | + <map-link data-testid="alabama-features" rel="features" tref="data/alabama_feature.mapml?{xmin}{ymin}{xmax}{ymax}{z}" ></map-link> |
100 | 101 | </map-extent> |
101 | 102 | </layer-> |
102 | 103 | </map> |
103 | 104 | <map data-testid="map2" is="web-map" projection="WGS84" zoom="0" lat="0" lon="0" controls> |
104 | 105 |
|
105 | 106 | <layer- label="Inline Countries" checked> |
106 | | - <map-link rel="stylesheet" href="styleParsing.css"></map-link> |
107 | | - <map-style> |
108 | | - .secondVector { |
| 107 | + <map-style id="one"> |
| 108 | + .firstVector { |
109 | 109 | color: aliceblue; |
110 | 110 | } |
111 | 111 | </map-style> |
| 112 | + <map-link id="two" rel="stylesheet" href="styleParsing.css"></map-link> |
112 | 113 | <map-meta name="zoom" content="min=0,max=10"></map-meta> |
113 | | - <map-extent units="WGS84" checked hidden> |
| 114 | + <map-extent data-testid="map-ext1" units="WGS84" checked hidden> |
| 115 | + <!-- Local style children of map-extent rendered as style/link in same order as found, in expected shadow root location --> |
| 116 | + <map-style id="one">.foo { bar:none; }</map-style> |
| 117 | + <map-link id="two" rel="stylesheet" href="styleParsing.css"></map-link> |
114 | 118 | <map-input name="zoomLevel" type="zoom" min="0" max="2" value="0" ></map-input> |
115 | 119 |
|
116 | 120 | <map-input name="row" type="location" axis="row" units="tilematrix" min="0" max="5" ></map-input> |
117 | 121 | <map-input name="col" type="location" axis="column" units="tilematrix" min="0" max="5" ></map-input> |
118 | 122 |
|
| 123 | + <!-- map-style and map-link elements in tiles should be rendered in the |
| 124 | + container of the svg element that renders the tile, so that the style |
| 125 | + rules in them apply to the svg content elements such as path and g --> |
| 126 | + <!-- Local content map-link[rel=tile][type=text/mapml] with remote styles embedded in text/mapml tiles are rendered in same order as found in shadow root tile container --> |
| 127 | + <!-- see r0_c0.mapml --> |
119 | 128 | <map-link rel='tile' type='text/mapml' title='Tiles for ne_10m_admin_0_countries (as MapML)' |
120 | 129 | tref='data/wgs84/{zoomLevel}/r{row}_c{col}.mapml' ></map-link> |
121 | 130 |
|
122 | 131 | </map-extent> |
123 | 132 | </layer-> |
124 | | - <layer- label="src-based Countries" src="data/vector-tile-test.mapml" checked></layer-> |
| 133 | + |
| 134 | + <layer- data-testid="remote" label="src-based Countries" src="data/vector-tile-test.mapml" checked></layer-> |
125 | 135 | </map> |
126 | 136 | </body> |
127 | 137 |
|
|
0 commit comments