-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathtechnical-drawings.html
222 lines (196 loc) · 6.66 KB
/
technical-drawings.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Non-geographic content in map viewers — Maps for HTML reference examples</title>
<link rel="stylesheet" href="examples.css">
<script src="api-keys.js"></script>
</head>
<body>
<h1>Examples for
<a href="../#use-case-technical-drawings">Use Case: Display drawings or schematics without geographic coordinates</a>
</h1>
<p>
***Introduction***
</p>
<details>
<summary>Jump to section…</summary>
<ul class="toc">
<li>Iframe embeds: <ul>
<li><a href="#google-maps-embed">Google Maps embed</a></li>
<li><a href="#openstreetmap">OpenStreetMap embed</a></li>
<li><a href="#bing-maps-embed">Bing Maps embed</a></li>
<li><a href="#mapbox-embed">Mapbox Studio embed</a></li>
</ul></li>
<li>Client-side frameworks: <ul>
<li><a href="#leaflet-js">Leaflet.js API</a></li>
<li><a href="#openlayers">OpenLayers API</a></li>
<li><a href="#google-maps-api">Google Maps Platform API</a></li>
<li><a href="#bing-maps-api">Bing Maps Control API</a></li>
<li><a href="#mapkit-js">MapKit JS (Apple Maps) API</a></li>
<li><a href="#mapbox-api">Mapbox GL JS API</a></li>
<li><a href="#tomtom">TomTom Maps SDK for Web with vector maps</a></li>
<li><a href="#d3-geo">D3 Geographies APIs</a></li>
</ul></li>
</ul>
</details>
<section id="google-maps-embed">
<h2>Google Maps embed</h2>
***TODO<!--
Copy & paste embed code or <p>Not applicable</p>
-->***
</section>
<section id="openstreetmap">
<h2>OpenStreetMap embed</h2>
***TODO<!--
Copy & paste embed code or <p>Not applicable</p>
-->***
</section>
<section id="bing-maps-embed">
<h2>Bing Maps embed</h2>
***TODO<!--
Copy & paste embed code or <p>Not applicable</p>
-->***
</section>
<section id="mapbox-embed">
<h2>MapBox Studio embed</h2>
***TODO<!--
Copy & paste embed code or <p>Not applicable</p>
-->***
</section>
<section id="leaflet-js">
<h2>Leaflet.js</h2>
<div id="leaflet-js-map" style="width: 600px; height: 450px;"></div>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ=="
crossorigin=""/>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-GffPMF3RvMeYyc1LWMHtK8EbPv0iNZ8/oTtHPx9/cc2ILxQ+u905qIwdpULaqDkyBKgOaB57QTMg7ztg8Jm2Og=="
crossorigin=""></script>
<code class="script-example">
<script>
{
const map = L.map('leaflet-js-map').setView([0,0], 1);
L.tileLayer('https://maps4html.org/TiledArt-Rousseau/TheBanksOfTheBièvreNearBicêtre/{z}/{x}/{-y}.png', {
minZoom: 0,
maxZoom: 4,
attribution: 'Henri Rousseau: The Banks Of The Bièvre Near Bicêtre'
}).addTo(map);
}
</script>
</code>
</section>
<section id="openlayers">
<h2>OpenLayers</h2>
<div id="openlayers-map" style="width: 600px; height: 450px;"></div>
<link rel="stylesheet" href="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/css/ol.css" type="text/css">
<script src="https://cdn.rawgit.com/openlayers/openlayers.github.io/master/en/v5.3.0/build/ol.js"></script>
<code class="script-example">
<script>
const map = (() => {
const pictureLayer = new ol.layer.Tile({
source: new ol.source.TileJSON({
url: 'https://maps4html.org/TiledArt-Rousseau/TheBanksOfTheBièvreNearBicêtre/tiles.json',
})
});
const view = new ol.View({
center: [0, 0],
zoom: 1,
maxZoom: 4,
minZoom: 0,
});
const map = new ol.Map({
view: view,
layers: [
pictureLayer
],
controls: [
new ol.control.ZoomSlider()
],
target: 'openlayers-map',
});
return map;
})();
</script>
</code>
</section>
<section id="google-maps-api">
<h2>Google Maps API</h2>
***TODO<!--
Replace with code including link/external scripts. Custom script has <code class="script-example"> parent element.
or <p>Not applicable</p>
-->***
</section>
<section id="bing-maps-api">
<h2>Bing Maps Control API</h2>
***TODO<!--
Replace with code including link/external scripts. Custom script has <code class="script-example"> parent element.
or <p>Not applicable</p>
-->***
</section>
<section id="mapkit-js">
<h2>MapKit JS (Apple Maps) API</h2>
***TODO<!--
Replace with code including link/external scripts. Custom script has <code class="script-example"> parent element.
or <p>Not applicable</p>
-->***
</section>
<section id="mapbox-api">
<h2>Mapbox GL JS API</h2>
<div id="mapbox-api-map" style="width: 600px; height: 450px;"></div>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v1.0.0/mapbox-gl.css' rel='stylesheet' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v1.0.0/mapbox-gl.js'></script>
<code class="script-example">
<script>
{ // block to restrict let and const scope to this example
// set up map
mapboxgl.accessToken = m4h.keys.mapboxGL;
const mapCenter = [0, 0];
const map = new mapboxgl.Map({
container: 'mapbox-api-map',
style: {
"version": 8,
"sources": {
"raster-tiles": {
"type": "raster",
"scheme": "tms",
"tiles": ["https://maps4html.org/TiledArt-Rousseau/TheBanksOfTheBièvreNearBicêtre/{z}/{x}/{y}.png"],
"tileSize": 256,
"attribution": 'Henri Rousseau: The Banks Of The Bièvre Near Bicêtre'
}
},
"layers": [{
"id": "simple-tiles",
"type": "raster",
"source": "raster-tiles",
"minzoom": 0,
"maxzoom": 4
}]
},
center: mapCenter,
zoom: 1
});
map.addControl(new mapboxgl.NavigationControl());
}
</script>
</code>
</section>
<section id="tomtom">
<h2>TomTom Maps SDK for Web</h2>
***TODO<!--
Replace with code including link/external scripts. Custom script has <code class="script-example"> parent element.
or <p>Not applicable</p>
-->***
</section>
<section id="d3-geo">
<h2>D3 Geographies APIs</h2>
***TODO<!--
Replace with code including link/external scripts. Custom script has <code class="script-example"> parent element.
or <p>Not applicable</p>
-->***
</section>
</body>
</html>