forked from MapComplete/MapComplete
Housekeeping...
This commit is contained in:
parent
9d135150a4
commit
99ba26e3a2
53 changed files with 638 additions and 321 deletions
|
@ -3,11 +3,11 @@
|
|||
*/
|
||||
import { UIEventSource } from "./UIEventSource"
|
||||
import { GeoJSONObject } from "@turf/turf"
|
||||
import {Feature, Geometry, Point} from "geojson";
|
||||
import {OsmTags} from "../Models/OsmFeature";
|
||||
import { Feature, Geometry, Point } from "geojson"
|
||||
import { OsmTags } from "../Models/OsmFeature"
|
||||
|
||||
export class ElementStorage {
|
||||
public ContainingFeatures = new Map<string, Feature<Geometry, OsmTags >>()
|
||||
public ContainingFeatures = new Map<string, Feature<Geometry, OsmTags>>()
|
||||
private _elements = new Map<string, UIEventSource<any>>()
|
||||
|
||||
constructor() {}
|
||||
|
|
|
@ -10,7 +10,7 @@ import {
|
|||
MultiPolygon,
|
||||
Polygon,
|
||||
} from "@turf/turf"
|
||||
import {GeoJSON, LineString, Point} from "geojson"
|
||||
import { GeoJSON, LineString, Point } from "geojson"
|
||||
import togpx from "togpx"
|
||||
import Constants from "../Models/Constants"
|
||||
|
||||
|
@ -38,7 +38,7 @@ export class GeoOperations {
|
|||
* @param feature
|
||||
*/
|
||||
static centerpointCoordinates(feature: AllGeoJSON | GeoJSON): [number, number] {
|
||||
return <[number, number]>turf.center(<any> feature).geometry.coordinates
|
||||
return <[number, number]>turf.center(<any>feature).geometry.coordinates
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue