[openstreetmap/openstreetmap-website] CRUD interface for moderation zones (PR #7148)

Pablo Brasero notifications at github.com
Thu Jul 9 11:19:46 UTC 2026


@pablobm commented on this pull request.



> +      }
+
+      const feature = draw.getSnapshotFeature(id);
+      if (!feature) {
+        throw new Error(`Could not find feature with id ${id}`);
+      }
+
+      writeFormField(COORDINATES_FIELD_ID, feature);
+    };
+  }
+
+  function loadData(map, draw) {
+    const feature = readFormField(COORDINATES_FIELD_ID);
+    if (feature) {
+      startTerraDrawForEdit(draw, feature);
+      map.fitBounds(featureToBox(feature), { radius: 100 });

Thank you, that can be useful. I gave it a go and I'm not sure that I'm liking the code much better. Have a look and see what you think: https://github.com/pablobm/openstreetmap-website/compare/modzones-crud...pablobm:openstreetmap-website:modzones-crud-geojsonsource

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/7148#discussion_r3551175983
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/pull/7148/review/4662513243 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20260709/7d029fea/attachment.htm>


More information about the rails-dev mailing list