mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
drop the unused Nominatim outline center
The server built center from Number(row.lat/lon), which reads a missing value as 0,0, and the client never forwarded it, so the rung's second ordering point was always undefined. Order parts by the request point only.
This commit is contained in:
1 parent
3def533d8c
commit
a71443a0ef
2 files changed
-4
No files matched your search
@@ -547,8 +547,6 @@ export function selectOutlineResult(rows, { kind, query }) {
|
|||||||
skipped.push(`${label}: too large`);
|
skipped.push(`${label}: too large`);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
const lat = Number(row.lat);
|
|
||||||
const lon = Number(row.lon);
|
|
||||||
return {
|
return {
|
||||||
outline: {
|
outline: {
|
||||||
name: String(row.name || '').slice(0, 160) || null,
|
name: String(row.name || '').slice(0, 160) || null,
|
||||||
@@ -559,7 +557,6 @@ export function selectOutlineResult(rows, { kind, query }) {
|
|||||||
row.osm_type && row.osm_id != null
|
row.osm_type && row.osm_id != null
|
||||||
? `${row.osm_type}/${row.osm_id}`
|
? `${row.osm_type}/${row.osm_id}`
|
||||||
: null,
|
: null,
|
||||||
center: finiteLat(lat) && finiteLon(lon) ? { lat, lon } : null,
|
|
||||||
polygons,
|
polygons,
|
||||||
},
|
},
|
||||||
skipped,
|
skipped,
|
||||||
|
|||||||
@@ -262,7 +262,6 @@ export function createOutlineRungs({
|
|||||||
if (!containsAnchor(outline.polygons, ctx.lat, ctx.lon)) return null;
|
if (!containsAnchor(outline.polygons, ctx.lat, ctx.lon)) return null;
|
||||||
const polygons = anchorPartFirst(outline.polygons, [
|
const polygons = anchorPartFirst(outline.polygons, [
|
||||||
{ lat: ctx.lat, lon: ctx.lon },
|
{ lat: ctx.lat, lon: ctx.lon },
|
||||||
outline.center || {},
|
|
||||||
]);
|
]);
|
||||||
const ring = polygons[0][0];
|
const ring = polygons[0][0];
|
||||||
// A grounds ask answered by a building-sized polygon found the named
|
// A grounds ask answered by a building-sized polygon found the named
|
||||||
|
|||||||
Reference in new issue
Block a user