forked from OmarShehata/google-earth-as-gltf
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
68 lines (60 loc) · 2.44 KB
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" type="text/css" href="//fonts.googleapis.com/css?family=Quicksand" />
<link rel="stylesheet" type="text/css" href="./style.css">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css"
integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY="
crossorigin=""/>
<script src="https://unpkg.com/leaflet@1.9.4/dist/leaflet.js"
integrity="sha256-20nQCchB9co0qIjJZRGuk2/Z9VM+kNiyxNV1lvTlZBo="
crossorigin=""></script>
<title>Google Earth as glTF</title>
</head>
<body>
<div id="settings">
<div id="centered-container">
<label>Google API Key</label>
<input id="google-api-key" type="text"/>
<label>Lat,Lng</label>
<input id="lat-lng" type="text" value="40.6891,-74.0446"/>
<label>Screen space error</label>
<input type="number" value="8" id="sse">
<label>Zoom: <span id="zoom">16</span></label>
<div id="map-container">
<div id="map"></div>
</div>
</div>
<button id="fetch">Fetch tiles</button>
<div id="debug-slider-container">
<label>Tile debug slider (<span id="tile-count"></span>)</label>
<input id="debug-slider" type="range" min="-1" max="100" value="100">
</div>
<pre id="fetch-log" class="log"></pre>
<button id="download">Download combined glTF</button>
<br/><br/><a href="https://github.com/OmarShehata/google-earth-as-gltf#google-earth-as-gltf-models" target="_blank" class="settings-link">About</a><br/><br/>
</div>
<div id="instructions">
<center>
<p>
This app demonstrates fetching & rendering Google Earth 3D Tiles in ThreeJS
</p>
</center>
<ol>
<li>Get a <a href="https://developers.google.com/maps/documentation/tile/get-api-key" target="_blank">Google "Map Tiles"</a> API key </li>
<li>
Paste it in the settings top left
</li>
<li>
Click <span id="fetch-tiles-instruction-text">fetch tiles</span>
</li>
</ol>
<center>
<p><a href="https://github.com/OmarShehata/google-earth-as-gltf#google-earth-as-gltf-models" target="_blank">Learn more</a> </p>
</center>
</div>
<script type="module" src="/src/index.js"></script>
</body>
</html>