-
Notifications
You must be signed in to change notification settings - Fork 7
/
index.html
67 lines (52 loc) · 2.52 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
<html>
<head>
<title>OSM-based street map of Earth</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="//cdn.melown.com/libs/vtsjs/builtin/v2/browser/vts-browser.min.css" />
<script type="text/javascript" src="//cdn.melown.com/libs/vtsjs/builtin/v2/browser/vts-browser.min.js"></script>
<script type="text/javascript" src="//cdn.melown.com/libs/vtsjs/support/v2/start-browser.js"></script>
<script type="text/javascript" src="./style/01-all-lines.js"></script>
<script type="text/javascript" src="./style/02-basic-filtering-motorways.js"></script>
<script type="text/javascript" src="./style/03-outlines-zindex.js"></script>
<script type="text/javascript" src="./style/04-inheritance-fancy-motorways.js"></script>
<script type="text/javascript" src="./style/05-other-roads.js"></script>
<script type="text/javascript" src="./style/06-street-labels.js"></script>
<script type="text/javascript" src="./style/07-city-labels.js"></script>
</head>
<body style = "padding: 0; margin: 0;">
<div id="map-div" style="width:100%; height:100%;">
</div>
<script>
var browser = null;
(function startDemo() {
var params = vtsParseUrlParams();
// URL of map configuration
params['map'] = '//altair.mlwn.se/store/map-config/osm-3d-street-map/mapConfig.json';
// Allow double click to center to clicked point
params['jumpAllowed'] = true;
params['positionInUrl'] = true;
// parameters for handling importance of city labels
params['mapFeaturesReduceMode'] = 'scr-count7';
params['mapFeaturesReduceParams'] = [ 0.05, 0.15, 11, 1, 1000 ];
// create map in the html div with id 'map-div'
// parameter 'map' sets path to the map which will be displayed
browser = vts.browser('map-div', params);
//check whether browser is supported
if (!browser) {
console.log('Your web browser does not support WebGL');
return;
}
//callback once is map config loaded
browser.on('map-loaded', onMapLoaded);
})();
function onMapLoaded(){
var view = browser.map.getView();
// override style of geodata with custom style
view.freeLayers.osm = {
style : $07CityLabels
}
browser.map.setView(view);
}
</script>
</body>
</html>