ADD: added APP-6 Symbols to the Map

This commit is contained in:
hwinkel
2023-09-05 18:46:34 +02:00
parent 6d2a1d7556
commit 658830bab6
221 changed files with 73498 additions and 21 deletions

View File

@@ -0,0 +1,53 @@
import {L, Icon} from 'leaflet';
import ms from 'milsymbol'
const iconShip = new Icon({
iconUrl: "./ship.svg",
iconSize: [50, 50],
// iconAnchor: [40, 90],
popupAnchor: [-25, -40],
});
const iconSize = {
"Team/Crew": 5,
"Squad": 10,
"Section": 15,
"Platoon/detachment": 20,
"Company/battery/troop": 25,
"Battalion/squadron": 30,
"Regiment/group": 35,
"Brigade": 40,
"Division": 45,
"Corps/MEF": 50,
"Army": 55,
"Army Group/front": 60,
"Region/Theater": 65,
"Command": 70
};
var Friend = new ms.Symbol(
"SFP---------", {
uniqueDesignation: "Friend"
})
// Now that we have a symbol we can ask for the echelon and set the symbol size
Friend = Friend.setOptions({ size: 25 });
const friend = new Icon({
iconUrl: Friend.toDataURL(),
iconAnchor: [Friend.getAnchor().x, Friend.getAnchor().y],
});
var hostile = new ms.Symbol(
"SHP---------", {
uniqueDesignation: "Hostile"
})
// Now that we have a symbol we can ask for the echelon and set the symbol size
hostile = hostile.setOptions({ size: 25 });
const Hostile = new Icon({
iconUrl: hostile.toDataURL(),
iconAnchor: [hostile.getAnchor().x, hostile.getAnchor().y],
});
export { iconShip, friend,Hostile };