Gebäude-Query hinzugefügt

This commit is contained in:
PxlLoewe
2025-07-04 11:31:02 -07:00
parent 1c161b05ee
commit 8171105409
2 changed files with 9 additions and 45 deletions

View File

@@ -59,15 +59,15 @@ export const ContextMenu = () => {
const addOSMobjects = async (ignorePreviosSelected?: boolean) => {
const res = await fetch(
`https://overpass-api.de/api/interpreter?data=${encodeURIComponent(`
[out:json];
(
way["leisure"~"pitch|sports_centre"](around:2000, ${contextMenu.lat}, ${contextMenu.lng});
relation["leisure"~"pitch|sports_centre"](around:2000, ${contextMenu.lat}, ${contextMenu.lng});
);
out body;
>;
out skel qt;
`)}`,
[out:json];
(
way["building"](around:100, ${contextMenu.lat}, ${contextMenu.lng});
relation["building"](around:100, ${contextMenu.lat}, ${contextMenu.lng});
);
out body;
>;
out skel qt;
`)}`,
);
const data = await res.json();