Compare commits
7
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
968134f8ee | ||
|
|
b430cf32f2 | ||
|
|
93fa3a6054 | ||
|
|
de03f5bcaf | ||
|
|
0651bfe07a | ||
|
|
c4656a9607 | ||
|
|
a9d1d2475a |
@@ -668,10 +668,17 @@ async def correlate_call(
|
||||
vehicles: Optional[list[str]] = None,
|
||||
cleared_units: Optional[list[str]] = None,
|
||||
reassignment: bool = False,
|
||||
embedding: Optional[list] = None,
|
||||
severity: Optional[str] = None,
|
||||
) -> Optional[str]:
|
||||
"""
|
||||
Link call_id to an existing incident or create a new one.
|
||||
Thin wrapper: builds context → runs rules decision → commits.
|
||||
|
||||
``embedding`` and ``severity`` are the SCENE's own values (server-26#80/#95).
|
||||
Callers that re-correlate a whole call rather than a scene — the
|
||||
recorrelation sweep — pass the call doc's stored values explicitly; they are
|
||||
no longer read from the doc inside _build_context.
|
||||
"""
|
||||
ctx = await _build_context(
|
||||
call_id=call_id, units=units, vehicles=vehicles, cleared_units=cleared_units,
|
||||
@@ -679,6 +686,7 @@ async def correlate_call(
|
||||
system_id=system_id, talkgroup_id=talkgroup_id, talkgroup_name=talkgroup_name,
|
||||
tags=tags, incident_type=incident_type, location=location,
|
||||
reassignment=reassignment, create_if_new=create_if_new,
|
||||
embedding=embedding, severity=severity,
|
||||
)
|
||||
decision = _run_decision(ctx)
|
||||
return await _apply_and_log(decision, ctx)
|
||||
@@ -700,6 +708,8 @@ async def preview_correlation(
|
||||
vehicles: Optional[list[str]] = None,
|
||||
cleared_units: Optional[list[str]] = None,
|
||||
reassignment: bool = False,
|
||||
embedding: Optional[list] = None,
|
||||
severity: Optional[str] = None,
|
||||
) -> dict:
|
||||
"""
|
||||
Run the rules engine and return the decision WITHOUT committing to Firestore.
|
||||
@@ -720,6 +730,7 @@ async def preview_correlation(
|
||||
system_id=system_id, talkgroup_id=talkgroup_id, talkgroup_name=talkgroup_name,
|
||||
tags=tags, incident_type=incident_type, location=location,
|
||||
reassignment=reassignment, create_if_new=create_if_new,
|
||||
embedding=embedding, severity=severity,
|
||||
)
|
||||
decision = _run_decision(ctx)
|
||||
return {"decision": decision, "ctx": ctx}
|
||||
@@ -752,6 +763,8 @@ async def _build_context(
|
||||
location: Optional[str],
|
||||
reassignment: bool,
|
||||
create_if_new: bool,
|
||||
embedding: Optional[list] = None,
|
||||
severity: Optional[str] = None,
|
||||
) -> dict:
|
||||
now = reference_time or datetime.now(timezone.utc)
|
||||
window = timedelta(hours=settings.correlation_window_hours)
|
||||
@@ -777,11 +790,20 @@ async def _build_context(
|
||||
all_active = _drop_capped(all_active, now)
|
||||
recent = [inc for inc in all_active if _within_window_of(inc, now, window)]
|
||||
|
||||
call_embedding = call_doc.get("embedding")
|
||||
# embedding and severity come from the SCENE being correlated, not the call
|
||||
# doc — server-26#80 / #95. intelligence.py writes only the primary scene's
|
||||
# embedding and severity to calls/{id}, so reading them back here handed
|
||||
# every non-primary scene the primary scene's semantic vector and severity
|
||||
# rung: a scene about a different event scored against the wrong incident on
|
||||
# the embedding path (:1166/:1205/:1533) and could inherit a minor/moderate/
|
||||
# major severity it never had, clearing the creation gate on borrowed
|
||||
# weight. Same failure and same fix as the #87 coords leak directly below —
|
||||
# a scene that passes none has none, and is judged thin on its own signal.
|
||||
call_embedding = embedding
|
||||
call_units = units if units is not None else (call_doc.get("units") or [])
|
||||
call_vehicles = vehicles if vehicles is not None else (call_doc.get("vehicles") or [])
|
||||
call_cleared = cleared_units if cleared_units is not None else (call_doc.get("cleared_units") or [])
|
||||
call_severity = call_doc.get("severity") or "routine"
|
||||
call_severity = severity or "routine"
|
||||
# A string that is not a place is not a location anywhere downstream — not
|
||||
# in the fit tests, not in the thin-call test, not in the LLM prompt, and
|
||||
# not on the incident. Its coordinates go with it: coords are geocoded
|
||||
|
||||
@@ -24,7 +24,16 @@ from app.internal.incident_correlator import clean_location, location_is_unit
|
||||
_PROMPT_TEMPLATE = """You are analyzing a P25 public safety radio recording. The audio was transcribed by Whisper through a digital radio vocoder, which introduces errors. Each numbered transmission is a separate PTT press from a different radio.
|
||||
|
||||
SCENE DETECTION:
|
||||
A busy dispatch channel sometimes captures back-to-back conversations about multiple concurrent incidents in a single recording. Detect whether this recording contains ONE scene (all transmissions relate to a single event) or MULTIPLE scenes (clearly distinct dispatch conversations with different units being assigned, different locations, different event types). Assign short status transmissions (10-4, en route, acknowledgements) with no clear scene context to the most recent scene before them in the list.
|
||||
A busy dispatch channel sometimes captures back-to-back conversations about multiple concurrent incidents in a single recording. Your default is ONE scene. Return MULTIPLE scenes ONLY when the recording clearly contains two or more SEPARATE EVENTS — different incidents at different places, with no shared units, no shared subject, and no conversational thread connecting them.
|
||||
|
||||
These do NOT make a new scene — keep them in the same scene:
|
||||
- a different unit or speaker joining the same event
|
||||
- a follow-up transmission about the same job (records check, case number, tow/mileage, a unit clearing, an ETA, a location correction)
|
||||
- the same subject or location being discussed again minutes later
|
||||
- an administrative or status exchange that follows an event on the same channel
|
||||
If you are unsure whether two exchanges are one event or two, treat them as ONE.
|
||||
|
||||
Assign short status transmissions (10-4, en route, acknowledgements) with no clear scene context to the most recent scene before them in the list.
|
||||
|
||||
Always respond with the scenes array, even for a single scene.
|
||||
|
||||
|
||||
@@ -90,6 +90,11 @@ async def _recorrelate_orphan(call: dict) -> bool:
|
||||
return False
|
||||
|
||||
# All data needed for correlation was stored by the first-pass extraction.
|
||||
# embedding/severity are no longer read from the call doc inside
|
||||
# _build_context (server-26#80/#95) — the sweep re-links a whole call, not a
|
||||
# scene, so it passes the call doc's stored (primary-scene) values here. It
|
||||
# is link-only (create_if_new=False), so a borrowed severity cannot open a
|
||||
# new incident off this path.
|
||||
incident_id = await incident_correlator.correlate_call(
|
||||
call_id = call_id,
|
||||
node_id = call.get("node_id", ""),
|
||||
@@ -101,6 +106,8 @@ async def _recorrelate_orphan(call: dict) -> bool:
|
||||
location = call.get("location"),
|
||||
location_coords= call.get("location_coords"),
|
||||
cleared_units = call.get("cleared_units") or [],
|
||||
embedding = call.get("embedding"),
|
||||
severity = call.get("severity"),
|
||||
reference_time = started_at, # anchor window to when the call happened
|
||||
create_if_new = False, # never create — link-only
|
||||
)
|
||||
|
||||
@@ -114,6 +114,8 @@ async def _correlate_with_consensus(
|
||||
vehicles: Optional[list] = None,
|
||||
cleared_units: Optional[list] = None,
|
||||
reassignment: bool = False,
|
||||
embedding: Optional[list] = None,
|
||||
severity: Optional[str] = None,
|
||||
) -> Optional[str]:
|
||||
"""
|
||||
Consensus correlator: runs the rules engine and the cheap LLM in sequence.
|
||||
@@ -131,6 +133,7 @@ async def _correlate_with_consensus(
|
||||
tags=tags, incident_type=incident_type, location=location,
|
||||
location_coords=location_coords, units=units, vehicles=vehicles,
|
||||
cleared_units=cleared_units, reassignment=reassignment,
|
||||
embedding=embedding, severity=severity,
|
||||
)
|
||||
ctx = preview["ctx"]
|
||||
rules_decision = preview["decision"]
|
||||
@@ -221,6 +224,8 @@ async def _run_extraction_pipeline(
|
||||
vehicles=scene.get("vehicles"),
|
||||
cleared_units=scene.get("cleared_units"),
|
||||
reassignment=is_reassignment,
|
||||
embedding=scene.get("embedding"),
|
||||
severity=scene.get("severity"),
|
||||
)
|
||||
if incident_id and incident_id not in incident_ids:
|
||||
incident_ids.append(incident_id)
|
||||
@@ -336,6 +341,8 @@ async def _run_intelligence_pipeline(
|
||||
vehicles=scene.get("vehicles"),
|
||||
cleared_units=scene.get("cleared_units"),
|
||||
reassignment=is_reassignment,
|
||||
embedding=scene.get("embedding"),
|
||||
severity=scene.get("severity"),
|
||||
)
|
||||
if incident_id and incident_id not in incident_ids:
|
||||
incident_ids.append(incident_id)
|
||||
|
||||
@@ -254,6 +254,56 @@ async def test_a_scene_with_no_location_does_not_inherit_the_call_docs_pin():
|
||||
assert ctx["is_thin_call"] is True
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_a_scene_does_not_inherit_the_call_docs_embedding_or_severity():
|
||||
"""
|
||||
server-26#80 / #95. Same shape as the #87 coords leak above:
|
||||
intelligence.py writes only the PRIMARY scene's embedding and severity to
|
||||
calls/{id}. A non-primary scene being correlated must be judged on its own
|
||||
embedding (or none) and its own severity — not the call doc's — or a scene
|
||||
about a different event scores against the wrong incident on the embedding
|
||||
path and can inherit a minor/moderate/major rung it never had, clearing the
|
||||
creation gate on borrowed weight.
|
||||
"""
|
||||
with patch("app.internal.incident_correlator.fstore") as mock_fstore:
|
||||
mock_fstore.doc_get = AsyncMock(
|
||||
return_value={"embedding": [0.1] * 1536, "severity": "major"}
|
||||
)
|
||||
mock_fstore.collection_list = AsyncMock(return_value=[])
|
||||
ctx = await _build_context(
|
||||
call_id="call-scene-2", units=None, vehicles=None, cleared_units=None,
|
||||
location_coords=None, reference_time=NOW,
|
||||
system_id="sys-1", talkgroup_id=383, talkgroup_name=DISPATCH_TG,
|
||||
tags=[], incident_type="police", location=None,
|
||||
reassignment=False, create_if_new=True,
|
||||
embedding=None, severity=None,
|
||||
)
|
||||
assert ctx["call_embedding"] is None
|
||||
assert ctx["call_severity"] == "routine"
|
||||
assert ctx["is_thin_call"] is True
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_a_scene_is_judged_on_its_own_embedding_and_severity():
|
||||
"""The other half of #80/#95: the scene's own values are what land in ctx."""
|
||||
scene_vec = [0.9] * 1536
|
||||
with patch("app.internal.incident_correlator.fstore") as mock_fstore:
|
||||
mock_fstore.doc_get = AsyncMock(
|
||||
return_value={"embedding": [0.1] * 1536, "severity": "routine"}
|
||||
)
|
||||
mock_fstore.collection_list = AsyncMock(return_value=[])
|
||||
ctx = await _build_context(
|
||||
call_id="call-scene-2", units=None, vehicles=None, cleared_units=None,
|
||||
location_coords=None, reference_time=NOW,
|
||||
system_id="sys-1", talkgroup_id=383, talkgroup_name=DISPATCH_TG,
|
||||
tags=[], incident_type="police", location=None,
|
||||
reassignment=False, create_if_new=True,
|
||||
embedding=scene_vec, severity="major",
|
||||
)
|
||||
assert ctx["call_embedding"] == scene_vec
|
||||
assert ctx["call_severity"] == "major"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
async def test_a_bare_number_never_becomes_an_incident_location_or_title():
|
||||
inc = await _create(tags=["flames"], location="49", coords=None,
|
||||
|
||||
@@ -186,7 +186,7 @@ function RulesTab({ isAdmin }: { isAdmin: boolean }) {
|
||||
|
||||
export default function AlertsPage() {
|
||||
const { isAdmin } = useAuth();
|
||||
const { alerts, loading } = useAlerts();
|
||||
const { alerts, loading, error } = useAlerts();
|
||||
const [tab, setTab] = useState<"events" | "rules">("events");
|
||||
|
||||
async function handleAcknowledge(id: string) {
|
||||
@@ -226,6 +226,12 @@ export default function AlertsPage() {
|
||||
{tab === "events" && (
|
||||
loading ? (
|
||||
<p className="text-gray-500 text-sm font-mono">Loading…</p>
|
||||
) : error ? (
|
||||
<p className="text-red-400 text-sm font-mono">
|
||||
{/requires an index|PERMISSION_DENIED|insufficient permissions/i.test(error)
|
||||
? "Couldn't load alerts — a database index or security rule isn't deployed on the server yet (server-26 #13 / #51)."
|
||||
: `Couldn't load alerts: ${error}`}
|
||||
</p>
|
||||
) : alerts.length === 0 ? (
|
||||
<p className="text-gray-600 text-sm font-mono">No alerts triggered yet.</p>
|
||||
) : (
|
||||
|
||||
@@ -163,6 +163,20 @@ html:not(.dark) .border-indigo-800 { border-color: #a5b4fc !important; }
|
||||
animation: pulse-ring 1.8s ease-out infinite;
|
||||
}
|
||||
|
||||
/* ── Leaflet stacking fix ─────────────────────────────────────────────────────
|
||||
* Leaflet's internal panes (z-index 200–700) and its zoom / layers controls
|
||||
* (z-index 1000) otherwise paint above the sticky app Nav (z-40) and any modal
|
||||
* overlay — on Live this put the account dropdown *behind* the map. Pinning the
|
||||
* map container to its own low stacking context keeps Leaflet's internal layer
|
||||
* order intact while dropping the whole map (tiles + controls) below the app
|
||||
* chrome. The map's own overlay UI (legend, incident rail, clock, fit-all) sits
|
||||
* outside .leaflet-container, so it is unaffected and still renders on top.
|
||||
*/
|
||||
.leaflet-container {
|
||||
position: relative;
|
||||
z-index: 0;
|
||||
}
|
||||
|
||||
/* ── Form inputs ─────────────────────────────────────────────────────────── */
|
||||
html:not(.dark) input:not([type="submit"]):not([type="button"]):not([type="reset"]),
|
||||
html:not(.dark) select,
|
||||
|
||||
@@ -28,6 +28,17 @@ const FILTER_THRESHOLD: Record<SeverityFilter, number> = { all: -1, minor: 1, mo
|
||||
|
||||
type SortMode = "recent" | "severity";
|
||||
|
||||
// The Firestore client surfaces a missing composite index or an undeployed
|
||||
// ruleset as a raw multi-line string with a console URL in it — not something
|
||||
// to put in front of an operator. Collapse the known infra failures to a plain
|
||||
// line; pass anything else straight through so a real bug still shows.
|
||||
function friendlyIncidentsError(raw: string): string {
|
||||
if (/requires an index|PERMISSION_DENIED|Missing or insufficient permissions|failed-precondition/i.test(raw)) {
|
||||
return "Couldn't load incidents — the incidents database index isn't deployed on the server yet. This is a one-time backend deploy step (server-26 #13 / #51), not a problem with your data.";
|
||||
}
|
||||
return `Couldn't load incidents: ${raw}`;
|
||||
}
|
||||
|
||||
function fmtTime(iso: string) {
|
||||
try { return new Date(iso).toLocaleTimeString([], { hour: "2-digit", minute: "2-digit" }); } catch { return iso; }
|
||||
}
|
||||
@@ -286,7 +297,7 @@ export default function IncidentsPage() {
|
||||
recorded yet" over the top of it told the operator the radio was
|
||||
quiet when the page had simply failed to load — server-26#13. */}
|
||||
{filtered.length === 0 && error && (
|
||||
<ErrorBanner message={`Couldn't load incidents: ${error}`} />
|
||||
<ErrorBanner message={friendlyIncidentsError(error)} />
|
||||
)}
|
||||
|
||||
{filtered.length === 0 && !error && (
|
||||
|
||||
@@ -43,7 +43,7 @@ export default function OnboardingPage() {
|
||||
// Firebase custom claims only show up in a *freshly fetched* ID token —
|
||||
// getIdTokenResult(true) inside refreshClaims forces that fetch, then
|
||||
// AuthProvider's own state (orgId) updates and the effect above
|
||||
// redirects to /dashboard.
|
||||
// redirects to "/" (Live).
|
||||
await refreshClaims();
|
||||
} catch (err) {
|
||||
setError(err instanceof Error ? err.message : "Could not set up your organization. Try again.");
|
||||
|
||||
@@ -39,6 +39,30 @@ function EnrollmentTokensPanel() {
|
||||
const [label, setLabel] = useState("");
|
||||
const [minting, setMinting] = useState(false);
|
||||
const [justMinted, setJustMinted] = useState<string | null>(null);
|
||||
const [cmdCopied, setCmdCopied] = useState(false);
|
||||
const [tokenCopied, setTokenCopied] = useState(false);
|
||||
// The label the operator typed for the token that was just minted — used as
|
||||
// the node id in the install command below. Captured on mint because `label`
|
||||
// itself is cleared afterward.
|
||||
const [mintedLabel, setMintedLabel] = useState<string | null>(null);
|
||||
|
||||
// The paste-ready one-shot install command for a fresh Pi. The node id comes
|
||||
// from the label just entered (spaces → dashes; install.sh requires
|
||||
// [A-Za-z0-9_-]); if that yields nothing it falls back to a node-XXX
|
||||
// placeholder. The MQTT broker host is the documented mqtt.<domain> sibling
|
||||
// of the api host (install.sh header) — a DNS assumption the operator checks.
|
||||
const c2Url = (process.env.NEXT_PUBLIC_C2_URL ?? "https://api.example.net").replace(/\/$/, "");
|
||||
const mqttBroker = (() => {
|
||||
try { return `mqtt.${new URL(c2Url).hostname.replace(/^api\./, "")}`; }
|
||||
catch { return "mqtt.example.net"; }
|
||||
})();
|
||||
const nodeIdForCmd =
|
||||
(mintedLabel ?? "").trim().replace(/\s+/g, "-").replace(/[^A-Za-z0-9_-]/g, "") || "node-XXX";
|
||||
const installCmd = justMinted
|
||||
? `curl -fsSL https://git.vpn.cusano.net/logan/node-26/raw/tag/v1/install.sh \\
|
||||
| sudo bash -s -- --token ${justMinted} --node-id ${nodeIdForCmd} \\
|
||||
--c2-url ${c2Url} --mqtt-broker ${mqttBroker}`
|
||||
: "";
|
||||
|
||||
const load = useCallback(() => {
|
||||
c2api.listEnrollmentTokens()
|
||||
@@ -57,6 +81,7 @@ function EnrollmentTokensPanel() {
|
||||
try {
|
||||
const result = await c2api.mintEnrollmentToken(label.trim());
|
||||
setJustMinted(result.token);
|
||||
setMintedLabel(label.trim());
|
||||
setLabel("");
|
||||
load();
|
||||
} catch (err) {
|
||||
@@ -87,11 +112,43 @@ function EnrollmentTokensPanel() {
|
||||
<p className="text-xs text-indigo-200 font-mono mb-1">
|
||||
New token — copy it now, it won't be shown again:
|
||||
</p>
|
||||
<p className="text-xs text-indigo-100 font-mono break-all bg-gray-900 rounded px-2 py-1.5">{justMinted}</p>
|
||||
|
||||
<div className="flex items-start gap-2">
|
||||
<p className="flex-1 text-xs text-indigo-100 font-mono break-all bg-gray-900 rounded px-2 py-1.5">{justMinted}</p>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => navigator.clipboard?.writeText(justMinted).then(() => {
|
||||
setTokenCopied(true); setTimeout(() => setTokenCopied(false), 2000);
|
||||
})}
|
||||
className="text-xs text-indigo-300 hover:text-indigo-200 px-2 py-1.5 transition-colors shrink-0"
|
||||
>
|
||||
{tokenCopied ? "Copied" : "Copy"}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<p className="text-xs text-indigo-200 font-mono mt-3 mb-1">
|
||||
…or run this on a fresh Pi{" "}
|
||||
{nodeIdForCmd === "node-XXX"
|
||||
? <>(edit <span className="text-indigo-100">node-XXX</span> and check the broker host)</>
|
||||
: <>(check the broker host)</>}:
|
||||
</p>
|
||||
<div className="flex items-start gap-2">
|
||||
<pre className="flex-1 text-xs text-indigo-100 font-mono whitespace-pre-wrap break-all bg-gray-900 rounded px-2 py-1.5">{installCmd}</pre>
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => navigator.clipboard?.writeText(installCmd).then(() => {
|
||||
setCmdCopied(true); setTimeout(() => setCmdCopied(false), 2000);
|
||||
})}
|
||||
className="text-xs text-indigo-300 hover:text-indigo-200 px-2 py-1.5 transition-colors shrink-0"
|
||||
>
|
||||
{cmdCopied ? "Copied" : "Copy"}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setJustMinted(null)}
|
||||
className="text-xs text-indigo-300 hover:text-indigo-200 mt-2 transition-colors"
|
||||
onClick={() => { setJustMinted(null); setMintedLabel(null); }}
|
||||
className="text-xs text-indigo-300 hover:text-indigo-200 mt-3 transition-colors"
|
||||
>
|
||||
Dismiss
|
||||
</button>
|
||||
@@ -105,7 +162,7 @@ function EnrollmentTokensPanel() {
|
||||
<input
|
||||
value={label}
|
||||
onChange={(e) => setLabel(e.target.value)}
|
||||
placeholder="Label, e.g. 'node-003 field kit'"
|
||||
placeholder="Node ID, e.g. node-003"
|
||||
className="flex-1 min-w-[12rem] bg-gray-800 border border-gray-700 rounded-lg px-3 py-1.5 text-white text-sm focus:outline-none focus:border-indigo-500"
|
||||
/>
|
||||
<Button type="submit" size="sm" disabled={minting || !label.trim()}>
|
||||
|
||||
@@ -24,6 +24,17 @@ L.Icon.Default.mergeOptions({
|
||||
shadowUrl: "https://unpkg.com/leaflet@1.9.4/dist/images/marker-shadow.png",
|
||||
});
|
||||
|
||||
// ── Basemap tiles ─────────────────────────────────────────────────────────────
|
||||
// Default is CARTO's keyless dark raster basemap — no token, fits the dark UI.
|
||||
// Overridable via NEXT_PUBLIC_MAP_TILE_URL so a keyed style (a CARTO account
|
||||
// style, MapTiler, Mapbox, …) can be dropped in for prod without a code change.
|
||||
// Whatever is supplied must use Leaflet's {s}/{z}/{x}/{y}{r} placeholder scheme.
|
||||
const MAP_TILE_URL =
|
||||
process.env.NEXT_PUBLIC_MAP_TILE_URL ||
|
||||
"https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png";
|
||||
const MAP_TILE_ATTRIBUTION =
|
||||
'© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors © <a href="https://carto.com/">CARTO</a>';
|
||||
|
||||
// ── Colour ────────────────────────────────────────────────────────────────────
|
||||
// Severity is the only hue on this map — see UI_REDESIGN.md §2.3. Incident
|
||||
// type is carried by the glyph knocked out of the pin, never by colour, and
|
||||
@@ -540,14 +551,14 @@ export default function MapView({ nodes, activeCalls, incidents = [], calls = []
|
||||
{/* Base layers */}
|
||||
<LayersControl.BaseLayer checked name="Dark">
|
||||
<TileLayer
|
||||
url="https://{s}.basemaps.cartocdn.com/dark_all/{z}/{x}/{y}{r}.png"
|
||||
attribution='© <a href="https://carto.com/">CARTO</a>'
|
||||
url={MAP_TILE_URL}
|
||||
attribution={MAP_TILE_ATTRIBUTION}
|
||||
/>
|
||||
</LayersControl.BaseLayer>
|
||||
<LayersControl.BaseLayer name="Light">
|
||||
<TileLayer
|
||||
url="https://{s}.basemaps.cartocdn.com/light_all/{z}/{x}/{y}{r}.png"
|
||||
attribution='© <a href="https://carto.com/">CARTO</a>'
|
||||
attribution={MAP_TILE_ATTRIBUTION}
|
||||
/>
|
||||
</LayersControl.BaseLayer>
|
||||
<LayersControl.BaseLayer name="Streets">
|
||||
|
||||
Reference in New Issue
Block a user