forked from MapComplete/MapComplete
Refactoring: fix rendering of new roads, generated by a split
This commit is contained in:
parent
840990c08b
commit
8eb2c68f79
34 changed files with 443 additions and 333 deletions
|
@ -294,6 +294,10 @@ export class GeoOperations {
|
|||
* Mostly used as helper for 'nearestPoint'
|
||||
* @param way
|
||||
*/
|
||||
public static forceLineString(way: Feature<LineString | Polygon>): Feature<LineString>
|
||||
public static forceLineString(
|
||||
way: Feature<MultiLineString | MultiPolygon>
|
||||
): Feature<MultiLineString>
|
||||
public static forceLineString(
|
||||
way: Feature<LineString | MultiLineString | Polygon | MultiPolygon>
|
||||
): Feature<LineString | MultiLineString> {
|
||||
|
@ -972,4 +976,9 @@ export class GeoOperations {
|
|||
},
|
||||
}
|
||||
}
|
||||
|
||||
static centerpointCoordinatesObj(geojson: Feature) {
|
||||
const [lon, lat] = GeoOperations.centerpointCoordinates(geojson)
|
||||
return { lon, lat }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue