initial commit
[map.git] / honeymap-master / static / feed_random.js
1 /** Testing stuff, create some markers at random  **/
2
3 function random_point() {
4   var lat, lng;
5   do {
6     lat = Math.random() * 180 - 90;
7     lng = Math.random() * 360 - 180;
8   } while(get_regionname_ll(lat,lng) == null);
9
10   add_log("New event in " + get_regionname_ll(lat,lng) + " (" + lat.toFixed(2) + ", " + lng.toFixed(2) + ")<br/>");
11   add_marker_ll(lat, lng);
12   update_regioncolors();
13 }
14
15 function timer() {
16   window.setTimeout(random_point, Math.random() * 1000);
17 }
18
19 window.setInterval(timer, 500);