The Karte page now embeds a standalone viewer (assets/map/) covering all ten regions - Verteron, Altgard, Elthen, Morheim, Poeta, Ishalgen and the Reshanta maps - with markers and category filters from interactivemap.app. map.php loads it in an iframe because its stylesheet restyles body, button and * globally and would otherwise break the site layout. The tile, marker and icon data (~230 MB, ~39,000 files) is kept out of Git and uploaded by FTP; the README explains where it comes from. Removed with it: own markers and categories, tactic layers, the in-browser map builder, the tile/stitch/viewer tools, the bundled Leaflet, the four map tables in schema.sql and the map.manage / map.tactics permissions. Existing databases keep their old map tables untouched. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
37 lines
No EOL
923 B
JavaScript
37 lines
No EOL
923 B
JavaScript
/**
|
|
* MarkerService - Handles marker data loading and management
|
|
*/
|
|
|
|
class MarkerService {
|
|
constructor() {
|
|
this.loadedMarkers = {}; // slug -> markers array
|
|
}
|
|
|
|
/**
|
|
* Load markers for a map from JSON file
|
|
*/
|
|
async loadMarkers(slug) {
|
|
if (this.loadedMarkers[slug]) {
|
|
return this.loadedMarkers[slug];
|
|
}
|
|
|
|
try {
|
|
const response = await fetch(`${CONFIG.MARKERS_DIR}/${slug}_markers.json`);
|
|
if (!response.ok) throw new Error('Marker file not found');
|
|
|
|
const data = await response.json();
|
|
this.loadedMarkers[slug] = data;
|
|
return data;
|
|
} catch (e) {
|
|
console.error(`Failed to load markers for ${slug}:`, e);
|
|
throw e;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* Get loaded markers for a map
|
|
*/
|
|
getMarkers(slug) {
|
|
return this.loadedMarkers[slug];
|
|
}
|
|
} |