You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add map-link disabled attribute description in en and fr
Update description of map-layer media attribute in en and fr
Deprecate zoomin, zoomout links
Add map-style-api.md in fr and en, add to sidebar.js
Add node-version script to package.json
Change docusaurus config to only warn on broken links
The `<map-style>` element is an extension of the HTML `<style>` element and `HTMLStyleElement`
10
+
API for map styles. This document reflects proposed changes to that API, and is a work in progress.
11
+
12
+
## Properties
13
+
14
+
### media
15
+
16
+
Reflects the [media](../elements/style#media) attribute of the `<map-style>` element. Map media queries can include map properties including: [projection](../../api/mapml-viewer-api#projection), [zoom](../../api/mapml-viewer-api#zoom),
[Report problems with these requirements on GitHub](https://github.com/Maps4HTML/HTML-Map-Element-UseCases-Requirements/issues/new?title=-SUMMARIZE+THE+PROBLEM-&body=-DESCRIBE+THE+PROBLEM-)
Copy file name to clipboardExpand all lines: docs/elements/link.md
+29-2Lines changed: 29 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -37,8 +37,8 @@ defines several uses of existing and new `rel` keyword values.
37
37
|`tile`| This link relation is used in conjunction with the `tref="..."` attribute to define a URL template that identifies native (server) tile resources. Can be used in conjunction with the `type="..."` attribute to indicate the media type of the remote resource, for example: `type="text/mapml"` tells the polyfill to parse and render the fetched resource as map feature content. This link relation is used with standard Web Map Tile Services (WMTS), and its non-standard equivalents. |
38
38
|`image`| The `image` link relation is used similarly to the `tile` link relation, except it tells the polyfill that the remote resources to be fetched are images that will be trimmed (by the server) to exactly match the width and height of the map viewport. This link relation is used with standard Web Map Services (WMS) and its non-standard equivalents. |
39
39
|`features`| The `features` link relation tells the polyfill to parse and render the fetched resource as map feature content. |
40
-
|`zoomin`|The link `href` is followed automatically by the polyfill when the map is zoomed in by the user to a value greater than the maximimum value of the zoom range of the current layer. The referenced map layer resource replaces the current map layer. The polyfill does not represent this link as a user-visible affordance, it is followed automatically. If the remote resource does not contain a reciprocal `zoomout` link, the map state change is one-way i.e. the layer is permanently replaced. |
41
-
|`zoomout`|The link `href` is followed automatically by the polyfill when the map is zoomed out by the user to a value less than the minimum value of the zoom range of the current layer. The referenced map layer resource replaces the current map layer. The polyfill does not represent this link as a user-visible affordance, it is followed automatically. If the remote resource does not contain a reciprocal `zoomin` link, the map state change is one-way i.e. the layer is permanently replaced. |
40
+
|~~`zoomin`~~|Deprecated. Use the `map-zoom`[map media feature](#media) instead. |
41
+
|~~`zoomout`~~|Deprecated. Use the `map-zoom`map media feature instead. |
42
42
|`legend`| The `legend` link relation designates a link to metadata, typically an image, describing the symbology used by the current layer. Currently, the polyfill creates a hyperlink for the label of the layer in the layer control, which opens in a new browsing context. |
43
43
|`query`| The `query` link relation is used in combination with the `tref="..."` attribute to establish a URL template that composes a map query URL based on user map gestures such as click or touch. These URLs are fetched and the response presented on top of the map as a popup. Such queries can return text/html or text/mapml responses. In the latter case, the response may contain more than one feature, in which case a 'paged' popup is generated, allowing the user to cycle through the features' individual metadata. |
44
44
|`stylesheet`| The link imports a CSS or [pmtiles](../../user-guide/creating-styles) stylesheet from the `href` value. |
@@ -81,6 +81,19 @@ The `href` of a `<map-link>` must be a URL value of a resource that can be fetch
81
81
The URL can be absolute or relative.
82
82
83
83
---
84
+
### `disabled`
85
+
86
+
The read-write `disabled` boolean attribute works with `<map-link rel=stylesheet>` and
87
+
`<map-link rel="tile | image | features | query">`. When set, it disables and
88
+
unloads the stylesheet or map content as applicable. The read-only `disabled`
89
+
attribute of the `<map-layer>` and `<map-extent>` elements is updated to reflect
90
+
the new calculated visibility of the `<map-layer>` or `<map-extent>`. When the
91
+
`disabled` attribute is removed, the linked CSS stylesheet or map content is loaded.
92
+
If the layer and extent content that is loaded is visible, the `<map-layer>` or `<map-extent>`
93
+
`disabled` attribute is removed accordingly.
94
+
95
+
---
96
+
84
97
### `hreflang`
85
98
86
99
Advisory [language designation](https://datatracker.ietf.org/doc/html/rfc5646) about remote resource.
@@ -130,6 +143,20 @@ Projection values [defined by the polyfill](../mapml-viewer#projection) include:
130
143
| Permitted ARIA roles | No roles permitted. |
131
144
| DOM Interface |[HTMLLinkElement](https://developer.mozilla.org/en-US/docs/Web/API/HTMLLinkElement)|
132
145
146
+
---
147
+
### `media`
148
+
149
+
The `media` attribute is used to express media conditions under which the linked
150
+
content should be loaded from its `href` attribute. Media conditions evaluate to `true` or `false`.
151
+
A map-link for which the media condition evaluates to `false` is not loaded / unloaded.
152
+
Content linked via a map-link for which the media condition evaluates to `true`
153
+
is loaded from its `href` attribute; when the condition subsequently evaluates to
154
+
`false`, the content is unloaded.
155
+
156
+
Map media queries can include extended CSS map properties including:
Copy file name to clipboardExpand all lines: docs/elements/style.md
+17-1Lines changed: 17 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,25 @@ slug: /elements/style/
6
6
7
7
The `<map-style>` element allows map authors to embed CSS into map layers. The CSS can be used to style the geometry of the layer using [`<map-span>`](../../elements/span/), and by setting the class attribute to the [child elements](../geometry/#child-elements) of the geometry.
8
8
9
+
## Attributes
10
+
11
+
### `media`
12
+
13
+
The `media` attribute is used to express media conditions under which the contained
14
+
styles should be applied. Media conditions evaluate to `true` or `false`. A map-style
15
+
for which the media condition evaluates to `false` is not loaded / is removed. Styles
16
+
contained in a `<map-style>` for which the media condition evaluates to `true`
17
+
are applied; when the condition subsequently evaluates to `false`, the styles are removed.
18
+
An invalid media condition evaluates to `false`.
19
+
20
+
Map media queries can include map properties including: [projection](../../api/mapml-viewer-api#projection), [zoom](../../api/mapml-viewer-api#zoom),
21
+
and [extent](../../api/mapml-viewer-api#extent).
22
+
23
+
---
24
+
9
25
:::note
10
26
11
-
All the Demo's on the documentation pages contain a "CSS" tab which adds the CSS using the `<map-style>` element dynamically.
27
+
All the demo's on the documentation pages contain a "CSS" tab which adds the CSS using the `<map-style>` element dynamically.
L'élément `<map-style>` est une extension de l'élément HTML `<style>` et de l'API `HTMLStyleElement`.
10
+
Ce document reflète les modifications proposées à cette API et est en cours de développement.
11
+
12
+
## Propriétés
13
+
14
+
### media
15
+
16
+
Reflète l'attribut [media](../elements/style#media) de l'élément `<map-style>`. Les requêtes média pour la carte peuvent inclure des propriétés de carte, notamment : [projection](../../api/mapml-viewer-api#projection), [zoom](../../api/mapml-viewer-api#zoom), et [extent](../../api/mapml-viewer-api#extent).
[Signaler les problèmes liés à ces exigences sur GitHub](https://github.com/Maps4HTML/HTML-Map-Element-UseCases-Requirements/issues/new?title=-SUMMARIZE+THE+PROBLEM-&body=-DESCRIBE+THE+PROBLEM-)
29
+
30
+
<p><b><spanclass="requirement">exigence</span>
31
+
<spanclass="enhancement">amélioration</span>
32
+
<spanclass="impractical">peu pratique</span>
33
+
<spanclass="undecided">indécis</span>
34
+
<spanclass="discussion">en cours de discussion</span></b></p>
> -[Modifier cette page sur **Github**](https://github.com/Maps4HTML/web-map-doc/edit/main/i18n/fr/docusaurus-plugin-content-docs/current/api/map-style-api.md)
45
+
> -[Discutez avec nous sur **Gitter**](https://gitter.im/Maps4HTML/chat)
0 commit comments