Enhance map functionality and API documentation
- Updated API documentation for the `rebuildZooms` endpoint to clarify its long execution time and response behavior. - Modified MapView component to manage tile cache invalidation after rebuilding zoom levels, ensuring fresh tile display. - Introduced a new composable for handling tile cache invalidation state after admin actions. - Enhanced character icon creation to reflect ownership status with distinct colors. - Improved loading state handling in various components for better user experience during data fetching.
This commit is contained in:
@@ -11,10 +11,10 @@ export interface GridCoordLayerOptions extends L.GridLayerOptions {
|
||||
|
||||
/**
|
||||
* Grid layer that draws one coordinate label per Leaflet tile in the top-left corner.
|
||||
* coords.(x,y,z) are Leaflet tile indices and zoom; they map to game tiles as:
|
||||
* scaleFactor = 2^(HnHMaxZoom - coords.z),
|
||||
* topLeft = (coords.x * scaleFactor, coords.y * scaleFactor).
|
||||
* This matches backend tile URL {mapid}/{z}/{x}_{y}.png (storageZ: z=6→0, Coord = tile index).
|
||||
* Uses only coords.z (do not use map.getZoom()) so labels stay in sync with tiles.
|
||||
* SmartTileLayer has zoomReverse: true, so URL z = 6 - coords.z; backend maps z=6 → storageZ=0.
|
||||
* Game tile for this Leaflet tile: scaleFactor = 2^(HnHMaxZoom - coords.z),
|
||||
* topLeft = (coords.x * scaleFactor, coords.y * scaleFactor) — same (x,y) as backend tile.
|
||||
*/
|
||||
export const GridCoordLayer = L.GridLayer.extend({
|
||||
options: {
|
||||
|
||||
Reference in New Issue
Block a user