Housekeeping...

This commit is contained in:
Pieter Vander Vennet 2022-11-08 14:37:31 +01:00
parent 9d135150a4
commit 99ba26e3a2
53 changed files with 638 additions and 321 deletions

View file

@ -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() {}

View file

@ -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
}
/**