Fix: fix #2309
This commit is contained in:
parent
b47d0f8c6a
commit
fe2a6ca065
2 changed files with 10 additions and 6 deletions
|
@ -10,12 +10,13 @@ import {
|
|||
MultiPolygon,
|
||||
Point,
|
||||
Polygon,
|
||||
Position,
|
||||
Position
|
||||
} from "geojson"
|
||||
import { Tiles } from "../Models/TileRange"
|
||||
import { Utils } from "../Utils"
|
||||
import { NearestPointOnLine } from "@turf/nearest-point-on-line"
|
||||
;("use strict")
|
||||
|
||||
("use strict")
|
||||
|
||||
export class GeoOperations {
|
||||
private static readonly _earthRadius = 6378137
|
||||
|
@ -365,6 +366,7 @@ export class GeoOperations {
|
|||
): Feature<LineString | MultiLineString> {
|
||||
if (way.geometry.type === "Polygon") {
|
||||
return <Feature<LineString>>{
|
||||
type: "Feature",
|
||||
geometry: {
|
||||
type: "LineString",
|
||||
coordinates: way.geometry.coordinates[0],
|
||||
|
@ -374,6 +376,7 @@ export class GeoOperations {
|
|||
}
|
||||
if (way.geometry.type === "MultiPolygon") {
|
||||
return <Feature<MultiLineString>>{
|
||||
type: "Feature",
|
||||
geometry: {
|
||||
type: "MultiLineString",
|
||||
coordinates: way.geometry.coordinates[0],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue