|
50 | 50 | padding: 12px; |
51 | 51 | } |
52 | 52 |
|
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 { |
66 | 54 | margin: 0; |
67 | | - padding: 6px; |
68 | | - text-align: center; |
| 55 | + padding: 12px 0 0 20px; |
69 | 56 | } |
70 | 57 | </style> |
71 | 58 | </head> |
|
88 | 75 | omitting the need to create Google map markers as input to a clusterer. |
89 | 76 | </p> |
90 | 77 | <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 |
92 | 79 | to create them. |
93 | 80 | </p> |
94 | 81 | <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> |
101 | 86 | </div> |
| 87 | + <div id="div_dp_results"></div> |
| 88 | + <div id="div_mm_results"></div> |
| 89 | + <div id="div_compare_results"></div> |
102 | 90 | </form> |
103 | 91 | </section> |
104 | 92 | <section> |
105 | | - <b>Statistics:</b> |
| 93 | + <b>Notes</b> |
106 | 94 | <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 "data_point" |
| 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> |
111 | 105 | </ul> |
112 | | - <div class="center_div" id="ts4"></div> |
113 | 106 | </section> |
114 | | - <div class="map_viewport" id="mvp"></div> |
115 | 107 | </main> |
116 | 108 | <script> |
117 | 109 | async function map_init() { |
118 | 110 | // Request needed libraries ... |
119 | 111 | const { Map } = await google.maps.importLibrary("maps"); |
120 | 112 | const { AdvancedMarkerElement } = await google.maps.importLibrary("marker"); |
121 | | - tester_obj = new tester( 'mvp' ); |
| 113 | + tester_obj = new tester(); |
122 | 114 | } |
123 | 115 | </script> |
124 | 116 | <!-- Async script executes immediately and must be AFTER any DOM elements used in callback. --> |
|
0 commit comments