forked from TimBroddin/fruitymaps
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
130 lines (108 loc) · 4.22 KB
/
index.html
File metadata and controls
130 lines (108 loc) · 4.22 KB
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
<!DOCTYPE html>
<html>
<head>
<title>Fruity Maps - Apple Maps in your browser!</title>
<meta charset="utf-8"/>
<meta property="og:url" content="http://fruitymaps.com"/>
<meta property="og:type" content="website"/>
<meta property="og:title" content="Fruity Maps - Apple Maps in your browser!"/>
<meta property="og:description" content="Use Apple Maps in your browser!"/>
<meta property="og:image" content="http://fruitymaps.com/og.png"/>
<script src="https://cdn.apple-mapkit.com/mk/3.0.0/mapkit.js"></script>
<script>
document.addEventListener("DOMContentLoaded", function (event) {
mapkit.init({
apiKey: "b2af5300a3c2ea9b5d38c782c7d2909dc88d6621",
bootstrapUrl: "http://fruitymaps.com/bootstrap.json"
});
var map = new mapkit.Map('map');
var sanFrancisco = new mapkit.CoordinateRegion(
new mapkit.Coordinate(37.782851, -122.409333),
new mapkit.CoordinateSpan(0.16, 0.16)
);
map.setRegionAnimated(sanFrancisco);
map.showsUserLocation = false;
map.showsUserLocationControl = true;
});
</script>
<style>
body {
margin: 0;
padding: 0;
}
#map {
width: 100vw;
height: 100vh;
background-color: #EFEFEF;
}
#overlay {
position: absolute;
padding: 20px;
background-color: rgba(255, 255, 255, 0.8);
right: 0px;
width: 500px;
z-index: 2000;
font-family: "Helvetica Neue", Helvetica;
line-height: 1.5;
}
#overlay a {
color: black;
}
.share {
display: flex;
justify-content: space-between;
align-items: center;
}
</style>
</head>
<body>
<div id="fb-root"></div>
<script>(function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s);
js.id = id;
js.src = "//connect.facebook.net/en_GB/sdk.js#xfbml=1&version=v2.6&appId=934785546636838";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div id="overlay">
<p>Fruity Maps is a proof of concept of using the unpublished Apple Maps API in your browser. I'll add some neat
stuff soon. Created by <a href="http://twitter.com/TimBroddin">Tim Broddin</a>.</p>
<div class="share">
<div class="fb-like" data-href="http://fruitymaps.com" data-layout="button_count" data-action="like"
data-show-faces="false" data-share="true"></div>
<a href="https://twitter.com/share" class="twitter-share-button" data-via="TimBroddin">Tweet</a>
<a class="github-button" href="https://github.com/timbroddin/fruitymaps/fork" data-icon="octicon-repo-forked"
data-style="mega" data-count-href="/timbroddin/fruitymaps/network"
data-count-api="/repos/timbroddin/fruitymaps#forks_count" data-count-aria-label="# forks on GitHub"
aria-label="Fork timbroddin/fruitymaps on GitHub">Fork</a>
</div>
</div>
<div id="map"></div>
<script>
(function (i, s, o, g, r, a, m) {
i['GoogleAnalyticsObject'] = r;
i[r] = i[r] || function () {
(i[r].q = i[r].q || []).push(arguments)
}, i[r].l = 1 * new Date();
a = s.createElement(o),
m = s.getElementsByTagName(o)[0];
a.async = 1;
a.src = g;
m.parentNode.insertBefore(a, m)
})(window, document, 'script', 'https://www.google-analytics.com/analytics.js', 'ga');
ga('create', 'UA-76624329-1', 'auto');
ga('send', 'pageview');
</script>
<script async defer id="github-bjs" src="https://buttons.github.io/buttons.js"></script>
<script>!function (d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0], p = /^http:/.test(d.location) ? 'http' : 'https';
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = p + '://platform.twitter.com/widgets.js';
fjs.parentNode.insertBefore(js, fjs);
}
}(document, 'script', 'twitter-wjs');</script>
</body>
</html>