Skip to content

Commit abec92f

Browse files
committed
Update the tile-cache-OSMTILE.mapml test file to work with actual OpenStreetMap. Note that there is still the matter of making the {s} variable work without hardcoding. This is likely only possible if we invent another input type=random-value or something like that, which I'm not keen to do, except that maybe because OSM is a globally important mapping organization we should make such a concession. It seems a hack though, and likely is no longer necessary with HTTP 2 etc.
1 parent 21d397a commit abec92f

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

demo/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
<!-- the @width / @height attributes take precedence over properties, but currently don't change to reflect updates -->
3737
<!-- <img usemap="#dowslake" src="map1.png" width="700" height="400" alt="Dow's Lake area" />-->
3838
<map name="dowslake" is="web-map" zoom="17" lat="45.398043" lon="-75.70683" width="700" height="400" controls hidden>
39-
<layer- id="osm" src="http://geogratis.gc.ca/mapml/en/osmtile/osm/" label="Open Street Map" checked ></layer->
39+
<layer- id="osm" src="tile-cache-OSMTILE.mapml" label="Open Street Map" checked ></layer->
4040
<device-location centered></device-location>
4141
<!-- <layer- id="cbmt" label="Canada Base Map" src="http://geogratis.gc.ca/mapml/en/osmtile/cbmt/" checked></layer->-->
4242
<!-- <layer- id="canvec" label="CanVec+ 031G" src="http://geogratis.gc.ca/mapml/canvec/50k/features/" class="transparency"></layer->

demo/tile-cache-OSMTILE.mapml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,20 @@
44
<meta http-equiv="Content-Type" content="text/mapml"/>
55
<meta charset="utf-8"/>
66
<meta name="projection" content="OSMTILE"/>
7-
<meta name="zoom" content="min=0,max=15"/>
8-
<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"/>
7+
<link rel="license" href="https://www.openstreetmap.org/copyright" title="© Open Street Map Contributors"/>
98
</head>
109
<body>
1110
<extent units="OSMTILE">
12-
<input name="z" type="zoom" value="0" min="0" max="15"/>
13-
<input name="x" type="location" units="tile" axis="column"/>
14-
<input name="y" type="location" units="tile" axis="row"/>
11+
<input name="z" type="zoom" value="0" min="0" max="18"/>
12+
<input name="x" type="location" units="tilematrix" axis="column"/>
13+
<input name="y" type="location" units="tilematrix" axis="row"/>
1514
<input name="xmin" type="xmin" min="0.0" max="256.0"/>
1615
<input name="ymin" type="ymin" min="0.0" max="256.0"/>
1716
<input name="xmax" type="xmax" min="0.0" max="256.0"/>
1817
<input name="ymax" type="ymax" min="0.0" max="256.0"/>
1918
<input name="projection" type="projection" value="OSMTILE"/>
20-
<template type="tile" tref="https://geoappext.nrcan.gc.ca/arcgis/rest/services/BaseMaps/CBMT_CBCT_GEOM_3857/MapServer/tile/{z}/{y}/{x}?m4h=t"/>
21-
<template type="tile" tref="https://geoappext.nrcan.gc.ca/arcgis/rest/services/BaseMaps/CBMT_TXT_3857/MapServer/tile/{z}/{y}/{x}?m4h=t"/>
19+
<input name="s" type="hidden"/>
20+
<template type="tile" tref="https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"/>
2221
</extent>
2322
</body>
2423
</mapml>

0 commit comments

Comments
 (0)