Base-map tile pipeline and shared-canvas Leaflet viewer

Extracts only the base map art from re3mr PSDs (the top-level LOCATION
group), tiles it to WebP, and renders every map on one shared world canvas.

Pipeline: psd_tree -> export_base -> tile -> build -> preview, driven
entirely by maps.json. Adding a map is a config change.

Maps are placed on an 8192px grid (tileSize * 2^maxZoom) so a cell's tile
index shift is exactly cell * 2^z at every zoom. Each map keeps its own
locally numbered pyramid and the browser translates on the fly, so adding
a map never re-tiles the others.

excludeLayers works around psd-tools rendering stroke-only vector shapes
as solid fills, which otherwise buries Customs under a white fill.

Co-Authored-By: Claude Opus 5 <[email protected]>
This commit is contained in:
Claude committed 2026-08-07 23:22:21 -07:00
commit 5afde00ab7
25 files changed
+2015

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
{
"version": "0.0.1",
"configurations": [
{
"name": "tarkovmap",
"runtimeExecutable": "python",
"runtimeArgs": ["server/serve.py", "8080"],
"port": 8080
}
]
}
+16
View File
@@ -0,0 +1,16 @@
# Source art: hundreds of MB to >1 GB per map. Keep these on the shared
# drive, never in git. See docs/adding-a-map.md.
sources/
*.psd
*.psb
*.7z
# Generated by tools/build.py -- rebuildable from sources/, so not tracked.
build/
web/tiles/
web/data/world.json
__pycache__/
*.pyc
.venv/
node_modules/
+251
View File
@@ -0,0 +1,251 @@
# TarkovMap — Project Plan
Self-hosted, mobile-friendly Escape from Tarkov map viewer on Leaflet. Layered
PSDs in, XYZ tile pyramid out, every map placed on one shared pannable canvas.
**Status legend:** `[ ]` not started · `[~]` in progress · `[x]` done · `[!]` blocked
**Every stage lists `Owner`, `Depends on`, and `Done when`. Don't tick `[x]` until `Done when` is objectively true.**
> **Revision 2 (2026-08-07)** — scope narrowed to **base map art only**; marker,
> spawn and label overlays are cut. Architecture changed from "one pyramid per
> map plus a switcher" to a **single shared world canvas** holding unrelated
> maps side by side. Phase 1 is built and running.
---
## 1. Goals / Non-goals
### Goals
- Extract **only the base map** from each PSD. No markers, spawns, extracts, captions, legends or titles.
- All maps — including ones with no geographic relationship, like Customs and its Dorms floor plans — live on **one big canvas** you pan across.
- Adding a map is a **config change**, never a code change, and never re-tiles existing maps.
- Fast on a phone over LAN.
- A flow a teammate can follow from a document without asking questions.
### Non-goals
- Marker / spawn / extract overlays *(cut in revision 2 — see §8 backlog)*.
- Public internet hosting (licence constrains this — §3).
- Accounts, editing UI, quest tracking, live player position.
---
## 2. Source audit — findings `[x]`
Measured 2026-08-07 from the two supplied PSDs.
| | Customs | Customs — Dorms |
| --- | --- | --- |
| PSD canvas | 7832 × 5016 | 4301 × 4904 |
| PSD size | 1.09 GB, 295 layers | 198 MB |
| Base group | `LOCATION` | `LOCATION` |
| Siblings dropped | `LEGEND`, `OVERLAYS`, `TITLE SECTION` | `OVERLAY`, `LEGEND`, `TITLE`, `Credits` |
| Extra exclusion | `Map Borders` (see §6) | none |
| Crop applied | `[0, 860, 7832, 3875]` → 7832 × 3015 | none (art fills canvas) |
| Scale | ≈ **7.39 px/m** from the scale bar | not marked |
| Render time | 158 s | 321 s |
| Tiles | 503 (8.4 MB) | 469 (1.4 MB) |
**Both PSDs use the same top-level convention** — `LOCATION` next to `OVERLAY`,
`LEGEND`, `TITLE`. That is what makes "render one group, drop the rest" a
general rule rather than a Customs special case. Expect it to hold for other
re3mr maps; verify per map at step 1 of the runbook.
Licence in both files: **CC BY-NC-SA 4.0**, "Made by re3mr.com".
---
## 3. Constraints
- **CC BY-NC-SA 4.0.** Attribution stays visible in the viewer; non-commercial only; derived map images inherit the licence. LAN use is fine. **Sign-off required before public hosting.**
- **Source art never enters git.** 1.09 GB + 198 MB + a 608 MB archive for one map. `.gitignore` covers `sources/`, `*.psd`, `*.7z`, `build/`, `web/tiles/`.
- Tooling on the build machine: Python 3.13, Pillow 12, psd-tools 1.18 + scikit-image, Node 22. No ImageMagick / libvips / GDAL needed.
---
## 4. Architecture — as built
| # | Decision | Notes |
| --- | --- | --- |
| A1 | Leaflet + custom `CRS.Simple`, XYZ pyramid | LatLng is `(y, x)` in world pixels at native resolution |
| A2 | **256 px tiles**, zoom 0–5, 1:1 at z5 | ~500 tiles per map; z0 is a whole-cell thumbnail |
| A3 | **WebP q82**, transparent padding on edge tiles | 9.8 MB for both maps combined |
| A4 | Chrome cropped away, not rebuilt | Scope is base art only, so there is no legend to rebuild |
| A5 | **Shared world canvas on an 8192 px grid** | See below — this is the core of revision 2 |
| A6 | `maps.json` in, `web/data/world.json` out | The app hard-codes nothing about any map |
| A7 | Dependency-free static server, long cache on tiles | Caddy/nginx drop-in later if wanted |
| A8 | Pure-Python pipeline (psd-tools + Pillow) | No native binaries to install on three machines |
| A9 | `excludeLayers` escape hatch | Needed because psd-tools fills stroke-only vector shapes |
### The world grid (A5)
Each map is tiled independently, numbered from its own top-left corner. A map in
grid cell `(gx, gy)` sits at world pixel `(gx · cellSize, gy · cellSize)` where
```
cellSize = tileSize · 2^maxZoom = 256 · 32 = 8192
```
At that cell size the tile-index shift is exactly `gx · 2^z` at every zoom —
always an integer. So `getTileUrl` converts world tile coords to a map's local
ones with integer arithmetic and no resampling.
Consequences, and the reason this design was chosen:
- Adding a map **never re-tiles another map**.
- Unrelated maps share one continuous, pannable canvas.
- A map must fit one cell (8192²). `maxZoom + 1` doubles the cell.
Current layout: Customs `(0,0)`, Customs — Dorms `(1,0)`.
---
## 5. Repository layout
```
maps.json the only file you edit to add or change a map
tools/
psd_tree.py inspect a PSD's layer tree
export_base.py PSD -> build/<id>/base.png (base group only)
tile.py base.png -> web/tiles/<id>/{z}/{x}/{y}.webp
build.py orchestrator; writes web/data/world.json
preview.py stitch built tiles into one overview image
common.py config loading + world-grid maths
server/serve.py static server, LAN-reachable, cache headers
web/ index.html, app.js, style.css, vendored Leaflet 1.9.4
docs/adding-a-map.md
sources/ build/ web/tiles/ gitignored
```
---
## 6. Known issues
| Issue | Impact | Status |
| --- | --- | --- |
| psd-tools fills stroke-only vector `shape` layers as solid colour | Customs rendered white over the whole playable area until `Map Borders` was excluded | Worked around via `excludeLayers`; documented as a check in the runbook |
| Excluding `Map Borders` also removes the playable-area boundary outline | Customs no longer shows the dotted play-area edge; the out-of-bounds grey-out still marks it | Accepted. Revisit only if the boundary is missed |
| No retina / DPR-2 tiles | Slightly soft on high-DPI phones at 1:1 | Stage 7 |
| `flyToBounds` depends on `requestAnimationFrame` | Picker doesn't move the view in a non-compositing tab | Cosmetic; not seen in a real browser |
| Dorms has no scale bar | No px/m for that map | Fine — `pxPerMeter` is optional |
---
## 7. Stages
### Phase 1 — pipeline and viewer ✅ **complete**
#### Stage 0 — Repo foundations `[x]`
- [x] `git init`, `.gitignore` covering sources, build output and tiles
- [x] Directory skeleton, `tools/requirements.txt`
- [x] `README.md` with quickstart
- [x] Sources moved to `sources/customs/`
- [x] Verified nothing large is tracked — 0.43 MB staged
- [ ] **Decide where master PSDs live for the team** (shared drive / NAS / Syncthing) and record the path in the README
#### Stage 1 — Source audit `[x]`
- [x] Dimensions, layer trees, blend modes, masks for both PSDs
- [x] Identified the shared `LOCATION` convention
- [x] Derived 7.39 px/m for Customs
- [x] Confirmed CC BY-NC-SA 4.0
#### Stage 2 — Contracts `[x]`
- [x] `maps.json` schema — the single input contract
- [x] `web/data/world.json` — the single output contract the app reads
- [x] Tile URL scheme `tiles/{id}/{z}/{x}/{y}.webp`, XYZ, y-down
- [x] Coordinate spec: LatLng = `(y, x)` in world pixels; grid maths in `common.py`
- [x] `docs/adding-a-map.md` written as the runbook
#### Stage 3 — Extraction `[x]`
- [x] `psd_tree.py` for onboarding inspection
- [x] `export_base.py` renders one named group, drops all siblings
- [x] `excludeLayers` escape hatch for the shape-fill bug
- [x] Warns loudly when an `excludeLayers` entry matches nothing
- [x] Both maps verified by eye — no markers, labels, legends or titles survive
#### Stage 4 — Tiler `[x]`
- [x] Crop, Lanczos pyramid, 256 px WebP tiles, z0–z5
- [x] Edge tiles padded to square with alpha; fully-empty tiles skipped
- [x] Rejects a map too large for its grid cell with an actionable message
- [x] `build.py` orchestrates and emits `world.json`; skips the slow render when `base.png` is current
- [x] Partial builds keep other maps in `world.json`
#### Stage 5 — Viewer `[x]`
- [x] Vendored Leaflet 1.9.4 (no CDN — must work offline on LAN)
- [x] Custom CRS, world grid, per-map `OffsetTileLayer` with `bounds`
- [x] Map picker, URL hash state, non-dismissible attribution
- [x] Minimal dark UI, `maxNativeZoom` over-zoom, transparent `errorTileUrl`
- [x] Verified in-browser: 972 tiles, **zero 404s, zero broken tiles**, correct cross-map offsets
#### Stage 6 — Serving `[~]`
- [x] `server/serve.py` — dependency-free, binds `0.0.0.0`, prints the LAN URL
- [x] `image/webp` MIME, tiles cached 7 days, app shell uncached
- [ ] Windows Firewall rule for the port
- [ ] Confirm from a phone on the LAN and record the URL in the README
---
### Phase 2 — verification and hardening ← **next**
#### Stage 7 — Mobile pass
`Owner:` __ · `Depends on:` 6
- [x] Viewport meta with `viewport-fit=cover`, safe-area insets, 44 px touch targets
- [x] Collapsible picker; zoom buttons hidden under 640 px in favour of pinch
- [ ] **Test on a real iOS Safari and a real Android Chrome over LAN** — nothing here is proven until this happens
- [ ] Check pinch, double-tap and inertial pan don't fight page scroll
- [ ] Decide on retina: one extra zoom level vs. `@2x` tiles vs. accept
- [ ] First-paint budget on LAN (target ~2 s)
#### Stage 8 — Third map by someone else
`Owner:` __ · `Depends on:` 2
The real test of the runbook is a person who has not seen the pipeline.
- [ ] Pick a third map (Factory is the fastest loop; Woods/Streets stress size)
- [ ] A teammate adds it using **only** `docs/adding-a-map.md`
- [ ] Every question they have to ask is a documentation bug — fix the doc
- [ ] Confirm the `LOCATION` convention holds; if it doesn't, note the variant
- [ ] Confirm no map needs more than one grid cell
#### Stage 9 — Grid ergonomics
`Owner:` __ · `Depends on:` 8
- [ ] Decide grid layout policy as map count grows (`gridCols` is currently 4)
- [ ] Consider labelling each map on the canvas at low zoom, so the overview is readable
- [ ] Consider per-map `maxBounds` snapping so panning between maps feels deliberate
---
### Phase 3 — backlog (only if wanted)
- [ ] Measure tool using `pxPerMeter` (Customs has it; Dorms doesn't)
- [ ] PWA / offline tile caching for phones that leave the LAN
- [ ] PMTiles single-file archives instead of loose tiles — revisit around 5+ maps
- [ ] Marker/overlay layers — **cut in revision 2.** The PSDs make this cheap to revive: every marker is its own layer with a known bbox, so positions can be extracted programmatically rather than hand-placed
- [ ] Restore the Customs playable-area boundary, if its absence turns out to matter
---
## 8. Parallelisation
Phase 1 is done, so the tracks are narrower now:
| Track | Stages | Skills |
| --- | --- | --- |
| **Mobile / frontend** | 7 | JS, Leaflet, touch CSS, real devices |
| **Content** | 8 | Photoshop-adjacent; mostly following the runbook |
| **Ops** | 6 tail | Windows networking, firewall |
Stages 7 and 8 are fully independent — run them in parallel.
---
## 9. Open questions
1. Where do master PSDs live so every contributor can reach them? *(blocks Stage 0's last item)*
2. Which maps next, and in what order?
3. Is public hosting ever intended? Changes the licence conversation entirely.
4. Does the missing Customs play-area boundary matter enough to restore?
---
*Last updated: 2026-08-07 · Phase 1 complete and verified; Phase 2 next.*
+75
View File
@@ -0,0 +1,75 @@
# TarkovMap
Self-hosted, mobile-friendly Escape from Tarkov map viewer. Layered PSDs go in,
a Leaflet tile pyramid comes out, and every map — related or not — sits side by
side on one shared canvas you can pan across.
Only the **base map art** is extracted. Markers, spawns, legends, captions and
titles are dropped during the render.
## Quickstart
```bash
python -m pip install -r tools/requirements.txt
```
```bash
python tools/build.py
```
```bash
python server/serve.py
```
Open the printed URL. The LAN address works from a phone on the same network.
Source PSDs are not in the repo (see `.gitignore`) — get them from the shared
drive and put them under `sources/`.
## Adding a map
See **[docs/adding-a-map.md](docs/adding-a-map.md)**. Short version: run
`tools/psd_tree.py` to find the group holding the art, add an entry to
`maps.json`, run `tools/build.py`. No application code changes.
## Layout
```
maps.json the only thing you edit to add or change a map
tools/
psd_tree.py inspect a PSD's layer tree
export_base.py PSD -> build/<id>/base.png (base group only)
tile.py base.png -> web/tiles/<id>/{z}/{x}/{y}.webp
build.py orchestrator; also writes web/data/world.json
preview.py stitch built tiles into one overview image
common.py config loading + the world-grid maths
server/serve.py dependency-free static server with sane cache headers
web/ the site: index.html, app.js, style.css, vendored Leaflet
sources/ gitignored — source PSDs
build/ gitignored — intermediate PNGs
web/tiles/ gitignored — generated tiles
```
## How the shared canvas works
Maps are placed on a grid of 8192 × 8192 px cells (`tileSize · 2^maxZoom`). At
that cell size, a map's tile indices shift into world coordinates by exactly
`cell · 2^z` at every zoom — always an integer. So each map keeps its own
locally numbered pyramid, the browser translates on the fly, and **adding a map
never re-tiles the others**.
A map must fit in one cell. Raising `maxZoom` in `maps.json` doubles the cell.
## Current maps
| Map | Source size | Tiled | Tiles |
| --- | --- | --- | --- |
| Customs | 7832 × 5016 | 7832 × 3015 | 503 (8.4 MB) |
| Customs — Dorms | 4301 × 4904 | 4301 × 4904 | 469 (1.4 MB) |
## Licence
Map art is by [re3mr.com](https://re3mr.com) under
**CC BY-NC-SA 4.0**. Attribution is shown in the viewer and must stay there.
Use is non-commercial, and derivative map images inherit the same licence.
Local and LAN hosting is fine; get sign-off before hosting publicly.
+151
View File
@@ -0,0 +1,151 @@
# Adding a map
The whole job is: point the config at a PSD, name the group that holds the map
art, pick a grid cell, build. Everything else is automatic.
Budget ~10 minutes plus render time (roughly 3 minutes per GB of PSD).
---
## 0. Once per machine
```bash
python -m pip install -r tools/requirements.txt
```
Put the PSD under `sources/<area>/`. That directory is gitignored — source art
lives on the shared drive, never in the repo.
---
## 1. Look at the layer tree
```bash
python tools/psd_tree.py sources/customs/customs.psd
```
You are answering two questions.
**Which top-level group holds the map art?** On every re3mr map so far it is
`LOCATION`, sitting next to `OVERLAY`/`OVERLAYS`, `LEGEND` and `TITLE`. Only the
group you name gets rendered, so markers, legends, captions and titles are
dropped by construction — you never have to hide them one by one.
**Are there `shape` layers inside it?** Note their names. psd-tools renders a
stroke-only vector shape as a *solid fill*, which can bury the entire map under
one flat colour. These go in `excludeLayers` at step 3.
---
## 2. Add it to `maps.json`
```json
{
"id": "factory",
"name": "Factory",
"psd": "sources/factory/factory.psd",
"baseGroup": "LOCATION",
"excludeLayers": [],
"crop": null,
"cell": [2, 0]
}
```
| Field | Meaning |
| --- | --- |
| `id` | URL-safe; becomes `web/tiles/<id>/` |
| `baseGroup` | the group from step 1 |
| `excludeLayers` | layer names to hide anywhere inside `baseGroup` |
| `crop` | `[x0, y0, x1, y1]` in PSD pixels, or `null` for the full canvas |
| `cell` | `[col, row]` on the world grid — omit it and the next free cell is used |
| `pxPerMeter` | optional, from the map's scale bar; recorded for later use |
A map must fit inside one grid cell: **8192 × 8192 px** at the default
`maxZoom: 5`. The build fails with a clear message if it doesn't; raising
`maxZoom` by one doubles the cell.
---
## 3. Render the base layer and check it
```bash
python tools/export_base.py factory
```
Open `build/factory/base.png` and actually look at it. You are checking for:
- **large flat areas of solid colour** — a shape layer is filling. Add its name
to `excludeLayers` and re-run. (Customs needs `"Map Borders"` for exactly
this reason; without it the whole playable area renders white.)
- **leftover markers or text** — you named the wrong group, or the art has
markers nested inside the base group.
- **how much dead canvas surrounds the art** — that sets your `crop`.
Re-run after any `maps.json` change; `export_base.py` always re-renders.
---
## 4. Set the crop
Read the pixel bounds of the real map art off `base.png` and put them in
`crop`. Customs uses `[0, 860, 7832, 3875]` — the PSD reserves the top ~860 px
for the title bar and everything below y=3875 for the legend, and tiling that
empty space just makes the map awkward to pan.
If the art fills the canvas, leave `crop: null`.
---
## 5. Build and verify
```bash
python tools/build.py factory # export if stale, then tile, then manifest
python tools/preview.py 3 # stitch every map into one overview
```
`build/world-preview.png` shows all maps at their world positions. Confirm the
new one landed in the cell you intended and doesn't collide with a neighbour.
Then:
```bash
python server/serve.py
```
and open the printed URL.
---
## Useful variations
```bash
python tools/build.py # every map
python tools/build.py --tiles-only # re-tile after a crop change, skip the slow render
python tools/build.py --force-export # re-render even if base.png looks current
```
`build.py` skips the PSD render when `base.png` is newer than the PSD, so
iterating on `crop` is fast — that loop is seconds, not minutes.
Rebuilding one map never touches another map's tiles, and `world.json` keeps
entries for maps that weren't part of this run.
---
## Why the grid works
Every map is tiled independently, numbered from its own top-left corner. The
world places a map in grid cell `(gx, gy)` at world pixel
`(gx · cellSize, gy · cellSize)`, where
```
cellSize = tileSize · 2^maxZoom = 256 · 32 = 8192
```
At that cell size the tile-index shift for a cell is exactly `gx · 2^z` at
every zoom level — always a whole number. So the browser can translate world
tile coordinates into a map's local ones with integer arithmetic and no
resampling (`getTileUrl` in `web/app.js`).
That is what lets you add a map without re-tiling any other map, and what keeps
unrelated maps sharing one continuous canvas.
+29
View File
@@ -0,0 +1,29 @@
{
"$comment": "Single source of truth for the whole build. See docs/adding-a-map.md.",
"tileSize": 256,
"maxZoom": 5,
"gridCols": 4,
"attribution": "Maps by <a href=\"https://re3mr.com\" target=\"_blank\" rel=\"noopener\">re3mr.com</a> &middot; CC BY-NC-SA 4.0",
"maps": [
{
"id": "customs",
"name": "Customs",
"psd": "sources/customs/customs.psd",
"baseGroup": "LOCATION",
"excludeLayers": ["Map Borders"],
"crop": [0, 860, 7832, 3875],
"pxPerMeter": 7.39,
"cell": [0, 0]
},
{
"id": "customs-dorms",
"name": "Customs — Dorms",
"psd": "sources/customs/customs-dorms.psd",
"baseGroup": "LOCATION",
"crop": null,
"cell": [1, 0]
}
]
}
+74
View File
@@ -0,0 +1,74 @@
"""Static server for web/, reachable from other devices on the LAN.
python server/serve.py [port] # default 8080
Deliberately dependency-free. Tiles are immutable once built, so they get a
long cache lifetime while the app shell stays uncached -- that is the whole
difference between a snappy second visit and re-downloading every tile.
For heavier use put Caddy or nginx in front of web/ instead; nothing here is
special.
"""
from __future__ import annotations
import functools
import http.server
import socket
import socketserver
import sys
from pathlib import Path
WEB = Path(__file__).resolve().parent.parent / "web"
class Handler(http.server.SimpleHTTPRequestHandler):
extensions_map = {**http.server.SimpleHTTPRequestHandler.extensions_map,
".webp": "image/webp"}
def end_headers(self):
if "/tiles/" in self.path:
self.send_header("Cache-Control", "public, max-age=604800")
else:
self.send_header("Cache-Control", "no-cache")
super().end_headers()
def log_message(self, fmt, *args):
pass # one line per tile is unreadable
class Server(socketserver.ThreadingTCPServer):
allow_reuse_address = True
daemon_threads = True
def lan_ip() -> str:
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
try:
s.connect(("10.255.255.255", 1)) # no packets sent; just picks the route
return s.getsockname()[0]
except OSError:
return "127.0.0.1"
finally:
s.close()
def main() -> None:
if not (WEB / "data" / "world.json").exists():
print("warning: web/data/world.json missing -- run tools/build.py first\n")
port = int(sys.argv[1]) if len(sys.argv) > 1 else 8080
handler = functools.partial(Handler, directory=str(WEB))
with Server(("0.0.0.0", port), handler) as httpd:
print(f"serving {WEB}")
print(f" local http://localhost:{port}/")
print(f" LAN http://{lan_ip()}:{port}/")
print("\nCtrl+C to stop")
try:
httpd.serve_forever()
except KeyboardInterrupt:
print("\nstopped")
if __name__ == "__main__":
main()
+76
View File
@@ -0,0 +1,76 @@
"""Orchestrator: maps.json -> tiles + web/data/world.json.
python tools/build.py # export (if needed) + tile everything
python tools/build.py customs # just one map
python tools/build.py --tiles-only # skip the slow PSD render
python tools/build.py --force-export # re-render even if base.png exists
Exporting a 1 GB PSD takes minutes, so base.png is reused unless it is older
than the PSD or --force-export is given.
"""
from __future__ import annotations
import json
import sys
import export_base
import tile
from common import BUILD, DATA, ROOT, load_config
def needs_export(m: dict, force: bool) -> bool:
base = BUILD / m["id"] / "base.png"
if force or not base.exists():
return True
psd = ROOT / m["psd"]
return psd.exists() and psd.stat().st_mtime > base.stat().st_mtime
def main(argv: list[str]) -> None:
tiles_only = "--tiles-only" in argv
force = "--force-export" in argv
ids = [a for a in argv if not a.startswith("--")]
cfg = load_config()
targets = [m for m in cfg.maps if m["id"] in ids] if ids else cfg.maps
if ids and len(targets) != len(ids):
raise SystemExit(f"unknown map id in {ids}")
if not tiles_only:
for m in targets:
if needs_export(m, force):
export_base.export(m)
else:
print(f"[{m['id']}] base.png up to date, skipping export "
f"(--force-export to redo)")
entries = [tile.tile_map(cfg, m) for m in targets]
# The world manifest always describes every configured map, not just the
# ones rebuilt this run, so partial builds don't drop maps from the site.
by_id = {e["id"]: e for e in entries}
world_path = DATA / "world.json"
if world_path.exists():
for e in json.loads(world_path.read_text(encoding="utf-8")).get("maps", []):
by_id.setdefault(e["id"], e)
known = {m["id"] for m in cfg.maps}
maps = sorted((e for e in by_id.values() if e["id"] in known),
key=lambda e: (e["cell"][1], e["cell"][0]))
world = {
"tileSize": cfg.tile_size,
"maxZoom": cfg.max_zoom,
"cellSize": cfg.cell_size,
"gridCols": cfg.grid_cols,
"attribution": cfg.attribution,
"maps": maps,
}
DATA.mkdir(parents=True, exist_ok=True)
world_path.write_text(json.dumps(world, indent=2, ensure_ascii=False), encoding="utf-8")
print(f"\nwrote {world_path.relative_to(ROOT)} with {len(maps)} map(s)")
if __name__ == "__main__":
main(sys.argv[1:])
+73
View File
@@ -0,0 +1,73 @@
"""Shared helpers: config loading and the world-grid maths.
The whole project rests on one idea: every map is tiled independently, but all
maps share a single world coordinate space so they can sit side by side on one
big canvas.
That works because placements are snapped to a grid of `cellSize` world pixels,
where
cellSize = tileSize * 2 ** maxZoom
At that cell size, a map parked in grid cell (gx, gy) has a tile-index offset of
exactly `gx * 2**z` / `gy * 2**z` at every zoom level z -- always a whole number.
So a map's own tile pyramid, numbered from its own top-left corner, drops into
the world grid with no resampling and no re-tiling of its neighbours.
Adding a map therefore never touches the tiles of any other map.
"""
from __future__ import annotations
import json
from pathlib import Path
ROOT = Path(__file__).resolve().parent.parent
CONFIG = ROOT / "maps.json"
BUILD = ROOT / "build"
TILES = ROOT / "web" / "tiles"
DATA = ROOT / "web" / "data"
class Config:
def __init__(self, raw: dict):
self.tile_size: int = raw.get("tileSize", 256)
self.max_zoom: int = raw.get("maxZoom", 5)
self.grid_cols: int = raw.get("gridCols", 4)
self.attribution: str = raw.get("attribution", "")
self.maps: list[dict] = raw["maps"]
@property
def cell_size(self) -> int:
"""World pixels per grid cell. Also the largest map we can hold."""
return self.tile_size * 2**self.max_zoom
def assign_cells(self) -> None:
"""Fill in any missing `cell` by walking the grid left-to-right."""
taken = {tuple(m["cell"]) for m in self.maps if m.get("cell")}
cursor = 0
for m in self.maps:
if m.get("cell"):
continue
while (cursor % self.grid_cols, cursor // self.grid_cols) in taken:
cursor += 1
cell = (cursor % self.grid_cols, cursor // self.grid_cols)
m["cell"] = list(cell)
taken.add(cell)
def origin(self, m: dict) -> tuple[int, int]:
gx, gy = m["cell"]
return gx * self.cell_size, gy * self.cell_size
def load_config() -> Config:
cfg = Config(json.loads(CONFIG.read_text(encoding="utf-8")))
cfg.assign_cells()
return cfg
def find_map(cfg: Config, map_id: str) -> dict:
for m in cfg.maps:
if m["id"] == map_id:
return m
raise SystemExit(f"no map with id {map_id!r} in maps.json")
+103
View File
@@ -0,0 +1,103 @@
"""PSD -> flat base-map PNG.
Renders exactly one top-level group (`baseGroup` in maps.json, "LOCATION" for
every re3mr map so far) and discards everything else, so no markers, legend,
title or captions survive into the tiles.
Individual layers inside that group can be suppressed via `excludeLayers`.
That exists because psd-tools renders stroke-only vector shapes as solid
fills -- Customs' "Map Borders" group paints the whole playable area white
if it is left in. Run psd_tree.py and eyeball the output when onboarding a
new map.
python tools/export_base.py # every map
python tools/export_base.py customs # one map
Output: build/<id>/base.png (full PSD canvas, uncropped -- tile.py crops)
"""
from __future__ import annotations
import sys
import time
from PIL import Image
from psd_tools import PSDImage
from common import BUILD, ROOT, find_map, load_config
Image.MAX_IMAGE_PIXELS = None
def hide(group, names: list[str], map_id: str) -> None:
"""Hide every descendant layer whose name matches one in `names`."""
remaining = set(names)
def walk(node):
for layer in node:
if layer.name in remaining:
layer.visible = False
print(f"[{map_id}] excluding {layer.name!r}")
elif layer.is_group():
walk(layer)
walk(group)
# A name that matches nothing is almost always a typo, and it fails
# silently into a bad render, so say so loudly.
found = set()
def collect(node):
for layer in node:
found.add(layer.name)
if layer.is_group():
collect(layer)
collect(group)
for missing in remaining - found:
print(f"[{map_id}] WARNING: excludeLayers entry {missing!r} matched nothing")
def export(m: dict) -> None:
psd_path = ROOT / m["psd"]
if not psd_path.exists():
raise SystemExit(f"missing source PSD: {psd_path}")
out = BUILD / m["id"] / "base.png"
out.parent.mkdir(parents=True, exist_ok=True)
print(f"[{m['id']}] opening {psd_path.name} ({psd_path.stat().st_size / 1e6:.0f} MB)")
t0 = time.time()
psd = PSDImage.open(psd_path)
wanted = m.get("baseGroup", "LOCATION")
group = next((l for l in psd if l.name == wanted), None)
if group is None:
names = ", ".join(repr(l.name) for l in psd)
raise SystemExit(f"[{m['id']}] no top-level layer named {wanted!r}. Found: {names}")
dropped = [l.name for l in psd if l.name != wanted and l.visible]
print(f"[{m['id']}] canvas {psd.size[0]}x{psd.size[1]}, rendering {wanted!r}")
print(f"[{m['id']}] dropping: {', '.join(repr(n) for n in dropped) or '(nothing)'}")
if m.get("excludeLayers"):
hide(group, m["excludeLayers"], m["id"])
# viewport pins the result to the full canvas so every map's export shares
# the PSD's own coordinate system -- crops in maps.json stay meaningful.
img = group.composite(viewport=psd.viewbox, force=True)
img = img.convert("RGB")
img.save(out, "PNG", optimize=False, compress_level=1)
print(f"[{m['id']}] wrote {out.relative_to(ROOT)} "
f"{img.size[0]}x{img.size[1]} in {time.time() - t0:.0f}s\n")
def main(argv: list[str]) -> None:
cfg = load_config()
targets = [find_map(cfg, i) for i in argv] if argv else cfg.maps
for m in targets:
export(m)
if __name__ == "__main__":
main(sys.argv[1:])
+63
View File
@@ -0,0 +1,63 @@
"""Stitch built tiles into one overview PNG -- a layout sanity check.
python tools/preview.py [zoom] # default 3
Writes build/world-preview.png showing every map at its world position, so you
can confirm a newly added map landed in the grid cell you meant before opening
a browser.
"""
from __future__ import annotations
import json
import sys
from PIL import Image
from common import BUILD, DATA, ROOT, TILES
Image.MAX_IMAGE_PIXELS = None
def main() -> None:
z = int(sys.argv[1]) if len(sys.argv) > 1 else 3
world_path = DATA / "world.json"
if not world_path.exists():
raise SystemExit("web/data/world.json missing -- run tools/build.py first")
world = json.loads(world_path.read_text(encoding="utf-8"))
ts, zmax = world["tileSize"], world["maxZoom"]
if not 0 <= z <= zmax:
raise SystemExit(f"zoom must be 0..{zmax}")
scale = 2.0 ** (z - zmax)
def at(v: float) -> int:
return round(v * scale)
width = max(at(m["origin"][0] + m["size"][0]) for m in world["maps"])
height = max(at(m["origin"][1] + m["size"][1]) for m in world["maps"])
canvas = Image.new("RGB", (width, height), (20, 22, 26))
for m in world["maps"]:
gx, gy = m["cell"]
ox, oy = at(m["origin"][0]), at(m["origin"][1])
tdir = TILES / m["id"] / str(z)
if not tdir.exists():
print(f" {m['id']}: no tiles at z{z}, skipped")
continue
n = 0
for col in tdir.iterdir():
for tile in col.glob("*.webp"):
lx, ly = int(col.name), int(tile.stem)
canvas.paste(Image.open(tile).convert("RGB"),
(ox + lx * ts, oy + ly * ts))
n += 1
print(f" {m['id']:<16} cell {gx},{gy} world {ox},{oy} {n} tiles")
out = BUILD / "world-preview.png"
canvas.save(out)
print(f"\nwrote {out.relative_to(ROOT)} {width}x{height} (zoom {z})")
if __name__ == "__main__":
main()
+48
View File
@@ -0,0 +1,48 @@
"""Print a PSD's layer tree. Run this first when onboarding a new map.
python tools/psd_tree.py sources/customs/customs.psd
python tools/psd_tree.py sources/customs/customs.psd --depth 3
You are looking for two things:
1. the name of the top-level group holding the map art -> `baseGroup`
2. any `shape` layers inside it -> likely `excludeLayers` candidates,
because psd-tools fills stroke-only vector shapes as solid colour.
Legend: [V] visible [.] hidden
"""
from __future__ import annotations
import sys
from pathlib import Path
from psd_tools import PSDImage
def walk(node, depth: int, limit: int) -> None:
for layer in node:
flag = "V" if layer.visible else "."
pad = " " * depth
print(f"{pad}[{flag}] {layer.kind:<11} {layer.name[:44]!r:<46} "
f"blend={layer.blend_mode.name.lower():<12} bbox={layer.bbox}")
if layer.is_group() and depth < limit:
walk(layer, depth + 1, limit)
def main() -> None:
args = [a for a in sys.argv[1:] if not a.startswith("--")]
if not args:
raise SystemExit(__doc__)
limit = 2
if "--depth" in sys.argv:
limit = int(sys.argv[sys.argv.index("--depth") + 1])
path = Path(args[0])
psd = PSDImage.open(path)
print(f"{path.name}: {psd.size[0]}x{psd.size[1]}, {psd.depth}-bit\n")
walk(psd, 0, limit)
if __name__ == "__main__":
main()
+4
View File
@@ -0,0 +1,4 @@
# psd-tools needs the [composite] extra: without scikit-image it raises
# ImportError on any layer that carries a stroke or other layer effect.
psd-tools[composite]>=1.18
Pillow>=11
+104
View File
@@ -0,0 +1,104 @@
"""Flat PNG -> XYZ tile pyramid.
python tools/tile.py # every map
python tools/tile.py customs # one map
Reads build/<id>/base.png
Writes web/tiles/<id>/{z}/{x}/{y}.webp (z = 0 .. maxZoom, 1:1 at maxZoom)
Tile indices are local to the map's own top-left corner. The web app shifts
them into world space -- see common.py for why that shift is always exact.
"""
from __future__ import annotations
import math
import shutil
import sys
import time
from PIL import Image
from common import BUILD, ROOT, TILES, Config, find_map, load_config
Image.MAX_IMAGE_PIXELS = None
WEBP = {"format": "WEBP", "quality": 82, "method": 4}
def tile_map(cfg: Config, m: dict) -> dict:
src = BUILD / m["id"] / "base.png"
if not src.exists():
raise SystemExit(f"[{m['id']}] {src.relative_to(ROOT)} missing -- run export_base.py first")
t0 = time.time()
img = Image.open(src).convert("RGB")
if m.get("crop"):
x0, y0, x1, y1 = m["crop"]
img = img.crop((x0, y0, x1, y1))
w, h = img.size
cell = cfg.cell_size
if w > cell or h > cell:
raise SystemExit(
f"[{m['id']}] cropped size {w}x{h} exceeds the {cell}px grid cell. "
f"Raise maxZoom in maps.json (each +1 doubles the cell)."
)
out = TILES / m["id"]
if out.exists():
shutil.rmtree(out)
ts = cfg.tile_size
written = skipped = 0
for z in range(cfg.max_zoom, -1, -1):
scale = 2.0 ** (z - cfg.max_zoom)
zw, zh = max(1, round(w * scale)), max(1, round(h * scale))
level = img if z == cfg.max_zoom else img.resize((zw, zh), Image.LANCZOS)
for ty in range(math.ceil(zh / ts)):
for tx in range(math.ceil(zw / ts)):
box = (tx * ts, ty * ts, min((tx + 1) * ts, zw), min((ty + 1) * ts, zh))
piece = level.crop(box)
if piece.size == (ts, ts):
tile = piece # interior tile, stays opaque RGB
else:
# Edge tile: pad to a full square with transparency rather
# than letting the browser stretch a short tile.
tile = Image.new("RGBA", (ts, ts), (0, 0, 0, 0))
tile.paste(piece, (0, 0))
if not tile.getbbox():
skipped += 1
continue
dst = out / str(z) / str(tx)
dst.mkdir(parents=True, exist_ok=True)
tile.save(dst / f"{ty}.webp", **WEBP)
written += 1
size_mb = sum(f.stat().st_size for f in out.rglob("*.webp")) / 1e6
print(f"[{m['id']}] {w}x{h} -> {written} tiles ({skipped} empty skipped), "
f"{size_mb:.1f} MB, {time.time() - t0:.0f}s")
ox, oy = cfg.origin(m)
return {
"id": m["id"],
"name": m["name"],
"cell": m["cell"],
"origin": [ox, oy],
"size": [w, h],
"pxPerMeter": m.get("pxPerMeter"),
}
def main(argv: list[str]) -> list[dict]:
cfg = load_config()
targets = [find_map(cfg, i) for i in argv] if argv else cfg.maps
return [tile_map(cfg, m) for m in targets]
if __name__ == "__main__":
main(sys.argv[1:])
+131
View File
@@ -0,0 +1,131 @@
/* Tarkov Maps -- every map on one shared canvas.
*
* Coordinates: LatLng is (y, x) in *world pixels* at native resolution.
* A map placed in grid cell (gx, gy) occupies the world rectangle
* [gx*cellSize, gy*cellSize] .. [+width, +height]. Because cellSize is
* tileSize * 2**maxZoom, the tile-index shift for a cell is exactly
* cell * 2**z at every zoom -- so each map keeps its own locally numbered
* pyramid and we translate on the way out in getTileUrl().
*/
const ZOOM_HEADROOM = 2; // how far past 1:1 the user may zoom
const BLANK = 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=';
const OffsetTileLayer = L.TileLayer.extend({
getTileUrl(coords) {
const n = 2 ** coords.z;
return L.Util.template(this._url, {
z: coords.z,
x: coords.x - this.options.cell[0] * n,
y: coords.y - this.options.cell[1] * n,
});
},
});
const rectOf = (m) => L.latLngBounds(
[m.origin[1], m.origin[0]],
[m.origin[1] + m.size[1], m.origin[0] + m.size[0]],
);
function readHash() {
const p = location.hash.replace(/^#/, '').split('/');
if (p.length !== 3) return null;
const [z, y, x] = p.map(Number);
return [z, y, x].every(Number.isFinite) ? { z, y, x } : null;
}
async function main() {
const world = await fetch('data/world.json', { cache: 'no-cache' }).then((r) => {
if (!r.ok) throw new Error(`world.json: ${r.status}`);
return r.json();
});
if (!world.maps.length) throw new Error('world.json contains no maps');
const ZMAX = world.maxZoom;
// CRS where one LatLng unit == one source pixel at zoom ZMAX, y pointing
// down so world coordinates read the same way as image coordinates.
const CRS = L.extend({}, L.CRS.Simple, {
transformation: new L.Transformation(1, 0, 1, 0),
scale: (z) => 2 ** (z - ZMAX),
zoom: (s) => Math.log(s) / Math.LN2 + ZMAX,
});
const extent = world.maps.reduce(
(acc, m) => (acc ? acc.extend(rectOf(m)) : rectOf(m)), null,
);
const map = L.map('map', {
crs: CRS,
minZoom: 0,
maxZoom: ZMAX + ZOOM_HEADROOM,
zoomSnap: 0.25,
zoomDelta: 0.5,
wheelPxPerZoomLevel: 90,
maxBounds: extent.pad(0.08),
maxBoundsViscosity: 0.75,
attributionControl: false,
});
L.control.attribution({ prefix: false })
.addAttribution(world.attribution)
.addTo(map);
for (const m of world.maps) {
new OffsetTileLayer(`tiles/${m.id}/{z}/{x}/{y}.webp`, {
cell: m.cell,
bounds: rectOf(m),
tileSize: world.tileSize,
minZoom: 0,
maxZoom: ZMAX + ZOOM_HEADROOM,
maxNativeZoom: ZMAX,
noWrap: true,
keepBuffer: 2,
updateWhenIdle: false,
errorTileUrl: BLANK,
}).addTo(map);
}
// --- picker -----------------------------------------------------------
const list = document.getElementById('maplist');
const buttons = world.maps.map((m) => {
const b = document.createElement('button');
b.textContent = m.name;
b.dataset.id = m.id;
b.addEventListener('click', () => {
map.flyToBounds(rectOf(m), { padding: [20, 20], duration: 0.6 });
if (window.matchMedia('(max-width: 640px)').matches) {
document.getElementById('panel').open = false;
}
});
list.appendChild(b);
return b;
});
const syncUI = () => {
const c = map.getCenter();
const active = world.maps.find((m) => rectOf(m).contains(c));
buttons.forEach((b) => b.setAttribute('aria-current', String(active?.id === b.dataset.id)));
const z = Math.round(map.getZoom() * 4) / 4;
history.replaceState(null, '', `#${z}/${Math.round(c.lat)}/${Math.round(c.lng)}`);
};
map.on('moveend zoomend', syncUI);
// --- initial view -----------------------------------------------------
const h = readHash();
if (h) map.setView([h.y, h.x], h.z);
else map.fitBounds(rectOf(world.maps[0]), { padding: [20, 20] });
syncUI();
document.getElementById('boot').remove();
window.tarkovMap = map; // handy from the console when checking a new map
window.tarkovWorld = world;
}
main().catch((err) => {
document.getElementById('boot').textContent = `Failed to load: ${err.message}`;
console.error(err);
});
+24
View File
@@ -0,0 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=5, viewport-fit=cover">
<title>Tarkov Maps</title>
<link rel="stylesheet" href="vendor/leaflet.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<div id="map"></div>
<details id="panel" open>
<summary>Maps</summary>
<nav id="maplist"></nav>
</details>
<div id="boot">Loading&hellip;</div>
<script src="vendor/leaflet.js"></script>
<script src="app.js"></script>
</body>
</html>
+114
View File
@@ -0,0 +1,114 @@
:root {
--bg: #14161a;
--panel: #1e2229ee;
--line: #333a44;
--text: #e6e8ec;
--muted: #9aa3b0;
--accent: #7fc4a0;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
height: 100%;
background: var(--bg);
color: var(--text);
font: 14px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
overscroll-behavior: none;
}
#map {
position: absolute;
inset: 0;
background: var(--bg);
}
#boot {
position: absolute;
inset: 0;
display: grid;
place-items: center;
color: var(--muted);
pointer-events: none;
}
/* --- map picker ------------------------------------------------------- */
#panel {
position: absolute;
z-index: 1000;
top: calc(10px + env(safe-area-inset-top));
left: calc(10px + env(safe-area-inset-left));
max-width: min(260px, calc(100vw - 20px));
background: var(--panel);
border: 1px solid var(--line);
border-radius: 8px;
backdrop-filter: blur(6px);
overflow: hidden;
}
#panel summary {
padding: 10px 14px;
cursor: pointer;
font-weight: 600;
letter-spacing: .04em;
text-transform: uppercase;
font-size: 12px;
color: var(--muted);
user-select: none;
list-style: none;
}
#panel summary::-webkit-details-marker { display: none; }
#panel summary::after { content: " ▾"; }
#panel:not([open]) summary::after { content: " ▸"; }
#maplist {
display: flex;
flex-direction: column;
border-top: 1px solid var(--line);
max-height: 50vh;
overflow-y: auto;
}
#maplist button {
all: unset;
padding: 11px 14px;
min-height: 44px; /* touch target */
cursor: pointer;
color: var(--text);
border-bottom: 1px solid #ffffff0f;
display: flex;
align-items: center;
gap: 8px;
}
#maplist button:last-child { border-bottom: 0; }
#maplist button:hover,
#maplist button:focus-visible { background: #ffffff12; }
#maplist button[aria-current="true"] { color: var(--accent); }
#maplist button[aria-current="true"]::before { content: "●"; font-size: 9px; }
#maplist button:not([aria-current="true"])::before { content: "○"; font-size: 9px; color: var(--muted); }
/* --- leaflet chrome --------------------------------------------------- */
.leaflet-container { background: var(--bg); font: inherit; }
.leaflet-control-zoom a {
background: var(--panel);
border-color: var(--line) !important;
color: var(--text);
}
.leaflet-control-zoom a:hover { background: #2a303a; }
.leaflet-control-attribution {
background: var(--panel) !important;
color: var(--muted);
padding: 3px 8px;
font-size: 11px;
}
.leaflet-control-attribution a { color: var(--accent); }
@media (max-width: 640px) {
#panel { max-width: calc(100vw - 20px); }
.leaflet-control-zoom { display: none; } /* pinch to zoom instead */
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 696 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

+661
View File
@@ -0,0 +1,661 @@
/* required styles */
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
position: absolute;
left: 0;
top: 0;
}
.leaflet-container {
overflow: hidden;
}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
-webkit-user-select: none;
-moz-user-select: none;
user-select: none;
-webkit-user-drag: none;
}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
image-rendering: -webkit-optimize-contrast;
}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
width: 1600px;
height: 1600px;
-webkit-transform-origin: 0 0;
}
.leaflet-marker-icon,
.leaflet-marker-shadow {
display: block;
}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
max-width: none !important;
max-height: none !important;
}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
max-width: none !important;
max-height: none !important;
width: auto;
padding: 0;
}
.leaflet-container img.leaflet-tile {
/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
mix-blend-mode: plus-lighter;
}
.leaflet-container.leaflet-touch-zoom {
-ms-touch-action: pan-x pan-y;
touch-action: pan-x pan-y;
}
.leaflet-container.leaflet-touch-drag {
-ms-touch-action: pinch-zoom;
/* Fallback for FF which doesn't support pinch-zoom */
touch-action: none;
touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
-ms-touch-action: none;
touch-action: none;
}
.leaflet-container {
-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
filter: inherit;
visibility: hidden;
}
.leaflet-tile-loaded {
visibility: inherit;
}
.leaflet-zoom-box {
width: 0;
height: 0;
-moz-box-sizing: border-box;
box-sizing: border-box;
z-index: 800;
}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
-moz-user-select: none;
}
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }
.leaflet-vml-shape {
width: 1px;
height: 1px;
}
.lvml {
behavior: url(#default#VML);
display: inline-block;
position: absolute;
}
/* control positioning */
.leaflet-control {
position: relative;
z-index: 800;
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
.leaflet-top,
.leaflet-bottom {
position: absolute;
z-index: 1000;
pointer-events: none;
}
.leaflet-top {
top: 0;
}
.leaflet-right {
right: 0;
}
.leaflet-bottom {
bottom: 0;
}
.leaflet-left {
left: 0;
}
.leaflet-control {
float: left;
clear: both;
}
.leaflet-right .leaflet-control {
float: right;
}
.leaflet-top .leaflet-control {
margin-top: 10px;
}
.leaflet-bottom .leaflet-control {
margin-bottom: 10px;
}
.leaflet-left .leaflet-control {
margin-left: 10px;
}
.leaflet-right .leaflet-control {
margin-right: 10px;
}
/* zoom and fade animations */
.leaflet-fade-anim .leaflet-popup {
opacity: 0;
-webkit-transition: opacity 0.2s linear;
-moz-transition: opacity 0.2s linear;
transition: opacity 0.2s linear;
}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
opacity: 1;
}
.leaflet-zoom-animated {
-webkit-transform-origin: 0 0;
-ms-transform-origin: 0 0;
transform-origin: 0 0;
}
svg.leaflet-zoom-animated {
will-change: transform;
}
.leaflet-zoom-anim .leaflet-zoom-animated {
-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
-moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
transition: transform 0.25s cubic-bezier(0,0,0.25,1);
}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
-webkit-transition: none;
-moz-transition: none;
transition: none;
}
.leaflet-zoom-anim .leaflet-zoom-hide {
visibility: hidden;
}
/* cursors */
.leaflet-interactive {
cursor: pointer;
}
.leaflet-grab {
cursor: -webkit-grab;
cursor: -moz-grab;
cursor: grab;
}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
cursor: crosshair;
}
.leaflet-popup-pane,
.leaflet-control {
cursor: auto;
}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
cursor: move;
cursor: -webkit-grabbing;
cursor: -moz-grabbing;
cursor: grabbing;
}
/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
pointer-events: none;
}
.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
pointer-events: auto;
}
/* visual tweaks */
.leaflet-container {
background: #ddd;
outline-offset: 1px;
}
.leaflet-container a {
color: #0078A8;
}
.leaflet-zoom-box {
border: 2px dotted #38f;
background: rgba(255,255,255,0.5);
}
/* general typography */
.leaflet-container {
font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
font-size: 12px;
font-size: 0.75rem;
line-height: 1.5;
}
/* general toolbar styles */
.leaflet-bar {
box-shadow: 0 1px 5px rgba(0,0,0,0.65);
border-radius: 4px;
}
.leaflet-bar a {
background-color: #fff;
border-bottom: 1px solid #ccc;
width: 26px;
height: 26px;
line-height: 26px;
display: block;
text-align: center;
text-decoration: none;
color: black;
}
.leaflet-bar a,
.leaflet-control-layers-toggle {
background-position: 50% 50%;
background-repeat: no-repeat;
display: block;
}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
background-color: #f4f4f4;
}
.leaflet-bar a:first-child {
border-top-left-radius: 4px;
border-top-right-radius: 4px;
}
.leaflet-bar a:last-child {
border-bottom-left-radius: 4px;
border-bottom-right-radius: 4px;
border-bottom: none;
}
.leaflet-bar a.leaflet-disabled {
cursor: default;
background-color: #f4f4f4;
color: #bbb;
}
.leaflet-touch .leaflet-bar a {
width: 30px;
height: 30px;
line-height: 30px;
}
.leaflet-touch .leaflet-bar a:first-child {
border-top-left-radius: 2px;
border-top-right-radius: 2px;
}
.leaflet-touch .leaflet-bar a:last-child {
border-bottom-left-radius: 2px;
border-bottom-right-radius: 2px;
}
/* zoom control */
.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
font: bold 18px 'Lucida Console', Monaco, monospace;
text-indent: 1px;
}
.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {
font-size: 22px;
}
/* layers control */
.leaflet-control-layers {
box-shadow: 0 1px 5px rgba(0,0,0,0.4);
background: #fff;
border-radius: 5px;
}
.leaflet-control-layers-toggle {
background-image: url(images/layers.png);
width: 36px;
height: 36px;
}
.leaflet-retina .leaflet-control-layers-toggle {
background-image: url(images/layers-2x.png);
background-size: 26px 26px;
}
.leaflet-touch .leaflet-control-layers-toggle {
width: 44px;
height: 44px;
}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
display: none;
}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
display: block;
position: relative;
}
.leaflet-control-layers-expanded {
padding: 6px 10px 6px 6px;
color: #333;
background: #fff;
}
.leaflet-control-layers-scrollbar {
overflow-y: scroll;
overflow-x: hidden;
padding-right: 5px;
}
.leaflet-control-layers-selector {
margin-top: 2px;
position: relative;
top: 1px;
}
.leaflet-control-layers label {
display: block;
font-size: 13px;
font-size: 1.08333em;
}
.leaflet-control-layers-separator {
height: 0;
border-top: 1px solid #ddd;
margin: 5px -10px 5px -6px;
}
/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
background-image: url(images/marker-icon.png);
}
/* attribution and scale controls */
.leaflet-container .leaflet-control-attribution {
background: #fff;
background: rgba(255, 255, 255, 0.8);
margin: 0;
}
.leaflet-control-attribution,
.leaflet-control-scale-line {
padding: 0 5px;
color: #333;
line-height: 1.4;
}
.leaflet-control-attribution a {
text-decoration: none;
}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
text-decoration: underline;
}
.leaflet-attribution-flag {
display: inline !important;
vertical-align: baseline !important;
width: 1em;
height: 0.6669em;
}
.leaflet-left .leaflet-control-scale {
margin-left: 5px;
}
.leaflet-bottom .leaflet-control-scale {
margin-bottom: 5px;
}
.leaflet-control-scale-line {
border: 2px solid #777;
border-top: none;
line-height: 1.1;
padding: 2px 5px 1px;
white-space: nowrap;
-moz-box-sizing: border-box;
box-sizing: border-box;
background: rgba(255, 255, 255, 0.8);
text-shadow: 1px 1px #fff;
}
.leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777;
border-bottom: none;
margin-top: -2px;
}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
border-bottom: 2px solid #777;
}
.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
box-shadow: none;
}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
border: 2px solid rgba(0,0,0,0.2);
background-clip: padding-box;
}
/* popup */
.leaflet-popup {
position: absolute;
text-align: center;
margin-bottom: 20px;
}
.leaflet-popup-content-wrapper {
padding: 1px;
text-align: left;
border-radius: 12px;
}
.leaflet-popup-content {
margin: 13px 24px 13px 20px;
line-height: 1.3;
font-size: 13px;
font-size: 1.08333em;
min-height: 1px;
}
.leaflet-popup-content p {
margin: 17px 0;
margin: 1.3em 0;
}
.leaflet-popup-tip-container {
width: 40px;
height: 20px;
position: absolute;
left: 50%;
margin-top: -1px;
margin-left: -20px;
overflow: hidden;
pointer-events: none;
}
.leaflet-popup-tip {
width: 17px;
height: 17px;
padding: 1px;
margin: -10px auto 0;
pointer-events: auto;
-webkit-transform: rotate(45deg);
-moz-transform: rotate(45deg);
-ms-transform: rotate(45deg);
transform: rotate(45deg);
}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
background: white;
color: #333;
box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}
.leaflet-container a.leaflet-popup-close-button {
position: absolute;
top: 0;
right: 0;
border: none;
text-align: center;
width: 24px;
height: 24px;
font: 16px/24px Tahoma, Verdana, sans-serif;
color: #757575;
text-decoration: none;
background: transparent;
}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
color: #585858;
}
.leaflet-popup-scrolled {
overflow: auto;
}
.leaflet-oldie .leaflet-popup-content-wrapper {
-ms-zoom: 1;
}
.leaflet-oldie .leaflet-popup-tip {
width: 24px;
margin: 0 auto;
-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
}
.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
border: 1px solid #999;
}
/* div icon */
.leaflet-div-icon {
background: #fff;
border: 1px solid #666;
}
/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
position: absolute;
padding: 6px;
background-color: #fff;
border: 1px solid #fff;
border-radius: 3px;
color: #222;
white-space: nowrap;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
pointer-events: none;
box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.leaflet-tooltip.leaflet-interactive {
cursor: pointer;
pointer-events: auto;
}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
position: absolute;
pointer-events: none;
border: 6px solid transparent;
background: transparent;
content: "";
}
/* Directions */
.leaflet-tooltip-bottom {
margin-top: 6px;
}
.leaflet-tooltip-top {
margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
left: 50%;
margin-left: -6px;
}
.leaflet-tooltip-top:before {
bottom: 0;
margin-bottom: -12px;
border-top-color: #fff;
}
.leaflet-tooltip-bottom:before {
top: 0;
margin-top: -12px;
margin-left: -6px;
border-bottom-color: #fff;
}
.leaflet-tooltip-left {
margin-left: -6px;
}
.leaflet-tooltip-right {
margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
top: 50%;
margin-top: -6px;
}
.leaflet-tooltip-left:before {
right: 0;
margin-right: -12px;
border-left-color: #fff;
}
.leaflet-tooltip-right:before {
left: 0;
margin-left: -12px;
border-right-color: #fff;
}
/* Printing */
@media print {
/* Prevent printers from removing background-images of controls. */
.leaflet-control {
-webkit-print-color-adjust: exact;
print-color-adjust: exact;
}
}
+6
View File
@@ -0,0 +1,6 @@
/* @preserve
* Leaflet 1.9.4, a JS library for interactive maps. https://leafletjs.com
* (c) 2010-2023 Vladimir Agafonkin, (c) 2010-2011 CloudMade
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).leaflet={})}(this,function(t){"use strict";function l(t){for(var e,i,n=1,o=arguments.length;n<o;n++)for(e in i=arguments[n])t[e]=i[e];return t}var R=Object.create||function(t){return N.prototype=t,new N};function N(){}function a(t,e){var i,n=Array.prototype.slice;return t.bind?t.bind.apply(t,n.call(arguments,1)):(i=n.call(arguments,2),function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)})}var D=0;function h(t){return"_leaflet_id"in t||(t._leaflet_id=++D),t._leaflet_id}function j(t,e,i){var n,o,s=function(){n=!1,o&&(r.apply(i,o),o=!1)},r=function(){n?o=arguments:(t.apply(i,arguments),setTimeout(s,e),n=!0)};return r}function H(t,e,i){var n=e[1],e=e[0],o=n-e;return t===n&&i?t:((t-e)%o+o)%o+e}function u(){return!1}function i(t,e){return!1===e?t:(e=Math.pow(10,void 0===e?6:e),Math.round(t*e)/e)}function W(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function F(t){return W(t).split(/\s+/)}function c(t,e){for(var i in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?R(t.options):{}),e)t.options[i]=e[i];return t.options}function U(t,e,i){var n,o=[];for(n in t)o.push(encodeURIComponent(i?n.toUpperCase():n)+"="+encodeURIComponent(t[n]));return(e&&-1!==e.indexOf("?")?"&":"?")+o.join("&")}var V=/\{ *([\w_ -]+) *\}/g;function q(t,i){return t.replace(V,function(t,e){e=i[e];if(void 0===e)throw new Error("No value provided for variable "+t);return e="function"==typeof e?e(i):e})}var d=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function G(t,e){for(var i=0;i<t.length;i++)if(t[i]===e)return i;return-1}var K="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function Y(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var X=0;function J(t){var e=+new Date,i=Math.max(0,16-(e-X));return X=e+i,window.setTimeout(t,i)}var $=window.requestAnimationFrame||Y("RequestAnimationFrame")||J,Q=window.cancelAnimationFrame||Y("CancelAnimationFrame")||Y("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function x(t,e,i){if(!i||$!==J)return $.call(window,a(t,e));t.call(e)}function r(t){t&&Q.call(window,t)}var tt={__proto__:null,extend:l,create:R,bind:a,get lastId(){return D},stamp:h,throttle:j,wrapNum:H,falseFn:u,formatNum:i,trim:W,splitWords:F,setOptions:c,getParamString:U,template:q,isArray:d,indexOf:G,emptyImageUrl:K,requestFn:$,cancelFn:Q,requestAnimFrame:x,cancelAnimFrame:r};function et(){}et.extend=function(t){function e(){c(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()}var i,n=e.__super__=this.prototype,o=R(n);for(i in(o.constructor=e).prototype=o,this)Object.prototype.hasOwnProperty.call(this,i)&&"prototype"!==i&&"__super__"!==i&&(e[i]=this[i]);if(t.statics&&l(e,t.statics),t.includes){var s=t.includes;if("undefined"!=typeof L&&L&&L.Mixin){s=d(s)?s:[s];for(var r=0;r<s.length;r++)s[r]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}l.apply(null,[o].concat(t.includes))}return l(o,t),delete o.statics,delete o.includes,o.options&&(o.options=n.options?R(n.options):{},l(o.options,t.options)),o._initHooks=[],o.callInitHooks=function(){if(!this._initHooksCalled){n.callInitHooks&&n.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=o._initHooks.length;t<e;t++)o._initHooks[t].call(this)}},e},et.include=function(t){var e=this.prototype.options;return l(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},et.mergeOptions=function(t){return l(this.prototype.options,t),this},et.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),i="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(i),this};var e={on:function(t,e,i){if("object"==typeof t)for(var n in t)this._on(n,t[n],e);else for(var o=0,s=(t=F(t)).length;o<s;o++)this._on(t[o],e,i);return this},off:function(t,e,i){if(arguments.length)if("object"==typeof t)for(var n in t)this._off(n,t[n],e);else{t=F(t);for(var o=1===arguments.length,s=0,r=t.length;s<r;s++)o?this._off(t[s]):this._off(t[s],e,i)}else delete this._events;return this},_on:function(t,e,i,n){"function"!=typeof e?console.warn("wrong listener type: "+typeof e):!1===this._listens(t,e,i)&&(e={fn:e,ctx:i=i===this?void 0:i},n&&(e.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(e))},_off:function(t,e,i){var n,o,s;if(this._events&&(n=this._events[t]))if(1===arguments.length){if(this._firingCount)for(o=0,s=n.length;o<s;o++)n[o].fn=u;delete this._events[t]}else"function"!=typeof e?console.warn("wrong listener type: "+typeof e):!1!==(e=this._listens(Line truncated
//# sourceMappingURL=leaflet.js.map
+1
View File
@@ -0,0 +1 @@
{"version":3,"file":"dist/leaflet.js.map","sources":["../src/core/Util.js","../src/core/Class.js","../src/core/Events.js","../src/geometry/Point.js","../src/geometry/Bounds.js","../src/geo/LatLngBounds.js","../src/geo/LatLng.js","../src/geo/crs/CRS.js","../src/geo/crs/CRS.Earth.js","../src/geo/projection/Projection.SphericalMercator.js","../src/geometry/Transformation.js","../src/geo/crs/CRS.EPSG3857.js","../src/layer/vector/SVG.Util.js","../src/core/Browser.js","../src/dom/DomEvent.Pointer.js","../src/dom/DomEvent.DoubleTap.js","../src/dom/DomUtil.js","../src/dom/DomEvent.js","../src/dom/PosAnimation.js","../src/map/Map.js","../src/control/Control.js","../src/control/Control.Layers.js","../src/control/Control.Zoom.js","../src/control/Control.Scale.js","../src/control/Control.Attribution.js","../src/core/Handler.js","../src/control/index.js","../src/core/index.js","../src/dom/Draggable.js","../src/geometry/PolyUtil.js","../src/geometry/LineUtil.js","../src/geo/projection/Projection.LonLat.js","../src/geo/projection/Projection.Mercator.js","../src/geo/crs/CRS.EPSG3395.js","../src/geo/crs/CRS.EPSG4326.js","../src/geo/crs/CRS.Simple.js","../src/layer/Layer.js","../src/geo/crs/index.js","../src/layer/LayerGroup.js","../src/layer/FeatureGroup.js","../src/layer/marker/Icon.js","../src/layer/marker/Icon.Default.js","../src/layer/marker/Marker.Drag.js","../src/layer/marker/Marker.js","../src/layer/vector/Path.js","../src/layer/vector/CircleMarker.js","../src/layer/vector/Circle.js","../src/layer/vector/Polyline.js","../src/layer/vector/Polygon.js","../src/layer/GeoJSON.js","../src/layer/ImageOverlay.js","../src/layer/VideoOverlay.js","../src/layer/SVGOverlay.js","../src/layer/DivOverlay.js","../src/layer/Popup.js","../src/layer/Tooltip.js","../src/layer/marker/DivIcon.js","../src/layer/marker/index.js","../src/layer/tile/GridLayer.js","../src/layer/tile/TileLayer.js","../src/layer/tile/TileLayer.WMS.js","../src/layer/tile/index.js","../src/layer/vector/Renderer.js","../src/layer/vector/Canvas.js","../src/layer/vector/SVG.VML.js","../src/layer/vector/SVG.js","../src/layer/vector/Renderer.getRenderer.js","../src/layer/vector/Rectangle.js","../src/layer/vector/index.js","../src/layer/index.js","../src/map/handler/Map.BoxZoom.js","../src/map/handler/Map.DoubleClickZoom.js","../src/map/handler/Map.Drag.js","../src/map/handler/Map.Keyboard.js","../src/map/handler/Map.ScrollWheelZoom.js","../src/map/handler/Map.TapHold.js","../src/map/handler/Map.TouchZoom.js","../src/map/index.js"],"names":["extend","dest","i","src","j","len","arguments","length","create","Object","proto","F","prototype","bind","fn","obj","args","slice","Array","apply","call","concat","lastId","stamp","_leaflet_id","throttle","time","context","lock","later","wrapperFn","setTimeout","wrapNum","x","range","includeMax","max","min","d","falseFn","formatNum","num","precision","pow","Math","undefined","round","trim","str","replace","splitWords","split","setOptions","options","hasOwnProperty","getParamString","existingUrl","uppercase","params","push","encodeURIComponent","toUpperCase","indexOf","join","templateRe","template","data","key","value","Error","isArray","toString","array","el","emptyImageUrl","getPrefixed","name","window","lastTime","timeoutDefer","Date","timeToCall","requestFn","requestAnimationFrame","cancelFn","cancelAnimationFrame","id","clearTimeout","requestAnimFrame","immediate","cancelAnimFrame","Class","props","NewClass","Util.setOptions","this","initialize","callInitHooks","parentProto","__super__","Util.create","constructor","statics","Util.extend","includes","checkDeprecatedMixinEvents","L","Mixin","Util.isArray","Events","console","warn","stack","_initHooks","_initHooksCalled","include","parentOptions","mergeOptions","addInitHook","init","on","types","type","_on","Util.splitWords","off","_off","removeAll","_events","_once","_listens","newListener","ctx","once","listeners","_firingCount","Util.falseFn","index","listener","splice","fire","propagate","listens","event","target","sourceTarget","l","_propagateEvent","_fn","_eventParents","addEventParent","Util.stamp","removeEventParent","e","layer","propagatedFrom","Evented","addEventListener","removeEventListener","clearAllEventListeners","addOneTimeEventListener","fireEvent","hasEventListeners","Point","y","trunc","v","floor","ceil","toPoint","Bounds","a","b","points","toBounds","LatLngBounds","corner1","corner2","latlngs","toLatLngBounds","LatLng","lat","lng","alt","isNaN","toLatLng","c","lon","clone","add","point","_add","subtract","_subtract","divideBy","_divideBy","multiplyBy","_multiplyBy","scaleBy","unscaleBy","_round","_floor","_ceil","_trunc","distanceTo","sqrt","equals","contains","abs","min2","max2","getCenter","getBottomLeft","getTopRight","getTopLeft","getBottomRight","getSize","intersects","bounds","xIntersects","yIntersects","overlaps","xOverlaps","yOverlaps","isValid","pad","bufferRatio","heightBuffer","widthBuffer","sw2","ne2","sw","_southWest","ne","_northEast","getSouthWestLine truncated