@@ -40,24 +40,24 @@ LocalComponents.Page {
41 // geo coords conversion functions (adapted from libtimezonemap)
41 // geo coords conversion functions (adapted from libtimezonemap)
42 function radians(degrees) {
42 function radians(degrees) {
43− return degrees * Math.PI / 180;
43+ return degrees * Math.PI / 180;
46 function longitudeToX(longitude, map_width) {
46 function longitudeToX(longitude, map_width) {
47− var xdeg_offset = -6;
47+ const xdeg_offset = -6;
48− var x = (map_width * (180.0 + longitude) / 360.0) + (map_width * xdeg_offset / 180.0);
48+ const x = (map_width * (180.0 + longitude) / 360.0) + (map_width * xdeg_offset / 180.0);
52 function latitudeToY(latitude, map_height) {
52 function latitudeToY(latitude, map_height) {
53− var bottom_lat = -59;
53+ const bottom_lat = -59;
54− var top_lat = 81;
54+ const top_lat = 81;
56− var top_per = top_lat / 180.0;
56+ const top_per = top_lat / 180.0;
57 var y = 1.25 * Math.log(Math.tan(0.25*Math.PI + 0.4 * radians(latitude)));
57 var y = 1.25 * Math.log(Math.tan(0.25*Math.PI + 0.4 * radians(latitude)));
58− var full_range = 4.6068250867599998;
58+ const full_range = 4.6068250867599998;
59− var top_offset = full_range * top_per;
59+ const top_offset = full_range * top_per;
60− var map_range = Math.abs(1.25 * Math.log(Math.tan(0.25*Math.PI + 0.4 * radians(bottom_lat))) - top_offset);
60+ const map_range = Math.abs(1.25 * Math.log(Math.tan(0.25*Math.PI + 0.4 * radians(bottom_lat))) - top_offset);
61 y = Math.abs(y - top_offset);
61 y = Math.abs(y - top_offset);
62 y = y / map_range;
62 y = y / map_range;
63 y = y * map_height;
63 y = y * map_height;