Skip to content

Commit

Permalink
artillery is square
Browse files Browse the repository at this point in the history
  • Loading branch information
Razzmatazzz committed Sep 26, 2024
1 parent 77e4b69 commit 1bae43d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion src/features/maps/do-fetch-maps.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,13 @@ class MapsQuery extends APIQuery {
y
z
}
radius
outline {
x
y
z
}
top
bottom
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/pages/map/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1359,7 +1359,7 @@ function Map() {
if (!positionIsInBounds(hazard.position)) {
continue;
}
const circle = L.circle(pos(hazard.position), {radius: hazard.radius, color: '#ff0000', weight: 1, className: 'not-shown'});
const rect = L.polygon(outlineToPoly(hazard.outline), {color: '#ff0000', weight: 1, className: 'not-shown'});
const hazardIcon = L.icon({
iconUrl: `${process.env.PUBLIC_URL}/maps/interactive/hazard_artillery.png`,
iconSize: [24, 24],
Expand All @@ -1373,9 +1373,9 @@ function Map() {
title: artyName,
//zIndexOffset: -100,
position: hazard.position,
//top: hazard.top,
//bottom: hazard.bottom,
outline: circle,
top: hazard.top,
bottom: hazard.bottom,
outline: rect,
});
const popup = L.DomUtil.create('div');
const hazardText = L.DomUtil.create('div', undefined, popup);
Expand All @@ -1391,7 +1391,7 @@ function Map() {
hazardLayers.artillery = L.layerGroup();
hazardNames.artillery = artyName;
}
L.layerGroup([circle, hazardMarker]).addTo(hazardLayers.artillery);
L.layerGroup([rect, hazardMarker]).addTo(hazardLayers.artillery);

checkMarkerBounds(hazard.position, markerBounds);
}
Expand Down

0 comments on commit 1bae43d

Please sign in to comment.