forked from techjb/Vector-Tiles-Google-Maps
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
44 lines (44 loc) · 2.19 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<title>Examples</title>
</head>
<body>
<h1>Examples</h1>
<ol>
<li><a href="./examples/basic.html">Basic</a> - Basic loading vector tiles with debug enabled.</li>
<li><a href="./examples/cache.html">Cache</a> - Cache enabled.</li>
<li><a href="./examples/click.html">Click</a> - Click to select one or multiple features.</li>
<li><a href="./examples/custom-draw.html">Custom draw</a> - Custom draw function for each feature.</li>
<li><a href="./examples/filter.html">Filter</a> - Filter features by it properties.</li>
<li><a href="./examples/hover.html">Hover</a> - On mouse hover event.</li>
<li><a href="./examples/layers.html">Layers</a> - Add remove vector tiles layers.</li>
<li><a href="./examples/point-linestring-polygon.html">Point, linestring and polygon</a> - Show all type of geometries.</li>
<li><a href="./examples/preselected-features.html">Preselected features</a> - Set features as selected before loading.</li>
<li><a href="./examples/style-filter-layer.html">Style filter and layer</a> - Update the style, filter and visible layers simultaneously.</li>
<li><a href="./examples/styles-feature.html">Styles feature</a> - Style based on feature properties.</li>
<li><a href="./examples/styles.html">Styles</a> - Change style dynamically.</li>
</ol>
<h2>Set API Key</h2>
<p>You must use a valid Google Maps API key. If you do not have one, you can get one <a href="https://developers.google.com/maps/documentation/javascript/get-api-key">here.</a></p>
<div>
<label for="apiKey">API Key: </label>
<input type="text" id="apiKey" name="input" />
<button id="setApiKey" onclick="storeAPIKey()">Set API Key</button>
</div>
<script>
function storeAPIKey() {
var apiKey = document.getElementById("apiKey").value;
localStorage.setItem("apiKey", apiKey);
}
// load the API key from local storage if it exists
var apiKey = localStorage.getItem("apiKey");
if (apiKey) {
document.getElementById("apiKey").value = apiKey;
}
</script>
</body>
</html>