var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); var types = []; var type_counts = []; var type_colors = []; var type_names = []; var current_type; var counted_types; var radarLat; var radarLng; var radarRad; var showMarkers = false; var placesDebug = true; var earthRadius = 6371; var placesMode; var rad2deg = (180/Math.PI); var deg2rad = (Math.PI/180); var drillMax = 3; //note that this is exponential! var curThreads = 0; var totalThreads = 0; var placeMarkers = []; var infowindow; var placesInfoDIV; function get_places(lat,lng,radius_m,markers,infoID) { infoWindow = new google.maps.InfoWindow(); radarLat = lat; radarLng = lng; radarRad = radius_m; showMarkers = markers; placesInfoDIV = infoID; if(placeMarkers.length) { for(var i=0; i"+type_names[i]+": Calculating..."; (function(iter) { setTimeout(function() {radarBounds(iter,radarLat,radarLng,radarRad/1000,0)},iter*1000); })(i); } out = "
Humanitarian impact. Within the 10 psi radius of this detonation there were also:NOTE: These categorizations are done automatically by Google, not me. Sometimes they are bit off. The numbers may change over the course of a few minutes as more information is obtained from Google."; if(document.getElementById(placesInfoDIV)) { document.getElementById(placesInfoDIV).innerHTML = out; } } function radarBounds(i,lat,lng,radius,drill) { curThreads++; totalThreads++; var ii = [i,drill]; (function(iter) { maxLat = lat + (radius/earthRadius)*rad2deg; minLat = lat - (radius/earthRadius)*rad2deg; maxLng = lng + (radius/earthRadius/Math.cos((lat*deg2rad)))*rad2deg; minLng = lng - (radius/earthRadius/Math.cos((lat*deg2rad)))*rad2deg; var request = { //location: new google.maps.LatLng(radarLat,radarLng), bounds: new google.maps.LatLngBounds(new google.maps.LatLng(minLat,minLng),new google.maps.LatLng(maxLat,maxLng)), types: Array(types[iter[0]]) }; service.radarSearch(request, function (results, status) { curThreads--; if(status=="OK") { if(results.length<190) { var good_results = 0; for(var x=0;x*There may be many more than we could display here, due to limits on Google Maps' API and our lack of desire to crash your browser."; } } } //console.log(type_names[iter],status,results.length); } else if (status=="OVER_QUERY_LIMIT") { //wait 2 secs and try again setTimeout(function() { radarBounds(iter[0],lat,lng,radius,iter[1]),2000 } ); } }); })(ii); } /* OLD FUNCTIONS */ function radarSearch(type) { if(placesDebug) console.log("Searching for "+types[type]+" around "+radarLat+","+radarLng+" at a radius of "+(radarRad/1000)+" km"); var request = { location: new google.maps.LatLng(radarLat,radarLng), radius: radarRad, types: Array(types[type]) }; if(placesMode) { service.nearbySearch(request,places_callback); } else { service.radarSearch(request, places_callback); } } function places_callback (results, status){ if(status=="OK") { if(placesDebug) console.log("FOUND RESULTS FOR "+types[current_type],status); if(type_counts[current_type]) { type_counts[current_type]+=results.length; } else { type_counts[current_type]=results.length; } if(placesDebug) console.log("RESULTS! "+results.length); if(showMarkers) { for(var i=0;i0) { if(type_counts[x]>=190) got200 = true; //we use 190 b/c something Google Places rounds down in funny ways if(placesMode) { out+="
  • "+(type_counts[x]>=190?"+200*":type_counts[x])+" " + type_names[x]+"
    "; } else { out+="
  • "+(type_counts[x]>=190?"+200*":type_counts[x])+" " + type_names[x]+"
  • "; } } } if(out) { out = "
    This detonation also destroyed:
      " + out; out+="
    "; if(got200) out+="*The Google Maps API only allowed retrieval of up to 200 results in any given category; there may be many more."; document.getElementById(placesInfoDIV).innerHTML = out; } } } function outputTypes() { var out =""; for(var x=0;x0) { if(type_counts[x]>=190) got200 = true; //we use 190 b/c something Google Places rounds down in funny ways if(placesMode) { out+="
  • "+(type_counts[x]>=190?"+200*":type_counts[x])+" " + type_names[x]+"
    "; } else { out+="
  • "+(type_counts[x]>=190?"+200*":type_counts[x])+" " + type_names[x]+"
  • "; } } } if(out) { out = "
    This detonation also destroyed:
      " + out; out+="
    "; if(got200) out+="*The Google Maps API only allowed retrieval of up to 200 results in any given category; there may be many more."; document.getElementById(placesInfoDIV).innerHTML = out; } } function createMarker(place,which) { if(placesMode) { placeMarkers.push(new google.maps.Marker({ map: map, position: place.geometry.location, icon: { url: place.icon, size: new google.maps.Size(71, 71), origin: new google.maps.Point(0, 0), anchor: new google.maps.Point(17, 34), scaledSize: new google.maps.Size(25, 25) }, title: (place.name + " ("+type_names[which]+")"), })); } else { placeMarkers.push(new google.maps.Marker({ map: map, position: place.geometry.location, icon: { path: google.maps.SymbolPath.CIRCLE, scale: 4, fillColor: type_colors[which], fillOpacity: 1, strokeColor: '#bd8d2c', strokeWeight: 1 }, title: type_names[which], })); } var last = (placeMarkers.length-1); if(placesDebug) console.log(place); google.maps.event.addListener(placeMarkers[last], 'click', function() { service.getDetails(place, function(result, status) { if (status != google.maps.places.PlacesServiceStatus.OK) { alert(status); return; } console.log(result); infoWindow.setContent(result.name+"
    "+result.formatted_address); infoWindow.open(map, placeMarkers[last]); }); }); } if (typeof register == 'function') { register("places.js"); } } /* FILE ARCHIVED ON 01:06:23 Feb 04, 2022 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 16:51:52 Feb 27, 2022. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 271.996 exclusion.robots: 0.087 exclusion.robots.policy: 0.079 RedisCDXSource: 0.524 esindex: 0.008 LoadShardBlock: 237.94 (3) PetaboxLoader3.datanode: 5332.018 (5) CDXLines.iter: 19.608 (3) load_resource: 5620.745 (2) PetaboxLoader3.resolve: 471.576 (2) */