-
Notifications
You must be signed in to change notification settings - Fork 1
/
example.html
149 lines (142 loc) · 6.01 KB
/
example.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
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<!doctype html>
<html class="no-js" lang="">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="bower_components/leaflet/dist/leaflet.css" />
<link rel="stylesheet" href="bower_components/leaflet.markercluster/dist/MarkerCluster.Default.css" />
<link rel="stylesheet" href="relational-map.css" />
<style type="text/css">
.marker-cluster.users, .marker-cluster.users div {
background-color: rgba(0, 255, 0, 0.6);
}
.marker-cluster.places, .marker-cluster.places div, .marker-cluster.users.places {
background-color: rgba(255, 0, 0, 0.6);
}
.marker-cluster.users.places div {
background-color: rgba(0, 255, 0, 0.6);
}
</style>
</head>
<body>
<div id="map"></div>
<script src="bower_components/leaflet/dist/leaflet.js"></script>
<script src="bower_components/leaflet.markercluster/dist/leaflet.markercluster.js"></script>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/lodash/lodash.js"></script>
<script src="relational-map.js"></script>
<script type="text/javascript">
var rm = new relationalMap('map');
rm.addOjectType('places','#ff0000',[
{
id: 0,
name: 'Denver',
link: 'https://www.google.com/?q=denver',
image: 'https://static.greatbigcanvas.com/images/square/panoramic-images/denver-co,74984.jpg?max=128',
locations: [
['39.7392','-104.9903']
],
users: [0,1,3,4,5]
},
{
id: 1,
name: 'San Francisco',
link: 'https://www.google.com/?q=san+francisco',
image: 'http://s4.evcdn.com/images/block/I0-001/028/740/227-5.jpeg_/d10e-san-francisco-celebrating-fearles-27.jpeg',
locations: [
['37.7749','-122.4194']
],
users: [1,2]
},
{
id: 2,
name: 'New York',
link: 'https://www.google.com/?q=new+york',
image: 'http://static.greatbigcanvas.com/images/square/wild-apple-studios/new-york-view,1052265.jpg?max=128',
locations: [
['40.7128','-74.0059']
],
users: [2]
},
{
id: 3,
name: 'Seattle',
link: 'https://www.google.com/?q=seattle',
image: 'http://s2.evcdn.com/images/block/I0-001/028/627/965-2.jpeg_/seattle-professional-womens-salon-june-2016-65.jpeg',
locations: [
['47.6062', -'122.3321']
],
users: [2,3,4,5]
}
]);
rm.addOjectType('users','#00ff00',[
{
id: 0,
name: 'Johnny Mercer',
link: 'https://www.google.com/?q=johnny+mercer',
image: 'http://ichef.bbci.co.uk/images/ic/256x256/p02h3qv2.jpg',
locations: [
['32.0835','-81.0998']
],
places: [0]
},
{
id: 1,
name: 'Muddy Waters',
link: 'https://www.google.com/?q=muddy+waters',
image: 'https://d1itmove024qgx.cloudfront.net/70f46943863f42a8e49d0096ca9a58e73aaa2c39.jpg',
locations: [
['41.8781','-87.6298'],
['29.9511','-90.0715']
],
places: [0,1]
},
{
id: 2,
name: 'Nirvana',
link: 'https://www.google.com/?q=nirvana',
image: 'https://i.guim.co.uk/img/static/sys-images/Guardian/Pix/pictures/2004/12/02/nirvana.jpg?w=620&q=55&auto=format&usm=12&fit=max&s=aa3225921e2b08470ea798f167b9e81c',
locations: [
['47.6062','-122.3321']
],
places: [3]
},
{
id: 3,
name: 'Soundgarden',
link: 'https://www.google.com/?q=soundgarden',
image: 'http://ichef.bbci.co.uk/images/ic/256x256/p01bqdxl.jpg',
locations: [
['47.6854393','-122.2499612']
],
places: [3]
},
{
id: 4,
name: 'Mudhoney',
link: 'https://www.google.com/?q=mudhoney',
image: 'http://is2.mzstatic.com/image/thumb/Music/v4/b2/fa/ac/b2faacd3-9799-fb71-28b5-653f77d4584b/source/256x256bb.jpg',
locations: [
['47.6131906','-122.3405593']
],
places: [3]
},
{
id: 5,
name: 'The Melvins',
link: 'https://www.google.com/?q=the+melvins',
image: 'http://s2.evcdn.com/images/medium/I0-001/028/174/397-6.jpeg_/melvins-live-concert-97.jpeg',
locations: [
['47.0032826','-123.6608172']
],
places: [3]
}
]);
rm.view_text = 'View More';
rm.createMap(true);
</script>
</body>
</html>