Skip to content

Commit ac820b4

Browse files
committed
Scaling in markers option in chart modifiers box
1 parent c88380d commit ac820b4

2 files changed

Lines changed: 18 additions & 5 deletions

File tree

SedimentDataExplorer.html

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@
595595
<div id="everything" style="display: none;"></div>
596596

597597
<header>
598-
<h1>Sediment Data Explorer <small style="font-weight: normal; opacity: 0.8;">v1.20251018</small></h1>
598+
<h1>Sediment Data Explorer <small style="font-weight: normal; opacity: 0.8;">v1.20251020</small></h1>
599599
<div class="header-actions">
600600
<button onclick="updateChart()">(Re)Plot Chart</button>
601601
<button onclick="exportCharts()" class="secondary">Export Chart</button>
@@ -701,6 +701,7 @@ <h1>Sediment Data Explorer <small style="font-weight: normal; opacity: 0.8;">v1.
701701
<button onclick="openDatasetLabels()">Enter Dataset Labels</button>
702702
<button onclick="openSampleLabels()">Enter Sample Labels</button>
703703
<button onclick="openChartModifiersModal()">Chart Modifiers</button>
704+
<button onclick="openMapModifiersModal()">Map Modifiers</button>
704705
<hr>
705706
<div class="input-group">
706707
<label for="primary-sorting-select">Primary Sort:</label>
@@ -871,6 +872,13 @@ <h2>Chart Modifiers</h2>
871872
<div class="modal-footer"><button onclick="closeChartModifiersModal()" class="secondary">Close</button></div>
872873
</div>
873874
</div>
875+
<div id="mapModifiersModal" class="modal">
876+
<div class="modal-content">
877+
<h2>Map Modifiers</h2>
878+
<label for="markerScaling">Marker Scaling Factor:</label><input type="number" id="markerScaling" placeholder="2">
879+
<div class="modal-footer"><button onclick="closeMapModifiersModal()" class="secondary">Close</button></div>
880+
</div>
881+
</div>
874882
<div id="additionalChartsModal" class="modal">
875883
<div class="modal-content">
876884
<h2>Additional Chart Options</h2>
@@ -1175,6 +1183,11 @@ <h2>Select Radar Plot for Map Popups</h2>
11751183
function closeAdditionalInfoModal() { document.getElementById('additionalInfoModal').style.display = 'none'; }
11761184
function openChartModifiersModal() { document.getElementById('chartModifiersModal').style.display = 'block'; }
11771185
function closeChartModifiersModal() { document.getElementById('chartModifiersModal').style.display = 'none'; }
1186+
function openMapModifiersModal() { document.getElementById('mapModifiersModal').style.display = 'block'; }
1187+
function closeMapModifiersModal() {
1188+
document.getElementById('mapModifiersModal').style.display = 'none';
1189+
markerScaling = parseFloat(document.getElementById('markerScaling').value) || 2;
1190+
}
11781191
function openAdditionalChartsModal() { document.getElementById('additionalChartsModal').style.display = 'block'; }
11791192
function closeAdditionalChartsModal() { document.getElementById('additionalChartsModal').style.display = 'none'; }
11801193
function openPcaOptionsModal() { document.getElementById('pcaOptionsModal').style.display = 'block'; }

sdeMaps.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ let depthStatsGlobal = { min: Infinity, max: -Infinity };
1717
let depthSortedSampleIds = [];
1818
let minLat = null, maxLat = null, minLon = null, maxLon = null;
1919
let noLocations = 0, latSum = 0, lonSum = 0;
20+
let markerScaling = 2.0;
2021
const hoverStyle = { radius: 10, weight: 3, opacity: 1, fillOpacity: 1 };
2122

2223
const highlightStyle = {
@@ -78,10 +79,9 @@ const highlightStyle = {
7879

7980
function getLogDepthRadius3Levels(depth, depthMin, depthMax, zoomLevel = null) {
8081
// Define geographic sizes in meters for each depth level
81-
const rScalingFactor = 2.0; // You can adjust this factor to scale all sizes
82-
const rSmallMeters = 5 * rScalingFactor; // 5 meters for shallow samples
83-
const rMedMeters = 10 * rScalingFactor; // 10 meters for medium depth samples
84-
const rLargeMeters = 15 * rScalingFactor; // 15 meters for deep samples
82+
const rSmallMeters = 5 * markerScaling; // 5 meters for shallow samples
83+
const rMedMeters = 10 * markerScaling; // 10 meters for medium depth samples
84+
const rLargeMeters = 15 * markerScaling; // 15 meters for deep samples
8585

8686
let radiusInMeters;
8787
if (depth == null || isNaN(depth) || depthMin === depthMax) {

0 commit comments

Comments
 (0)