Blame view

examples/speed_test_example.html 3.16 KB
dbaadcdd8   Tom Huang   Signed-off-by: To...
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
  <!doctype html>
  <html>
    <head>
      <meta charset="utf-8">
      <title>MarkerClusterer v3 Speed Test Example</title>
  
      <style>
        body {
          margin: 0;
          padding: 0;
          font-family: Arial;
          font-size: 14px;
        }
        #panel {
          float: left;
          width: 300px;
          height: 550px;
        }
        #map-container {
          margin-left: 300px;
        }
        #map {
          width: 100%;
          height: 550px;
        }
        #markerlist {
          height: 400px;
          margin: 10px 5px 0 10px;
          overflow: auto;
        }
        .title {
          border-bottom: 1px solid #e0ecff;
          overflow: hidden;
          width: 256px;
          cursor: pointer;
          padding: 2px 0;
          display: block;
          color: #000;
          text-decoration: none;
        }
        .title:visited {
          color: #000;
        }
        .title:hover {
          background: #e0ecff;
        }
        #timetaken {
          color: #f00;
        }
        .info {
          width: 200px;
        }
        .info img {
          border: 0;
        }
        .info-body {
          width: 200px;
          height: 200px;
          line-height: 200px;
          margin: 2px 0;
          text-align: center;
          overflow: hidden;
        }
        .info-img {
          height: 220px;
          width: 200px;
        }
      </style>
  
      <script src="https://maps.googleapis.com/maps/api/js"></script>
      <script src="data.json"></script>
      <script>
        var script = '<script type="text/javascript" src="../src/markerclusterer';
        if (document.location.search.indexOf('compiled') !== -1) {
          script += '_compiled';
        }
        script += '.js"><' + '/script>';
        document.write(script);
      </script>
      <script src="speed_test.js"></script>
  
      <script>
        google.maps.event.addDomListener(window, 'load', speedTest.init);
      </script>
      <script>
        var _gaq = _gaq || [];
        _gaq.push(['_setAccount', 'UA-12846745-20']);
        _gaq.push(['_trackPageview']);
  
        (function() {
          var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
          ga.src = ('https:' === document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
          var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
        })();
      </script>
    </head>
  
    <body>
      <div id="panel">
        <h3>An example of MarkerClusterer v3</h3>
        <p>
          <a href="?compiled">Compiled</a> |
          <a href="?">Standard</a> version of the script.
        </p>
  
        <div>
          <input type="checkbox" checked="checked" id="usegmm"/>
          <span>Use MarkerClusterer</span>
        </div>
  
        <div>
          Markers:
          <select id="nummarkers">
            <option value="10">10</option>
            <option value="50">50</option>
            <option value="100" selected="selected">100</option>
            <option value="500">500</option>
            <option value="1000">1000</option>
          </select>
  
          <span>Time used: <span id="timetaken"></span> ms</span>
        </div>
  
        <strong>Marker List</strong>
        <div id="markerlist">
  
        </div>
      </div>
      <div id="map-container">
        <div id="map"></div>
      </div>
    </body>
  </html>