Skip to content

Commit c7a664f

Browse files
authored
Add files via upload
1 parent 8e9353b commit c7a664f

File tree

2 files changed

+272
-192
lines changed

2 files changed

+272
-192
lines changed

v180/ex1/index.html

Lines changed: 22 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -50,22 +50,9 @@
5050
padding: 12px;
5151
}
5252

53-
.map_viewport {
54-
height: 256px;
55-
width: 100%;
56-
position: relative;
57-
background: #EFEFEF;
58-
display: block;
59-
overflow: hidden;
60-
border: 1px solid #AAAAAA;
61-
margin: 6px 0;
62-
padding: 0;
63-
}
64-
65-
.center_div {
53+
.padl_20 {
6654
margin: 0;
67-
padding: 6px;
68-
text-align: center;
55+
padding: 12px 0 0 20px;
6956
}
7057
</style>
7158
</head>
@@ -88,37 +75,42 @@
8875
omitting the need to create Google map markers as input to a clusterer.
8976
</p>
9077
<p>
91-
Note we do not display any markers on the map, as we are only measuring the time
78+
Note we do not display any markers on a map, as we are only measuring the time
9279
to create them.
9380
</p>
9481
<form id="frm1" onsubmit="return tester_obj.test_submit( event );">
95-
<div class="center_div">
96-
<b>Enter the number of random data points to create within the map bounds:</b>
97-
</div>
98-
<div class="center_div">
99-
<input type="text" size="7" id="fld_dpc" name="fld_dpc" value="10000">
100-
<button id="btn1" type="submit">Create New Data Points</button>
82+
<b>Enter the number of random points to create:</b>
83+
<div class="padl_20">
84+
<input type="text" size="7" id="fld_dpc" name="fld_dpc" value="10000">
85+
<button id="btn_1" type="submit">Run Test</button>
10186
</div>
87+
<div id="div_dp_results"></div>
88+
<div id="div_mm_results"></div>
89+
<div id="div_compare_results"></div>
10290
</form>
10391
</section>
10492
<section>
105-
<b>Statistics:</b>
93+
<b>Notes</b>
10694
<ul>
107-
<li>Total data points: <span id="ts0"></span></li>
108-
<li>Time to create data points: <span id="ts1"></span></li>
109-
<li>Time to create Google map markers: <span id="ts2"></span></li>
110-
<li>Difference: <span id="ts3"></span></li>
95+
<li>
96+
Each test allocates an array with a size equal to the number of random (latitude / longitude) points to
97+
create and then populates the array with that number of objects (i.e.: either &quot;data_point&quot;
98+
objects or Google map marker objects). The total time is then displayed.
99+
</li>
100+
<li>
101+
<span style="color:#FF0000"><b>Warning:</b></span> Creating more than 400,000 google map markers will
102+
likely cause your browser to hang, (at least it does on my workstation), the limit will vary depending on
103+
your workstation hardware.
104+
</li>
111105
</ul>
112-
<div class="center_div" id="ts4"></div>
113106
</section>
114-
<div class="map_viewport" id="mvp"></div>
115107
</main>
116108
<script>
117109
async function map_init() {
118110
// Request needed libraries ...
119111
const { Map } = await google.maps.importLibrary("maps");
120112
const { AdvancedMarkerElement } = await google.maps.importLibrary("marker");
121-
tester_obj = new tester( 'mvp' );
113+
tester_obj = new tester();
122114
}
123115
</script>
124116
<!-- Async script executes immediately and must be AFTER any DOM elements used in callback. -->

0 commit comments

Comments
 (0)