forked from MapComplete/MapComplete
Some refactoring
This commit is contained in:
parent
85af8a20b0
commit
a03313fb3d
9 changed files with 18 additions and 20 deletions
|
@ -213,7 +213,7 @@ This is a priviliged meta_layer which exports _every_ point in OSM. This only wo
|
|||
|
||||
|
||||
|
||||
This layer shows notes on OpenStreetMap.
|
||||
This layer shows notes on OpenStreetMap. Having this layer in your theme will trigger the 'add new note' functionality in the 'addNewPoint'-popup (or if your theme has no presets, it'll enable adding notes)
|
||||
|
||||
[Go to the source code](../assets/layers/note/note.json)
|
||||
|
||||
|
|
|
@ -489,7 +489,7 @@ id_of_object_to_apply_this_one | _undefined_ | If specified, applies the the tag
|
|||
|
||||
### close_note
|
||||
|
||||
Button to close a note - eventually with a prefixed text
|
||||
Button to close a note. A predifined text can be defined to close the note with. If the note is already closed, will show a small text.
|
||||
|
||||
name | default | description
|
||||
------ | --------- | -------------
|
||||
|
|
|
@ -10,7 +10,7 @@ import {UIEventSource} from "./UIEventSource";
|
|||
import {LocalStorageSource} from "./Web/LocalStorageSource";
|
||||
import LZString from "lz-string";
|
||||
import * as personal from "../assets/themes/personal/personal.json";
|
||||
import {FixLegacyTheme, PrepareTheme} from "../Models/ThemeConfig/LegacyJsonConvert";
|
||||
import {FixLegacyTheme, PrepareTheme} from "../Models/ThemeConfig/Conversion/LegacyJsonConvert";
|
||||
import {LayerConfigJson} from "../Models/ThemeConfig/Json/LayerConfigJson";
|
||||
import SharedTagRenderings from "../Customizations/SharedTagRenderings";
|
||||
import * as known_layers from "../assets/generated/known_layers.json"
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
import * as OsmToGeoJson from "osmtogeojson";
|
||||
import {TagsFilter} from "../Tags/TagsFilter";
|
||||
import RelationsTracker from "./RelationsTracker";
|
||||
import {Utils} from "../../Utils";
|
||||
import {UIEventSource} from "../UIEventSource";
|
||||
import {BBox} from "../BBox";
|
||||
import osmtogeojson from "osmtogeojson";
|
||||
|
||||
/**
|
||||
* Interfaces overpass to get all the latest data
|
||||
|
@ -52,8 +52,7 @@ export class Overpass {
|
|||
}
|
||||
|
||||
self._relationTracker.RegisterRelations(json)
|
||||
// @ts-ignore
|
||||
const geojson = OsmToGeoJson.default(json);
|
||||
const geojson = osmtogeojson(json);
|
||||
const osmTime = new Date(json.osm3s.timestamp_osm_base);
|
||||
return [geojson, osmTime];
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
import LineRenderingConfigJson from "./Json/LineRenderingConfigJson";
|
||||
import LayerConfig from "./LayerConfig";
|
||||
import Constants from "../Constants";
|
||||
import {LayoutConfigJson} from "./Json/LayoutConfigJson";
|
||||
import {LayerConfigJson} from "./Json/LayerConfigJson";
|
||||
import DependencyCalculator from "./DependencyCalculator";
|
||||
import {TagRenderingConfigJson} from "./Json/TagRenderingConfigJson";
|
||||
import {Utils} from "../../Utils";
|
||||
import LayoutConfig from "./LayoutConfig";
|
||||
import {Translation} from "../../UI/i18n/Translation";
|
||||
import {LayoutConfigJson} from "../Json/LayoutConfigJson";
|
||||
import DependencyCalculator from "../DependencyCalculator";
|
||||
import LayerConfig from "../LayerConfig";
|
||||
import {Translation} from "../../../UI/i18n/Translation";
|
||||
import LayoutConfig from "../LayoutConfig";
|
||||
import {Utils} from "../../../Utils";
|
||||
import {TagRenderingConfigJson} from "../Json/TagRenderingConfigJson";
|
||||
import LineRenderingConfigJson from "../Json/LineRenderingConfigJson";
|
||||
import {LayerConfigJson} from "../Json/LayerConfigJson";
|
||||
import Constants from "../../Constants";
|
||||
|
||||
export interface DesugaringContext {
|
||||
tagRenderings: Map<string, TagRenderingConfigJson>
|
|
@ -9,7 +9,7 @@ import {
|
|||
PrepareLayer, PrepareTheme,
|
||||
ValidateLayer,
|
||||
ValidateThemeAndLayers
|
||||
} from "../Models/ThemeConfig/LegacyJsonConvert";
|
||||
} from "../Models/ThemeConfig/Conversion/LegacyJsonConvert";
|
||||
import {Translation} from "../UI/i18n/Translation";
|
||||
import {TagRenderingConfigJson} from "../Models/ThemeConfig/Json/TagRenderingConfigJson";
|
||||
import * as questions from "../assets/tagRenderings/questions.json";
|
||||
|
|
Binary file not shown.
|
@ -1,5 +1,5 @@
|
|||
import T from "./TestHelper";
|
||||
import {FixLegacyTheme} from "../Models/ThemeConfig/LegacyJsonConvert";
|
||||
import {FixLegacyTheme} from "../Models/ThemeConfig/Conversion/LegacyJsonConvert";
|
||||
import LayoutConfig from "../Models/ThemeConfig/LayoutConfig";
|
||||
import {LayerConfigJson} from "../Models/ThemeConfig/Json/LayerConfigJson";
|
||||
import {TagRenderingConfigJson} from "../Models/ThemeConfig/Json/TagRenderingConfigJson";
|
||||
|
|
|
@ -3,10 +3,9 @@ import * as assert from "assert";
|
|||
import {LayoutConfigJson} from "../Models/ThemeConfig/Json/LayoutConfigJson";
|
||||
import LayoutConfig from "../Models/ThemeConfig/LayoutConfig";
|
||||
import * as bookcaseLayer from "../assets/generated/layers/public_bookcase.json"
|
||||
import {PrepareLayer, PrepareTheme} from "../Models/ThemeConfig/LegacyJsonConvert";
|
||||
import {PrepareTheme} from "../Models/ThemeConfig/Conversion/LegacyJsonConvert";
|
||||
import {TagRenderingConfigJson} from "../Models/ThemeConfig/Json/TagRenderingConfigJson";
|
||||
import {LayerConfigJson} from "../Models/ThemeConfig/Json/LayerConfigJson";
|
||||
import LayerConfig from "../Models/ThemeConfig/LayerConfig";
|
||||
import Constants from "../Models/Constants";
|
||||
|
||||
export default class ThemeSpec extends T {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue