style(project): format delivery geojson parser
This commit is contained in:
@@ -82,7 +82,9 @@ export function parsePolygonGeoJson(raw: string) {
|
|||||||
|
|
||||||
const outerRing = coordinates[0];
|
const outerRing = coordinates[0];
|
||||||
if (!Array.isArray(outerRing)) continue;
|
if (!Array.isArray(outerRing)) continue;
|
||||||
const points = outerRing.filter((point) => isLngLatTuple(point)) as LngLatTuple[];
|
const points = outerRing.filter((point) =>
|
||||||
|
isLngLatTuple(point),
|
||||||
|
) as LngLatTuple[];
|
||||||
if (points.length >= 4) {
|
if (points.length >= 4) {
|
||||||
polygons.push(points.map(([lng, lat]) => [lng, lat]));
|
polygons.push(points.map(([lng, lat]) => [lng, lat]));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user