Skip to content

Commit

Permalink
sync attribute changes of map-extent pr to web-map-doc, including add…
Browse files Browse the repository at this point in the history
…ing full element ending i.e. </map-extent> and also adding missing checked/hidden attributes where applicable (#135)
  • Loading branch information
AliyanH authored Nov 7, 2023
1 parent 05f6413 commit 4079a8e
Show file tree
Hide file tree
Showing 27 changed files with 84 additions and 84 deletions.
2 changes: 1 addition & 1 deletion docs/api/map-link-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ The map:
<mapml-viewer projection="OSMTILE" zoom="0" lat="45" lon="-75" controls>
<layer- label="Custom Tiles" checked>
<map-meta name="zoom" content="min=0,max=23" ></map-meta>
<map-extent units="OSMTILE">
<map-extent units="OSMTILE" checked hidden>
<map-input name="zoomLevel" type="zoom" min="0" max="23" value="1" ></map-input>
<map-input name="row" type="location" axis="row" units="tilematrix" min="0" max="2" ></map-input>
<map-input name="col" type="location" axis="column" units="tilematrix" min="0" max="2" ></map-input>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/mapml-viewer-api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -636,7 +636,7 @@ let output = map.geojson2mapml(json);
<mapml-viewer projection="ATLAS_POLAR_MAP" zoom="2" lat="83.48919" lon="-87.7687" controls>
<layer- label="Atlas of Canada Polar Wall Map" checked>
<map-link rel="license" title="Canadian Federal Geospatial Platform" href="https://geoappext.nrcan.gc.ca/arcgis/rest/services/FGP/NCR_RCN/MapServer/"></map-link>
<map-extent units="ATLAS_POLAR_MAP">
<map-extent units="ATLAS_POLAR_MAP" checked hidden>
<map-input type="zoom" name="z" min="0" max="6" value="6" ></map-input>
<map-input type="location" name="x" axis="column" units="tilematrix" min="116" max="186"></map-input>
<map-input type="location" name="y" axis="row" units="tilematrix" min="125" max="184"></map-input>
Expand Down
10 changes: 5 additions & 5 deletions docs/elements/extent.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ URL template.
```html
<mapml-viewer projection="OSMTILE" lat="10" lon="0" zoom="1">
<layer- label="OpenStreetMap" checked>
<map-extent units="OSMTILE">
<map-extent units="OSMTILE" checked hidden>
<map-input name="z" type="zoom" value="18" min="0" max="18"></map-input>
<map-input name="x" type="location" units="tilematrix" axis="column" min="0" max="262144"></map-input>
<map-input name="y" type="location" units="tilematrix" axis="row" min="0" max="262144"></map-input>
Expand Down Expand Up @@ -87,19 +87,19 @@ The following example shows multiple `<map-extent>` elements in a layer. The dif
<!-- Change Basemap using the three dots menu of the basemap layer -->
<layer- label="Basemap" checked="">
<!-- This extent will be hidden in the layer control since no label is provided -->
<map-extent units="OSMTILE">
<map-extent units="OSMTILE" checked>
<map-input name="TileMatrix" type="zoom" value="18" min="0" max="18"></map-input>
<map-input name="TileCol" type="location" units="tilematrix" axis="column" min="0" max="262144"></map-input>
<map-input name="TileRow" type="location" units="tilematrix" axis="row" min="0" max="262144"></map-input>
<map-link rel="tile" tref="https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/WMTS/tile/1.0.0/World_Imagery/default/default028mm/{TileMatrix}/{TileRow}/{TileCol}.jpg"></map-link>
</map-extent>
<map-extent label="Nat Geo" units="OSMTILE">
<map-extent label="Nat Geo" units="OSMTILE" checked>
<map-input name="TileMatrix" type="zoom" value="18" min="0" max="18"></map-input>
<map-input name="TileCol" type="location" units="tilematrix" axis="column" min="0" max="262144"></map-input>
<map-input name="TileRow" type="location" units="tilematrix" axis="row" min="0" max="262144"></map-input>
<map-link rel="tile" tref="https://server.arcgisonline.com/arcgis/rest/services/NatGeo_World_Map/MapServer/WMTS/tile/1.0.0/NatGeo_World_Map/default/default028mm/{TileMatrix}/{TileRow}/{TileCol}.jpg"></map-link>
</map-extent>
<map-extent label="Imagery" units="OSMTILE">
<map-extent label="Imagery" units="OSMTILE" checked>
<map-input name="TileMatrix" type="zoom" value="18" min="0" max="18"></map-input>
<map-input name="TileCol" type="location" units="tilematrix" axis="column" min="0" max="262144"></map-input>
<map-input name="TileRow" type="location" units="tilematrix" axis="row" min="0" max="262144"></map-input>
Expand All @@ -117,7 +117,7 @@ The following example shows a Web Map Service Request using `<map-link>` to requ
```html
<mapml-viewer projection="OSMTILE" zoom="4" lat="53.331" lon="-91.667" controls>
<layer- label="Toporama" checked="">
<map-extent xmlns="http://www.w3.org/1999/xhtml" units="OSMTILE">
<map-extent xmlns="http://www.w3.org/1999/xhtml" units="OSMTILE" checked>
<!-- URL parameters for WMS Request -->
<map-input name="z" type="zoom" value="18" min="4" max="18"></map-input>
<map-input name="w" type="width"></map-input>
Expand Down
8 changes: 4 additions & 4 deletions docs/elements/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,11 +167,11 @@ on the nature of the content.
```html
<mapml-viewer projection="OSMTILE" zoom="0" lat="45.409071" lon="-75.703411" controls>
<layer- label="OpenStreetMap" checked>
<map-extent units="OSMTILE" >
<map-extent units="OSMTILE" checked>
<map-input name="z" type="zoom" value="18" min="0" max="18" step="3"></map-input>
<map-input name="x" type="location" units="tilematrix" axis="column" min="0" max="262144" ></map-input>
<map-input name="y" type="location" units="tilematrix" axis="row" min="0" max="262144" ></map-input>
<map-link rel="tile" tref="https://tile.openstreetmap.org/{z}/{x}/{y}.png" />
<map-link rel="tile" tref="https://tile.openstreetmap.org/{z}/{x}/{y}.png" ></map-link>
</map-extent>
</layer->
</mapml-viewer>
Expand All @@ -187,7 +187,7 @@ labels, which may be duplicated on adjacent tiles many times over.
```html
<mapml-viewer projection="CBMTILE" lat="60" lon="-95" zoom="2" controls>
<layer- label="Tiled WMS GetMap" checked>
<map-extent units="CBMTILE">
<map-extent units="CBMTILE" checked>
<!-- the units and axis attributes here appear at odds -->
<!-- however for rel="tile" and units="tilematrix" together tell the map that
the event being serialized is relative to a tile in a tilematrix coordinate
Expand All @@ -200,7 +200,7 @@ labels, which may be duplicated on adjacent tiles many times over.
<map-link rel="tile" tref="https://datacube.services.geo.ca/ows/msi?SERVICE=WMS&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=TRUE&STYLES=msi-color&VERSION=1.3.0&LAYERS=msi&WIDTH=256&HEIGHT=256&CRS=EPSG:3978&BBOX={txmin},{tymin},{txmax},{tymax}" ></map-link>
<!-- a zoom input is necessary, but that's a bug:
https://github.com/Maps4HTML/Web-Map-Custom-Element/issues/669 -->
<map-input name="z" type="zoom" value="25" min="0" max="25"/>
<map-input name="z" type="zoom" value="25" min="0" max="25"></map-input>
</map-extent>
</layer->
</mapml-viewer>
Expand Down
2 changes: 1 addition & 1 deletion docs/elements/link.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ Projection values [defined by the polyfill](../mapml-viewer#projection) include:
<mapml-viewer projection="OSMTILE" zoom="1" lat="0" lon="0" controls>
<layer- label="OpenStreetMap" src="https://geogratis.gc.ca/mapml/en/osmtile/osm/" checked hidden ></layer->
<layer- label="TMS COG Source" checked>
<map-extent units="OSMTILE">
<map-extent units="OSMTILE" checked>
<map-input name="zoom" type="zoom" min="1" max="12"></map-input>
<map-input name="row" type="location" axis="row" units="tilematrix" ></map-input>
<map-input name="col" type="location" axis="column" units="tilematrix"></map-input>
Expand Down
6 changes: 3 additions & 3 deletions docs/elements/mapml.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ must contain one `<map-head>` element, followed by one `<map-body>` element.
<map-title>OpenStreetMap</map-title>
<meta http-equiv="Content-Type" content="text/mapml;projection=OSMTILE"/>
<meta charset="utf-8"/>
<map-link rel="license" href="https://www.openstreetmap.org/copyright" title="© OpenStreetMap contributors CC BY-SA"/>
<map-link rel="license" href="https://www.openstreetmap.org/copyright" title="© OpenStreetMap contributors CC BY-SA"></map-link>
</map-head>
<map-body>
<map-extent units="OSMTILE" >
<map-extent units="OSMTILE" checked="checked" hidden="hidden">
<map-input name="z" type="zoom" value="18" min="0" max="18"></map-input>
<map-input name="x" type="location" units="tilematrix" axis="column" min="0" max="262144" ></map-input>
<map-input name="y" type="location" units="tilematrix" axis="row" min="0" max="262144" ></map-input>
<map-link rel="tile" tref="https://tile.openstreetmap.org/{z}/{x}/{y}.png" />
<map-link rel="tile" tref="https://tile.openstreetmap.org/{z}/{x}/{y}.png" ></map-link>
</map-extent>
</map-body>
</mapml->
Expand Down
10 changes: 5 additions & 5 deletions docs/elements/select.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,20 +43,20 @@ This element contains the options for the `<map-select>` element. A `<map-select
### Change map source
```html
<mapml-viewer projection="OSMTILE" zoom="2" lat="65" lon="-90" controls="">
<layer- label="Basemap" checked="">
<map-extent units="OSMTILE" >
<layer- label="Basemap" checked>
<map-extent units="OSMTILE" checked>
<map-input name="z" type="zoom" value="18" min="0" max="18"></map-input>
<map-input name="x" type="location" units="tilematrix" axis="column" min="0" max="262144" ></map-input>
<map-input name="y" type="location" units="tilematrix" axis="row" min="0" max="262144" ></map-input>
<map-link rel="license" href="https://www.openstreetmap.org/copyright" title="OpenStreetMap"/>
<map-link rel="license" href="https://www.openstreetmap.bzh/" title="Breton OpenStreetMap Team"/>
<map-link rel="license" href="https://www.openstreetmap.org/copyright" title="OpenStreetMap"></map-link>
<map-link rel="license" href="https://www.openstreetmap.bzh/" title="Breton OpenStreetMap Team"></map-link>

<map-select id="urlOptions" name="source">
<map-option value="tile.openstreetmap.bzh/br">OpenStreetMap_BZH</map-option>
<map-option value="tile.openstreetmap.org">OpenStreetMap_Mapnik</map-option>
</map-select>

<map-link rel="tile" tref="https://{source}/{z}/{x}/{y}.png" />
<map-link rel="tile" tref="https://{source}/{z}/{x}/{y}.png" ></map-link>
</map-extent>
</layer->
</mapml-viewer>
Expand Down
4 changes: 2 additions & 2 deletions docs/layers/templated-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In this section, we will learn how to create a templated feature layer. A templa
```html
<layer- label="Alabama" checked>
<map-meta name="zoom" content="min=2,max=5"></map-meta>
<map-extent units="CBMTILE">
<map-extent units="CBMTILE" checked hidden>
<map-input name="z" type="zoom" min="2" max="18" value="0"></map-input>
<map-input name="xmin" type="location" units="gcrs" axis="longitude" position="top-left" min="-76" max="-74"></map-input>
<map-input name="ymin" type="location" units="gcrs" axis="latitude" position="bottom-right" min="45" max="46"></map-input>
Expand Down Expand Up @@ -93,7 +93,7 @@ Sets the zoom range of the layer. The layer will make requests from zoom levels
<mapml-viewer projection="CBMTILE" zoom="3" lat="45.5052040" lon="-75.2202344" controls>
<layer- label="Alabama" checked>
<map-meta name="zoom" content="min=2,max=5"></map-meta>
<map-extent units="CBMTILE">
<map-extent units="CBMTILE" checked hidden>
<map-input name="z" type="zoom" min="2" max="18" value="0"></map-input>
<map-input name="xmin" type="location" units="gcrs" axis="longitude" position="top-left" min="-76" max="-74"></map-input>
<map-input name="ymin" type="location" units="gcrs" axis="latitude" position="bottom-right" min="45" max="46"></map-input>
Expand Down
4 changes: 2 additions & 2 deletions docs/layers/templated-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ In this section, we will learn how to create a templated image layer. A template
```html
<layer- label="Toporama" checked>
<map-meta name="zoom" content="min=4,max=5"></map-meta>
<map-extent units="CBMTILE">
<map-extent units="CBMTILE" checked hidden>
<map-input name="z" type="zoom" value="19" min="4" max="4"></map-input>
<map-input name="w" type="width"></map-input>
<map-input name="h" type="height"></map-input>
Expand Down Expand Up @@ -95,7 +95,7 @@ Sets the zoom range of the layer, in the following example the user can zoom fro
<mapml-viewer projection="CBMTILE" zoom="4" lat="53.331" lon="-91.667" controls>
<layer- label="Toporama" checked>
<map-meta name="zoom" content="min=4,max=5"></map-meta>
<map-extent units="CBMTILE">
<map-extent units="CBMTILE" checked hidden>
<map-input name="z" type="zoom" value="19" min="4" max="4"></map-input>
<map-input name="w" type="width"></map-input>
<map-input name="h" type="height"></map-input>
Expand Down
4 changes: 2 additions & 2 deletions docs/layers/templated-tiles.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ In this section, we will learn how to create a templated tile layer. A templated

```html
<layer- label="Templated Tile Layer" checked>
<map-extent units="my-projection">
<map-extent units="my-projection" checked>
<map-input name="zoomLevel" type="zoom" min="1" max="1" value="0"></map-input>
<map-input name="row" type="location" axis="row" units="tilematrix" min="0" max="2"></map-input>
<map-input name="col" type="location" axis="column" units="tilematrix" min="0" max="2"></map-input>
Expand Down Expand Up @@ -87,7 +87,7 @@ Sets the native minimum and maximum [native zoom](http://example.org/). It also
<mapml-viewer projection="WGS84" zoom="1" lat="59.87304909" lon="-53.22587225" width="900" height="400" controls>
<layer- label="Inline Templated Tile" checked>
<map-meta name="zoom" content="min=1,max=2"></map-meta>
<map-extent units="WGS84">
<map-extent units="WGS84" checked hidden>
<map-input name="zoomLevel" type="zoom" min="1" max="1" value="0"></map-input>
<map-input name="row" type="location" axis="row" units="tilematrix" min="0" max="2"></map-input>
<map-input name="col" type="location" axis="column" units="tilematrix" min="0" max="2"></map-input>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ La carte :
<mapml-viewer projection="OSMTILE" zoom="0" lat="45" lon="-75" controls>
<layer- label="pavés personnalisés" checked>
<map-meta name="zoom" content="min=0,max=23" ></map-meta>
<map-extent units="OSMTILE">
<map-extent units="OSMTILE" checked hidden>
<map-input name="zoomLevel" type="zoom" min="0" max="23" value="1" ></map-input>
<map-input name="row" type="location" axis="row" units="tilematrix" min="0" max="2" ></map-input>
<map-input name="col" type="location" axis="column" units="tilematrix" min="0" max="2" ></map-input>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ let output = map.geojson2mapml(json);
<mapml-viewer projection="ATLAS_POLAR_MAP" zoom="2" lat="83.48919" lon="-87.7687" controls>
<layer- label="Carte polaire murale de l’Atlas du Canada" checked>
<map-link rel="license" title="Plateforme géospatiale fédérale canadienne" href="https://geoappext.nrcan.gc.ca/arcgis/rest/services/FGP/NCR_RCN/MapServer/"></map-link>
<map-extent units="ATLAS_POLAR_MAP">
<map-extent units="ATLAS_POLAR_MAP" checked hidden>
<map-input type="zoom" name="z" min="0" max="6" value="6" ></map-input>
<map-input type="location" name="x" axis="column" units="tilematrix" min="116" max="186"></map-input>
<map-input type="location" name="y" axis="row" units="tilematrix" min="125" max="184"></map-input>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Exemple d’un élément `<map-extent>` servant à charger des pavés d’images
```html
<mapml-viewer projection="OSMTILE" lat="10" lon="0" zoom="1">
<layer- label="OpenStreetMap" checked>
<map-extent units="OSMTILE">
<map-extent units="OSMTILE" checked hidden>
<map-input name="z" type="zoom" value="18" min="0" max="18"></map-input>
<map-input name="x" type="location" units="tilematrix" axis="column" min="0" max="262144"></map-input>
<map-input name="y" type="location" units="tilematrix" axis="row" min="0" max="262144"></map-input>
Expand Down Expand Up @@ -76,19 +76,19 @@ L’exemple ci-dessous montre plusieurs éléments `<map-extent>` dans un couche
<!—Modifier la carte de base en cliquant sur les points de suspension (…) de la couche de la carte de base -->
<layer- label="Carte de base" checked="">
<!—Cette étendue est masquée au niveau du contrôle de la couche, puisqu’aucune étiquette n’est fournie -->
<map-extent units="OSMTILE">
<map-extent units="OSMTILE" checked>
<map-input name="TileMatrix" type="zoom" value="18" min="0" max="18"></map-input>
<map-input name="TileCol" type="location" units="tilematrix" axis="column" min="0" max="262144"></map-input>
<map-input name="TileRow" type="location" units="tilematrix" axis="row" min="0" max="262144"></map-input>
<map-link rel="tile" tref="https://server.arcgisonline.com/arcgis/rest/services/World_Imagery/MapServer/WMTS/tile/1.0.0/World_Imagery/default/default028mm/{TileMatrix}/{TileRow}/{TileCol}.jpg"></map-link>
</map-extent>
<map-extent label="Nat Geo" units="OSMTILE">
<map-extent label="Nat Geo" units="OSMTILE" checked>
<map-input name="TileMatrix" type="zoom" value="18" min="0" max="18"></map-input>
<map-input name="TileCol" type="location" units="tilematrix" axis="column" min="0" max="262144"></map-input>
<map-input name="TileRow" type="location" units="tilematrix" axis="row" min="0" max="262144"></map-input>
<map-link rel="tile" tref="https://server.arcgisonline.com/arcgis/rest/services/NatGeo_World_Map/MapServer/WMTS/tile/1.0.0/NatGeo_World_Map/default/default028mm/{TileMatrix}/{TileRow}/{TileCol}.jpg"></map-link>
</map-extent>
<map-extent label="Imagery" units="OSMTILE">
<map-extent label="Imagery" units="OSMTILE" checked>
<map-input name="TileMatrix" type="zoom" value="18" min="0" max="18"></map-input>
<map-input name="TileCol" type="location" units="tilematrix" axis="column" min="0" max="262144"></map-input>
<map-input name="TileRow" type="location" units="tilematrix" axis="row" min="0" max="262144"></map-input>
Expand All @@ -106,7 +106,7 @@ L’exemple ci-dessous montre une demande de service de carte en ligne utilisant
```html
<mapml-viewer projection="OSMTILE" zoom="4" lat="53.331" lon="-91.667" controls>
<layer- label="Toporama" checked="">
<map-extent xmlns="http://www.w3.org/1999/xhtml" units="OSMTILE">
<map-extent xmlns="http://www.w3.org/1999/xhtml" units="OSMTILE" checked>
<!—Paramètres URL de la demande de service de carte en ligne -->
<map-input name="z" type="zoom" value="18" min="4" max="18"></map-input>
<map-input name="w" type="width"></map-input>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,11 +115,11 @@ Définit la plage de zoom en fonction des ressources qui sont demandées à l’
```html
<mapml-viewer projection="OSMTILE" zoom="0" lat="45.409071" lon="-75.703411" controls>
<layer- label="OpenStreetMap" checked>
<map-extent units="OSMTILE" >
<map-extent units="OSMTILE" checked>
<map-input name="z" type="zoom" value="18" min="0" max="18" step="3"></map-input>
<map-input name="x" type="location" units="tilematrix" axis="column" min="0" max="262144" ></map-input>
<map-input name="y" type="location" units="tilematrix" axis="row" min="0" max="262144" ></map-input>
<map-link rel="tile" tref="https://tile.openstreetmap.org/{z}/{x}/{y}.png" />
<map-link rel="tile" tref="https://tile.openstreetmap.org/{z}/{x}/{y}.png" ></map-link>
</map-extent>
</layer->
</mapml-viewer>
Expand All @@ -132,7 +132,7 @@ Les WMS peuvent être lents à réagir, même s’ils le font rapidement en réa
```html
<mapml-viewer projection="CBMTILE" lat="60" lon="-95" zoom="2" controls>
<layer- label="Demande de pavés WMS GetMap" checked>
<map-extent units="CBMTILE">
<map-extent units="CBMTILE" checked>
<!—ici, les unités et les attributs d’axe semblent contradictoires -->
<!—cependant, rel="tile" et units="tilematrix" informent tous les deux la carte que l’événement sérialisé a trait à un pavé dans le tcrs -->
<map-input name="txmin" type="location" rel="tile" position="top-left" axis="easting" units="tilematrix" ></map-input>
Expand All @@ -143,7 +143,7 @@ Les WMS peuvent être lents à réagir, même s’ils le font rapidement en réa
<map-link rel="tile" tref="https://datacube.services.geo.ca/ows/msi?SERVICE=WMS&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=TRUE&STYLES=msi-color&VERSION=1.3.0&LAYERS=msi&WIDTH=256&HEIGHT=256&CRS=EPSG:3978&BBOX={txmin},{tymin},{txmax},{tymax}" ></map-link>
<!—il faut préciser un niveau de zoom, mais il s’agit d’un bogue :
https://github.com/Maps4HTML/Web-Map-Custom-Element/issues/669 -->
<map-input name="z" type="zoom" value="25" min="0" max="25"/>
<map-input name="z" type="zoom" value="25" min="0" max="25"></map-input>
</map-extent>
</layer->
</mapml-viewer>
Expand Down
Loading

0 comments on commit 4079a8e

Please sign in to comment.