From f7c8699f4f1a937fdb72b03258a4005fa1aef18e Mon Sep 17 00:00:00 2001 From: Sumit Dahal Date: Fri, 17 Jul 2026 11:09:18 +0545 Subject: [PATCH] fix: fetch sandbox editor map data in z18 tiles to avoid OSM API node limit --- frontend/src/components/sandboxEditor.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frontend/src/components/sandboxEditor.js b/frontend/src/components/sandboxEditor.js index b971a2628b..5799e4233f 100644 --- a/frontend/src/components/sandboxEditor.js +++ b/frontend/src/components/sandboxEditor.js @@ -161,6 +161,12 @@ export default function SandboxEditor({ access_token: tokenData.access_token, }); + // Fetch map data in z18 tiles (1/16th the area of iD's default z16) so each + // /api/0.6/map.json request stays under the OSM API's 50k-node limit in + // densely mapped sandbox areas, where a single z16 tile would otherwise + // return a 400 "You requested too many nodes". + iDContext.connection().tileZoom(18); + const thereAreChanges = (changes) => changes.modified.length || changes.created.length || changes.deleted.length;