-
Notifications
You must be signed in to change notification settings - Fork 1
/
trial.html
56 lines (53 loc) · 1.41 KB
/
trial.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
<!DOCTYPE html>
<html>
<head>
<script src='https://api.mapbox.com/mapbox-gl-js/v0.20.1/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v0.20.1/mapbox-gl.css' rel='stylesheet' />
<style>
body {
margin:0;
padding:0;
}
#mapContain {
position: absolute;
top: 0; bottom: 0; left: 0; right:0;
width: 100%; height: 100%;
padding: 0px;
}
</style>
<script language="Javascript">
var Width=900
var Height=1080
var Left=(screen.width/2)-(Width/2)
var Top=(screen.heigt/2)-(Height/2)
var Autoclose=true
function openFrameless(url) {
Frameless = window.open(url,"noframewin","fullscreen")
FrameLess.document.body.style.overflow="auto" // auto scrollbars
FrameLess.resizeTo(Width,Height) // resize
FrameLess.moveTo(Left,Top) // position
FrameLess.focus()
if (Autoclose){
window.onunload = function(){
FrameLess.close()
}
}
}
</script>
</head>
<body onload = "openFrameless('trial2.html')">
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8">
</script>
<div id="mapContain">
</div>
<script>
mapboxgl.accessToken = 'pk.eyJ1IjoibWF5YW5rb2poYSIsImEiOiJfeGl3Y01jIn0.Z3VjUlCe-W63PLsPzY_7Cw';
var map = new mapboxgl.Map({
container: 'mapContain',
style: 'mapbox://styles/mapbox/streets-v9',
center: [106.83, -6.2],
zoom: 10
});
</script>
</body>
</html>