diff --git a/common/scripts/map_actions.js b/common/scripts/map_actions.js
index aa4520a..5907557 100644
--- a/common/scripts/map_actions.js
+++ b/common/scripts/map_actions.js
@@ -97,6 +97,12 @@ var properties = {
}
};
+const limits = {
+ zoom_max: 2.0,
+ zoom_min: 0.5,
+ wheel_rate_hz: 20
+}
+
// Toolbar Icons for actions
const toolbar = {
icon: {
@@ -215,7 +221,7 @@ function locateAirport(list) {
refreshCanvas();
x = parseInt(coords[0]);
y = parseInt(coords[1]);
- drawHighlight(context,x,y,radius);
+ drawHighlight(context,x,y,radius * properties.zoom);
// Make the airport the focus
window.scrollTo(x-window.innerWidth/2,y-window.innerHeight/2);
@@ -532,14 +538,21 @@ function selectVisibility(list) {
refreshCanvas();
}
+var hotspots;
+function storeMapCoordinates() {
+ var imgMap = document.getElementById("imgMap");
+ hotspots = [];
+ for (area of imgMap.children) hotspots.push(area);
+}
// Scale the image map coordinates to match the airport overlay image
function scaleMap(scale) {
var imageMap = document.getElementById("imgMap");
var areas = imageMap.children;
+ i = 0;
for (area of areas) {
- area.coordArr = area.coords.split(',');
- area.coords = area.coordArr.map(coord => Math.round(coord * scale)).join(',');
+ var coordArr = hotspots[i++].coords.split(',');
+ area.coords = coordArr.map(coord => Math.round(coord * scale)).join(',');
if (area.alt == "Legend") properties.legend = area.coords;
if (area.alt == "Bullseye") bullseye.coords = area.coords;
}
@@ -827,13 +840,13 @@ function button(e) {
break;
case "zoom1":
- if (id == "zoom1" && properties.zoom > 0.55) {
- if (e.shiftKey) properties.zoom = 0.55;
+ if (id == "zoom1" && properties.zoom > limits.zoom_min) {
+ if (e.shiftKey) properties.zoom = limits.zoom_min;
else properties.zoom -= 0.05;
}
case "zoom2":
- if (id == "zoom2" && properties.zoom < 1.0) {
- if (e.shiftKey) properties.zoom = 1;
+ if (id == "zoom2" && properties.zoom < limits.zoom_max) {
+ if (e.shiftKey) properties.zoom = limits.zoom_max;
else properties.zoom += 0.05;
}
scaleView(properties.zoom);
@@ -1222,6 +1235,26 @@ var pointer_end = function(e) {
properties.ctrl = false;
}
+var wheel_enabled = true;
+function enable_wheel() {
+ wheel_enabled = true;
+}
+
+// Allow zooming with the mouse but limit it to a set wheel rate
+// See Limiters (20 hz)
+var mouse_zoom = function(e) {
+ e.preventDefault();
+ var zoom = properties.zoom - (e.deltaY/200);
+ if ( wheel_enabled && zoom >= limits.zoom_min && zoom <= limits.zoom_max ) {
+ properties.zoom = zoom;
+ scaleView(properties.zoom);
+ saveSettings();
+ refreshCanvas();
+ wheel_enabled = false;
+ setTimeout(enable_wheel, (1 / limits.wheel_rate_hz) * 1000);
+ }
+}
+
//
// Canvas and Layer Routines
//
@@ -1615,7 +1648,9 @@ window.onload = function(e) {
// Adjust map to used scale
// Safari will slow beyond 3840 canvas size
+ storeMapCoordinates();
scaleMap(3840/4096);
+ storeMapCoordinates();
// Setup the Layers to be rendered on the main canvas
setupLayer(layer.mission, canvas.width, canvas.height );
@@ -1640,6 +1675,7 @@ window.onload = function(e) {
this.addEventListener('mousedown', pointer_start);
this.addEventListener('mousemove', pointer_drag);
this.addEventListener('mouseup', pointer_end);
+ this.addEventListener("wheel", mouse_zoom, {passive:false} );
// Trigger a Render
updateToolbar();
@@ -1648,6 +1684,7 @@ window.onload = function(e) {
window.scrollTo(bullseye.x-window.innerWidth/2,bullseye.y-window.innerHeight/2);
// Draw the Layers
+ enable_wheel();
scaleView(properties.zoom);
refreshCanvas();
}
diff --git a/index.html b/index.html
index ce59b3a..67068bb 100644
--- a/index.html
+++ b/index.html
@@ -1,13 +1,14 @@
-Falcon BMS - Interactive Maps (BMS 4.37)
+Falcon BMS - Interactive Maps
-
-
-
-
+
+
+
+
+
+
+
- Falcon BMS 4.37 - Interactive Maps
- You find here Interactive Maps providing access to airbase and airstrip information for the respective theater of operations. The maps provide the following features:
-
- - Locate airports and navigation beacons and request their information by hovering over them
- - Move map, zoom in/out and measure distances on map
- - Mission.ini or Pilot.ini drag and drop to show route on map and more.
- - Full whiteboard collaboration using collaboration server
- - Save Whiteboard(.png) and restore with drag and drop
- - MIL-STD-2525D symbology
- - Weather import (fmap drop) for weather charts (Temperature, Doppler, Winds, Isobars)
- - Route Waypoint dialog (actions, heading, distance and duration updates, etc)
- - Computed Mission Flight Info, Mission Radio Frequencies and Mission Objectives
- - Show Lat/Long on map and x,y of image map
- - Aerodrome Weather Report (METAR) as tooltips and on route dialog (uses) fmap
- - Add notes on Whiteboard
- - Bullseye placement
- - Download and Import GFS data and files
-
-
-
+ Falcon BMS - Interactive Maps
+ Theater Maps 4.37
Korea Theater Rev: 26 JUNE 2023 |
Balkans Theater Rev: 26 JUNE 2023 |
Israel Theater Rev: 26 JUNE 2023 |
+ |
@@ -193,7 +142,76 @@ Korea Theater
UNDER CONSTRUCTION
+ Balkans Theater UNDER CONSTRUCTION |
+ Israel Theater UNDER CONSTRUCTION |
+ Hellenic Theater UNDER CONSTRUCTION |
+
+
+
+
+
+
+
+ 
+
+
+
+ |
+
+
+
+ 
+
+
+
+ |
+
+
+
+ 
+
+
+
+ |
+
+
+
+ 
+
+
+
+ |
+
+
+
+
+ Map Features
+ The maps provide the following features:
+
+ - Locate airports and navigation beacons and request their information by hovering over them
+ - Move map, zoom in/out and measure distances on map
+ - Mission.ini or Pilot.ini drag and drop to show route on map and more.
+ - Full whiteboard collaboration using collaboration server
+ - Save Whiteboard(.png) and restore with drag and drop
+ - MIL-STD-2525D symbology
+ - Weather import (fmap drop) for weather charts (Temperature, Doppler, Winds, Isobars)
+ - Route Waypoint dialog (actions, heading, distance and duration updates, etc)
+ - Computed Mission Flight Info, Mission Radio Frequencies and Mission Objectives
+ - Show Lat/Long on map and x,y of image map
+ - Aerodrome Weather Report (METAR) as tooltips and on route dialog (uses) fmap
+ - Download and Import GFS data and files
+ - Bullseye placement
+
+
+
-
\ No newline at end of file
+