forked from MapComplete/MapComplete
Add capability to load tiled geojsons, eventually as overpass-cache
This commit is contained in:
parent
475cdae19f
commit
2da52501a3
16 changed files with 520 additions and 76 deletions
|
@ -20,9 +20,15 @@ export default class ExtractRelations {
|
|||
console.log("Assigned memberships: ", memberships)
|
||||
State.state.knownRelations.setData(memberships)
|
||||
}
|
||||
|
||||
private static GetRelationElements(overpassJson: any): Relation[] {
|
||||
const relations = overpassJson.elements.filter(element => element.type === "relation")
|
||||
|
||||
/**
|
||||
* Gets an overview of the relations - except for multipolygons. We don't care about those
|
||||
* @param overpassJson
|
||||
* @constructor
|
||||
*/
|
||||
public static GetRelationElements(overpassJson: any): Relation[] {
|
||||
const relations = overpassJson.elements
|
||||
.filter(element => element.type === "relation" && element.tags.type !== "multipolygon")
|
||||
for (const relation of relations) {
|
||||
relation.properties = relation.tags
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ export class Overpass {
|
|||
}).fail(onFail)
|
||||
}
|
||||
|
||||
private buildQuery(bbox: string): string {
|
||||
buildQuery(bbox: string): string {
|
||||
const filters = this._filter.asOverpass()
|
||||
let filter = ""
|
||||
for (const filterOr of filters) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue