Skip to content

Commit d4b7318

Browse files
committed
Update extent, layer, editors.
Add Contributors section, remove authors. Add `checked` to examples of local and remote content. Update extent content model to allow `map-meta` description of zoom and spatial bounds.
1 parent 0d38126 commit d4b7318

File tree

1 file changed

+35
-33
lines changed

1 file changed

+35
-33
lines changed

spec/index.html

+35-33
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,6 @@
2222
{
2323
name: "Peter Rushforth",
2424
company: "Natural Resources Canada"
25-
},
26-
{
27-
name: "Robert Linder"
28-
}
29-
],
30-
authors: [
31-
{
32-
name: "Peter Rushforth",
33-
company: "Natural Resources Canada"
34-
},
35-
{
36-
name: "Robert Linder"
37-
},
38-
{
39-
name: "Joan Masó"
4025
}
4126
],
4227
group: "maps4html",
@@ -341,6 +326,7 @@ <h3>Changes</h3>
341326
<li><time>2023-06-08</time>: Add initial draft WebIDL for <code>geojson2mapml</code>(). Add prose for <code>back</code>, <code>forward</code>, <code>reload</code>.
342327
<li><time>2023-06-12</time>: Add <code>HTMLGeometryChildElement</code> abstract interface
343328
<li><time>2023-06-29</time>: Update Authoring section. Include definitions of local and remote content.
329+
<li><time>2023-11-05</time>: Correct error in contexts in which <code>extent</code> is found. Add opacity attribute to layer. Update editors. Add WebIDL for <code>layer</code> <code>opacity</code>; Add or update <code>extent</code> attributes for <code>label</code>, <code>checked</code>, <code>hidden</code>, <code>opacity</code> and <code>disabled</code>. Update <code>extent</code> content model to add allowed metadata content for <code>zoom</code> and <code>extent</code>.
344330
</ol>
345331
</details>
346332
</section>
@@ -873,6 +859,7 @@ <h4>The <code>&lt;<dfn id="the-layer-element">layer</dfn>&gt;</code> element</h4
873859
if the layer is not not <a href="#attr-layer-hidden"><code>hidden</code></a>. The map author's <a href="#the-title-element"><code>title</code></a> element takes precedence over <code>label</code>, if available.</dd>
874860
<dd id="attr-layer-checked"><code>checked</code> — Turn the layer on/off dynamically on the map. </dd>
875861
<dd id="attr-layer-hidden"><code>hidden</code> — Visibility status of the layer in the layer control. Does not affect visibility of the layer on the map.</dd>
862+
<dd id="attr-layer-opacity"><code>opacity</code> — An initial opacity value which is reflected to the exposed user interface in the layer control for opacity. Opacity values have a decimal range from 0 (transparent) to 1.0 (opaque)</dd>
876863
<dd id="attr-layer-referrerpolicy"><code>referrerpolicy</code><a href="https://w3c.github.io/webappsec-referrer-policy/#referrer-policy">Referrer policy</a> for <a href="https://fetch.spec.whatwg.org/#concept-fetch">fetches</a> initiated by the element.</dd>
877864
<dd id="attr-layer-crossorigin"><code>crossorigin</code> — A <a href="https://html.spec.whatwg.org/multipage/urls-and-fetching.html#cors-settings-attribute">CORS settings attribute</a>, specifies how the element handles crossorigin requests.</dd>
878865
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-tag-omission">Tag omission in text/html</a>:</dt>
@@ -921,6 +908,7 @@ <h4>The <code>&lt;<dfn id="the-layer-element">layer</dfn>&gt;</code> element</h4
921908
attribute boolean <a href="#attr-layer-checked">checked</a>;
922909
readonly attribute boolean <a href="#attr-layer-disabled">disabled</a>;
923910
attribute boolean <a href="#attr-layer-hidden">hidden</a>;
911+
attribute double <a href="attr-layer-opacity">opacity</a>;
924912
attribute DOMString <a href="#attr-layer-referrerpolicy">referrerPolicy</a>;
925913
attribute DOMString? <a href="#attr-layer-crossorigin">crossOrigin</a>;
926914
undefined zoomTo();
@@ -935,7 +923,7 @@ <h4>The <code>&lt;<dfn id="the-layer-element">layer</dfn>&gt;</code> element</h4
935923
</dd>
936924
</dl>
937925
<p>The <a href="#the-mapml-viewer-element"><code>mapml-viewer</code></a> element displays its child <a href="#the-layer-element"><code>layer</code></a> elements similarly to (partially) transparent "acetate" layers on a (paper) map. The layers follow the <a href="https://www.w3.org/TR/SVG/render.html#PaintersModel">painters model</a>, whereby
938-
<a href="#the-layer-element"><code>layer</code></a> elements are displayed on top of earlier siblings according to their document order. <a href="#the-layer-element"><code>layer</code></a> transparency is controlled by the CSS opacity property. [[SVG2]] [[css-color-3]]</p>
926+
<a href="#the-layer-element"><code>layer</code></a> elements are displayed on top of previous siblings according to their document order. <a href="#the-layer-element"><code>layer</code></a> transparency is controlled by the <a href="attr-layer-opacity">opacity</a> attribute.</p>
939927

940928
<p>In contrast to the <a href="https://html.spec.whatwg.org/multipage/media.html#media-element">HTML media elements' <code>source</code></a> child element where a single
941929
<a href="https://html.spec.whatwg.org/multipage/media.html#media-element"><code>source</code></a> element is selected by the user agent for play, the <a href="#the-mapml-viewer-element"><code>mapml-viewer</code></a> element's child <a href="#the-layer-element"><code>layer</code></a> elements are
@@ -1120,7 +1108,7 @@ <h4>Local content</h4>
11201108
&lt;map-caption&gt;Paris, the City of Lights&lt;/map-caption&gt;
11211109
&lt;layer checked&gt;
11221110
&lt;map-link rel="license" href="https://www.openstreetmap.org/copyright" title="© OpenStreetMap contributors CC BY-SA"/&gt;
1123-
&lt;map-extent units="OSMTILE" &gt;
1111+
&lt;map-extent units="OSMTILE" checked&gt;
11241112
&lt;map-input name="z" type="zoom" value="18" min="0" max="18"&gt;&lt;/map-input&gt;
11251113
&lt;map-input name="x" type="location" units="tilematrix" axis="column"&gt;&lt;/map-input&gt;
11261114
&lt;map-input name="y" type="location" units="tilematrix" axis="row"&gt;&lt;/map-input&gt;
@@ -1160,7 +1148,7 @@ <h4>Remote content</h4>
11601148
&lt;map-link rel="license" href="https://www.nrcan.gc.ca/earth-sciences/geography/topographic-information/free-data-geogratis/licence/17285" title="Canada Base Map © Natural Resources Canada"&gt;&lt;/map-link&gt;
11611149
&lt;/map-head&gt;
11621150
&lt;map-body&gt;
1163-
&lt;map-extent units="CBMTILE"&gt;
1151+
&lt;map-extent units="CBMTILE" checked="checked"&gt;
11641152
&lt;map-input name="z" type="zoom" value="17" min="0" max="17"&gt;&lt;/map-input&gt;
11651153
&lt;map-input name="y" type="location" units="tilematrix" axis="row"&gt;&lt;/map-input&gt;
11661154
&lt;map-input name="x" type="location" units="tilematrix" axis="column"&gt;&lt;/map-input&gt;
@@ -1861,9 +1849,9 @@ <h5>The <code>&lt;<dfn id="the-meta-element">meta</dfn>&gt;</code> element</h5>
18611849
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-content-model">Content model</a>:</dt>
18621850
<dd><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-content-nothing">Nothing</a>.</dd>
18631851
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-attributes">Content attributes</a>:</dt>
1864-
<dd><code>name</code> — Metadata name.</dd>
1865-
<dd><code>http-equiv</code> — Pragma directive.</dd>
1866-
<dd><code>content</code> — Value of the element.</dd>
1852+
<dd id="attr-meta-name"><code>name</code> — Metadata name.</dd>
1853+
<dd id="attr-meta-http-equiv"><code>http-equiv</code> — Pragma directive.</dd>
1854+
<dd id="attr-meta-content"><code>content</code> — Value of the element.</dd>
18671855
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-accessibility-considerations">Accessibility considerations</a>:</dt>
18681856
<dd>
18691857
<details class="a11y-details">
@@ -2155,19 +2143,20 @@ <h5>The <code>&lt;<dfn id="the-extent-element">extent</dfn>&gt;</code> element</
21552143
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-categories">Categories</a>:</dt>
21562144
<dd><a href="https://html.spec.whatwg.org/multipage/dom.html#metadata-content-2">Metadata content</a>.</dd>
21572145
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-contexts">Contexts in which this element can be used</a>:</dt>
2158-
<dd>In <a href="#dfn-remote-content">remote content</a>, as a child of the <a href="#the-head-element"><code>head</code></a> element.</dd>
2146+
<dd>In <a href="#dfn-remote-content">remote content</a>, as a child of the <a href="#the-body-element"><code>body</code></a> element.</dd>
21592147
<dd>In <a href="#dfn-local-content">local content</a>, as a child of the <a href="#the-layer-element"><code>layer</code></a> element.</dd>
21602148
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-content-model">Content model</a>:</dt>
21612149
<dd>
21622150
A set of multiple <a href="#the-input-element"><code>input</code></a> and one or more <a href="#the-link-element"><code>link</code></a> elements with their <code>rel</code> attribute in either the "<a href="#link-rel-tile"><code>tile</code></a>", "<a href="#link-rel-image"><code>image</code></a>" or "<a href="#link-rel-features"><code>features</code></a>" state, and zero or one
2163-
<a href="#the-link-element"><code>link</code></a> element with its <code>rel</code> attribute in the "<a href="#link-rel-query"><code>query</code></a>" state.
2151+
<a href="#the-link-element"><code>link</code></a> element with its <code>rel</code> attribute in the "<a href="#link-rel-query"><code>query</code></a>" state. Optional metadata content describing server-side <code>extent</code> content, in the form of zero or more <a href="#the-meta-element"><code>meta</code></a> elements with <a href="#attr-meta-name"><code>name</code></a> attribute in the <code>zoom</code> or <code>extent</code> state.
21642152
</dd>
21652153

21662154
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-attributes">Content attributes</a>:</dt>
2167-
<dd><code>units</code> — The name of the coordinate reference system whose measurement units are to be used by values supplied by child <a href="#the-input-element"><code>input</code></a> elements.</dd>
2168-
<dd><code>label</code> — A text label to be applied to the user interface for the <a href="#the-extent-element"><code>extent</code></a> in the layer control. If no label is supplied, the <a href="#the-extent-element"><code>extent</code></a> will not expose a user interface in the layer control, but will still be displayed on the map.</dd>
2169-
<dd><code>opacity</code> — An initial opacity value, that will be applied to the content retrieved by the <a href="#the-extent-element"><code>extent</code></a>, and which is reflected to the exposed user interface for opacity. Opacity values have a decimal range from 0 (transparent) to 1.0 (opaque).</dd>
2170-
<dd><code>checked</code> — A boolean attribute that sets the initial state of the exposed user interface in the layer control. If checked, the <a href="#the-extent-element"><code>extent</code></a> content is displayed on the map.</dd>
2155+
<dd id="attr-extent-units"><code>units</code> — The name of the coordinate reference system whose measurement units are to be used by values supplied by child <a href="#the-input-element"><code>input</code></a> elements.</dd>
2156+
<dd id="attr-extent-label"><code>label</code> — A text label to be applied to the user interface for the <a href="#the-extent-element"><code>extent</code></a> in the layer control. If no <code>label</code> content attribute is supplied, a default internationalized string value will be generated and rendered for non-hidden extents.</dd>
2157+
<dd id="attr-extent-opacity"><code>opacity</code> — An initial opacity value, that will be applied to the content retrieved by the <a href="#the-extent-element"><code>extent</code></a>, and which is reflected to the exposed layer control user interface for opacity. Opacity values have a decimal range from 0 (transparent) to 1.0 (opaque).</dd>
2158+
<dd id="attr-extent-checked"><code>checked</code> — A boolean attribute that sets the initial state of the exposed user interface in the layer control. If checked, the <a href="#the-extent-element"><code>extent</code></a> content is rendered on the map.</dd>
2159+
<dd id="attr-extent-hidden"><code>hidden</code> — Visibility status of the extent in the layer control. Does not affect visibility of the extent on the map.</dd>
21712160
<dt><a href="https://html.spec.whatwg.org/multipage/dom.html#concept-element-accessibility-considerations">Accessibility considerations</a>:</dt>
21722161
<dd>
21732162
<details class="a11y-details">
@@ -2208,18 +2197,27 @@ <h5>The <code>&lt;<dfn id="the-extent-element">extent</dfn>&gt;</code> element</
22082197
interface HTMLExtentElement : HTMLElement {
22092198
[HTMLConstructor] constructor();
22102199

2211-
attribute DOMString units;
2212-
readonly attribute long length;
2213-
getter Element (unsigned long index);
2214-
getter (RadioNodeList or Element) (DOMString name);
2215-
};
2200+
attribute DOMString <a href="#attr-extent-units">units</a>;
2201+
attribute DOMString <a href="#attr-extent-label">label</a>;
2202+
attribute boolean <a href="#attr-extent-checked">checked</a>;
2203+
readonly attribute boolean <a href="#attr-extent-disabled">disabled</a>;
2204+
attribute boolean <a href="#attr-extent-hidden">hidden</a>;
2205+
attribute double <a href="attr-extent-opacity">opacity</a>; };
22162206
</pre>
22172207
</dd>
22182208
</dl>
22192209
<p>
2220-
The <a href="#the-extent-element"><code>extent</code></a> element is a map-associated affordance, which contains input and link elements, whose job it is to serialize location event properties that can be submitted to a server for processing.
2210+
The <a href="#the-extent-element"><code>extent</code></a> element is a map-associated affordance, which contains <a href="#the-input-element"><code>input</code></a> and <a href="#the-link-element"><code>link</code></a> elements, whose job it is to serialize location event properties that can be submitted to a server for processing. Returned content is rendered on the map in the DOM sequence order of the <code>extent</code> child element among its siblings in the parent element. The <code>extent</code>'s content rendered transparency is controlled by the <code>opacity</code> attribute.
22212211
</p>
22222212
<p>The <code>units</code> attribute indicates the parent TCRS that location events shall be generated for, and serialized as requested by the <code>extent</code>'s contents.</p>
2213+
2214+
<p>The <code>label</code> IDL attribute reflects the content attribute, if present. If no content attribute is present, the IDL attribute returns an internationalized string for 'Sub-layer'.</p>
2215+
2216+
<p>The display state (on / off) of the content represented by the <code>extent</code> element is controlled by the <code>checked</code> boolean attribute. If <code>checked</code> is true, the <code>extent</code> is rendered on the map; if not <code>checked</code> the <code>extent</code> is not rendered but should remain visible in the <code>mapml-viewer</code> element's representation of controls, in an un-checked state.</p>
2217+
2218+
<p>The <code>hidden</code> boolean attribute can be set to remove the <code>extent</code> from the map layer control, but it will remain displayed on the map. In order to remove the <code>extent</code> content from the map, it can have its <code>checked</code> property toggled, or the element can be removed from the DOM.</p>
2219+
2220+
<p>The <code>disabled</code> IDL attribute is a read-only boolean representation of the visibility of the <code>extent</code> contents on the map. If the <code>extent</code> is not visible due to errors, including projection, zoom or bounds mismatch, the <code>disabled</code> IDL attribute will return true. If the <code>extent</code> is present in the layer control (i.e. <code>hidden</code> is false), its <code>checked</code> state will be disabled until the error condition is corrected, for example by zooming to the <code>extent</code>'s bounds.</p>
22232221

22242222
</section>
22252223
<section>
@@ -3464,5 +3462,9 @@ <h2 id="rng">RelaxNG Schema</h2>
34643462
<section id="references" class="appendix">
34653463
<!-- https://github.com/w3c/respec/wiki/references -->
34663464
</section>
3465+
<section id="contributors" class="appendix">
3466+
<h2>Contributors</h2>
3467+
Thanks to all our contributors: <span>Robert Linder, Joan Masó and elf Pavlik</span>
3468+
</section>
34673469
</body>
34683470
</html>

0 commit comments

Comments
 (0)