American Revolution Battles Map

Battle Information

Click on a battle marker on the map to see details.

Error loading tool components.

"; return; } // --- Battle Data --- // Coordinates are approximate for the given SVG viewBox="0 0 500 750" // (0,0) is top-left. Y increases downwards. const battles = [ { id: 'lexington_concord', name: 'Lexington and Concord', date: 'April 19, 1775', location: 'Massachusetts', summary: 'The first military engagements of the American Revolutionary War, marking the outbreak of armed conflict.', coords: { x: 385, y: 145 } // Approx. Eastern MA }, { id: 'bunker_hill', name: 'Battle of Bunker Hill', date: 'June 17, 1775', location: 'Massachusetts (Charlestown)', summary: 'A costly British victory. Though the American forces retreated, they inflicted heavy casualties on the British, demonstrating their resolve.', coords: { x: 390, y: 155 } // Near Boston }, { id: 'trenton', name: 'Battle of Trenton', date: 'December 26, 1776', location: 'New Jersey', summary: 'A pivotal American victory led by George Washington, crossing the Delaware River to surprise Hessian forces. Boosted Continental Army morale.', coords: { x: 315, y: 260 } // Approx. Central NJ }, { id: 'saratoga', name: 'Battles of Saratoga', date: 'September 19 & October 7, 1777', location: 'New York', summary: 'A decisive American victory that became a turning point in the war, convincing France to formally ally with the United States.', coords: { x: 320, y: 180 } // Approx. Upstate NY }, { id: 'brandywine', name: 'Battle of Brandywine', date: 'September 11, 1777', location: 'Pennsylvania', summary: 'A British victory that led to their capture of Philadelphia, the American capital at the time.', coords: { x: 295, y: 270 } // Approx. SE Pennsylvania }, { id: 'monmouth', name: 'Battle of Monmouth', date: 'June 28, 1778', location: 'New Jersey', summary: 'A hard-fought battle with an inconclusive tactical outcome, but a strategic success for the Americans as the British continued their withdrawal to New York.', coords: { x: 310, y: 275 } // Approx. Central NJ }, { id: 'charleston', name: 'Siege of Charleston', date: 'March 29 - May 12, 1780', location: 'South Carolina', summary: 'A major British victory resulting in the capture of Charleston and a large American army, a severe blow to the American cause in the South.', coords: { x: 260, y: 530 } // Approx. Coastal SC }, { id: 'kings_mountain', name: 'Battle of Kings Mountain', date: 'October 7, 1780', location: 'South Carolina', summary: 'A decisive victory for American Patriot militia over Loyalist militia, significantly boosting morale and reversing the British advance in the South.', coords: { x: 220, y: 465 } // Approx. Upstate SC }, { id: 'cowpens', name: 'Battle of Cowpens', date: 'January 17, 1781', location: 'South Carolina', summary: 'A brilliant tactical victory for the American forces under Daniel Morgan, inflicting heavy casualties on Banastre Tarleton\'s British forces.', coords: { x: 215, y: 450 } // Approx. Upstate SC }, { id: 'yorktown', name: 'Siege of Yorktown', date: 'September 28 - October 19, 1781', location: 'Virginia', summary: 'The decisive Franco-American victory where General Cornwallis surrendered his British army. Effectively ended major combat operations in the war.', coords: { x: 280, y: 365 } // Approx. Coastal VA } ]; let selectedMarker = null; // --- SVG Namespace --- const SVG_NS = "http://www.w3.org/2000/svg"; // --- Function to Create and Plot Battle Markers --- function plotBattleMarkers() { if (!svgMap) return; battles.forEach(battle => { const marker = document.createElementNS(SVG_NS, "circle"); marker.setAttribute("cx", battle.coords.x.toString()); marker.setAttribute("cy", battle.coords.y.toString()); marker.setAttribute("r", "7"); // Radius of the circle marker.setAttribute("class", "arbm-battle-marker"); marker.setAttribute("data-id", battle.id); marker.addEventListener('click', function() { displayBattleInfo(battle); if (selectedMarker) { selectedMarker.classList.remove('arbm-selected-marker'); } this.classList.add('arbm-selected-marker'); selectedMarker = this; }); // Add a title for tooltip (simple hover effect) const title = document.createElementNS(SVG_NS, "title"); title.textContent = battle.name; marker.appendChild(title); svgMap.appendChild(marker); }); } // --- Function to Display Battle Information --- function displayBattleInfo(battle) { if (!battleInfoDiv || !battleInfoPlaceholder) return; battleInfoPlaceholder.style.display = 'none'; // Hide placeholder battleInfoDiv.innerHTML = `

${battle.name}

Date: ${battle.date}

Location: ${battle.location}

Summary: ${battle.summary}

`; } // --- PDF Download Functionality --- if (downloadPdfBtn) { downloadPdfBtn.addEventListener('click', function() { let pdfHtmlContent = ` American Revolution Battles List

American Revolution Battles

A summary of key battles from the American Revolutionary War.

`; battles.forEach(battle => { pdfHtmlContent += `

${battle.name}

Date: ${battle.date}

Location: ${battle.location}

Summary: ${battle.summary}

`; }); pdfHtmlContent += ` `; const pdfWindow = window.open('', '_blank'); if (pdfWindow) { pdfWindow.document.open(); pdfWindow.document.write(pdfHtmlContent); pdfWindow.document.close(); // pdfWindow.print(); // Optional: trigger print dialog automatically if desired } else { alert("Failed to open PDF window. Please check your browser's pop-up blocker settings."); } }); } // --- Initialize Tool --- plotBattleMarkers(); });
Scroll to Top