Merge master

This commit is contained in:
Pieter Vander Vennet 2022-03-08 01:06:18 +01:00
commit bf2e6343f4
16 changed files with 49 additions and 31 deletions

View file

@ -347,13 +347,10 @@ export class ChangesetHandler {
const self = this; const self = this;
return new Promise<number>(function (resolve, reject) { return new Promise<number>(function (resolve, reject) {
let path = window.location.pathname;
path = path.substr(1, path.lastIndexOf("/"));
const metadata = [ const metadata = [
["created_by", `MapComplete ${Constants.vNumber}`], ["created_by", `MapComplete ${Constants.vNumber}`],
["locale", Locale.language.data], ["locale", Locale.language.data],
["host", window.location.host], ["host", `${window.location.origin}${window.location.pathname}`],
["path", path],
["source", self.changes.state["currentUserLocation"]?.features?.data?.length > 0 ? "survey" : undefined], ["source", self.changes.state["currentUserLocation"]?.features?.data?.length > 0 ? "survey" : undefined],
["imagery", self.changes.state["backgroundLayer"]?.data?.id], ["imagery", self.changes.state["backgroundLayer"]?.data?.id],
...changesetTags.map(cstag => [cstag.key, cstag.value]) ...changesetTags.map(cstag => [cstag.key, cstag.value])
@ -408,4 +405,4 @@ export class ChangesetHandler {
} }
} }

View file

@ -140,12 +140,12 @@ export default class FeaturePipelineState extends MapState {
} }
public CreatePopup(tags:any , layer: LayerConfig): ScrollableFullScreen{ public CreatePopup(tags:UIEventSource<any> , layer: LayerConfig): ScrollableFullScreen{
if(this.popups.has(tags.id)){ if(this.popups.has(tags.data.id)){
// return this.popups.get(tags.id) return this.popups.get(tags.data.id)
} }
const popup = new FeatureInfoBox(tags, layer, this) const popup = new FeatureInfoBox(tags, layer, this)
this.popups.set(tags.id, popup) this.popups.set(tags.data.id, popup)
return popup return popup
} }

View file

@ -141,7 +141,6 @@ export default class DefaultGUI {
leafletMap: state.leafletMap, leafletMap: state.leafletMap,
layerToShow: new LayerConfig(home_location_json, "all_known_layers", true), layerToShow: new LayerConfig(home_location_json, "all_known_layers", true),
features: state.homeLocation, features: state.homeLocation,
popup: undefined,
state state
}) })

View file

@ -95,7 +95,6 @@ export default class ExportPDF {
features: tile, features: tile,
leafletMap: minimap.leafletMap, leafletMap: minimap.leafletMap,
layerToShow: tile.layer.layerDef, layerToShow: tile.layer.layerDef,
popup: undefined,
doShowLayer: tile.layer.isDisplayed, doShowLayer: tile.layer.isDisplayed,
state: undefined state: undefined
} }

View file

@ -27,7 +27,7 @@ import CheckBoxes from "../Input/Checkboxes";
class PreviewPanel extends ScrollableFullScreen { class PreviewPanel extends ScrollableFullScreen {
constructor(tags, layer) { constructor(tags: UIEventSource<any>, layer) {
super( super(
_ => new FixedUiElement("Element to import"), _ => new FixedUiElement("Element to import"),
_ => new Combine(["The tags are:", _ => new Combine(["The tags are:",

View file

@ -189,7 +189,6 @@ export default class LocationInput extends InputElement<Loc> implements MinimapO
console.log("Constructing the snap-to layer", this._snapTo) console.log("Constructing the snap-to layer", this._snapTo)
new ShowDataMultiLayer({ new ShowDataMultiLayer({
features: new StaticFeatureSource(this._snapTo, true), features: new StaticFeatureSource(this._snapTo, true),
popup: undefined,
zoomToFeatures: false, zoomToFeatures: false,
leafletMap: this.map.leafletMap, leafletMap: this.map.leafletMap,
layers: State.state.filteredLayers layers: State.state.filteredLayers
@ -204,7 +203,6 @@ export default class LocationInput extends InputElement<Loc> implements MinimapO
}) })
new ShowDataLayer({ new ShowDataLayer({
features: new StaticFeatureSource(matchPoint, true), features: new StaticFeatureSource(matchPoint, true),
popup: undefined,
zoomToFeatures: false, zoomToFeatures: false,
leafletMap: this.map.leafletMap, leafletMap: this.map.leafletMap,
layerToShow: this._matching_layer, layerToShow: this._matching_layer,

View file

@ -96,7 +96,6 @@ class ApplyButton extends UIElement {
new ShowDataLayer({ new ShowDataLayer({
leafletMap: previewMap.leafletMap, leafletMap: previewMap.leafletMap,
popup: undefined,
zoomToFeatures: true, zoomToFeatures: true,
features: new StaticFeatureSource(features, false), features: new StaticFeatureSource(features, false),
state: this.state, state: this.state,

View file

@ -237,7 +237,6 @@ ${Utils.special_visualizations_importRequirementDocs}
// SHow all relevant data - including (eventually) the way of which the geometry will be replaced // SHow all relevant data - including (eventually) the way of which the geometry will be replaced
new ShowDataMultiLayer({ new ShowDataMultiLayer({
leafletMap: confirmationMap.leafletMap, leafletMap: confirmationMap.leafletMap,
popup: undefined,
zoomToFeatures: true, zoomToFeatures: true,
features: new StaticFeatureSource([feature], false), features: new StaticFeatureSource([feature], false),
state: state, state: state,
@ -248,7 +247,6 @@ ${Utils.special_visualizations_importRequirementDocs}
action.getPreview().then(changePreview => { action.getPreview().then(changePreview => {
new ShowDataLayer({ new ShowDataLayer({
leafletMap: confirmationMap.leafletMap, leafletMap: confirmationMap.leafletMap,
popup: undefined,
zoomToFeatures: false, zoomToFeatures: false,
features: changePreview, features: changePreview,
state, state,

View file

@ -81,7 +81,6 @@ export default class SplitRoadWizard extends Toggle {
features: new StaticFeatureSource([roadElement], false), features: new StaticFeatureSource([roadElement], false),
layers: state.filteredLayers, layers: state.filteredLayers,
leafletMap: miniMap.leafletMap, leafletMap: miniMap.leafletMap,
popup: undefined,
zoomToFeatures: true, zoomToFeatures: true,
state state
}) })
@ -90,7 +89,6 @@ export default class SplitRoadWizard extends Toggle {
features: new StaticFeatureSource(splitPoints, true), features: new StaticFeatureSource(splitPoints, true),
leafletMap: miniMap.leafletMap, leafletMap: miniMap.leafletMap,
zoomToFeatures: false, zoomToFeatures: false,
popup: undefined,
layerToShow: SplitRoadWizard.splitLayerStyling, layerToShow: SplitRoadWizard.splitLayerStyling,
state state
}) })

View file

@ -44,7 +44,7 @@ export default class ShowDataLayer {
*/ */
private readonly leafletLayersPerId = new Map<string, { feature: any, leafletlayer: any }>() private readonly leafletLayersPerId = new Map<string, { feature: any, leafletlayer: any }>()
private readonly showDataLayerid: number; private readonly showDataLayerid: number;
private readonly createPopup: (tags: any, layer: LayerConfig) => ScrollableFullScreen private readonly createPopup: (tags: UIEventSource<any>, layer: LayerConfig) => ScrollableFullScreen
/** /**
* Creates a datalayer. * Creates a datalayer.

View file

@ -8,7 +8,7 @@ export interface ShowDataLayerOptions {
features: FeatureSource, features: FeatureSource,
selectedElement?: UIEventSource<any>, selectedElement?: UIEventSource<any>,
leafletMap: UIEventSource<L.Map>, leafletMap: UIEventSource<L.Map>,
popup?: undefined | ((tags: any, layer: LayerConfig) => ScrollableFullScreen), popup?: undefined | ((tags: UIEventSource<any>, layer: LayerConfig) => ScrollableFullScreen),
zoomToFeatures?: false | boolean, zoomToFeatures?: false | boolean,
doShowLayer?: UIEventSource<boolean>, doShowLayer?: UIEventSource<boolean>,
state?: { allElements?: ElementStorage } state?: { allElements?: ElementStorage }

View file

@ -56,7 +56,6 @@ export default class ShowTileInfo {
leafletMap: options.leafletMap, leafletMap: options.leafletMap,
doShowLayer: options.doShowLayer, doShowLayer: options.doShowLayer,
state: State.state, state: State.state,
popup: undefined
}) })
} }

View file

@ -268,7 +268,6 @@ export default class SpecialVisualizations {
new ShowDataMultiLayer( new ShowDataMultiLayer(
{ {
leafletMap: minimap["leafletMap"], leafletMap: minimap["leafletMap"],
popup: undefined,
zoomToFeatures: true, zoomToFeatures: true,
layers: state.filteredLayers, layers: state.filteredLayers,
features: new StaticFeatureSource(featuresToShow, true) features: new StaticFeatureSource(featuresToShow, true)
@ -314,7 +313,6 @@ export default class SpecialVisualizations {
new ShowDataLayer( new ShowDataLayer(
{ {
leafletMap: minimap["leafletMap"], leafletMap: minimap["leafletMap"],
popup: undefined,
zoomToFeatures: true, zoomToFeatures: true,
layerToShow: new LayerConfig(left_right_style_json, "all_known_layers", true), layerToShow: new LayerConfig(left_right_style_json, "all_known_layers", true),
features: new StaticFeatureSource([copy], false), features: new StaticFeatureSource([copy], false),

View file

@ -1,10 +1,19 @@
{ {
"centerMessage": { "centerMessage": {
"loadingData": "Memuat data…", "loadingData": "Memuat data…",
"ready": "Selesai!" "ready": "Selesai!",
"retrying": "Memuat data gagal. Mencoba lagi dalam {count} detik…",
"zoomIn": "Perbesar untuk melihat atau mengedit data"
}, },
"delete": { "delete": {
"cancel": "Batal" "cancel": "Batal",
"cannotBeDeleted": "Fitur ini tidak dapat dihapus",
"explanations": {
"selectReason": "Silahkan pilih mengapa fitur ini harus dihapus"
},
"isntAPoint": "Hanya titik yang dapat dihapus, fitur yang dipilih adalah jalan, area, atau relasi.",
"delete": "Hapus",
"isDeleted": "Fitur ini telah dihapus"
}, },
"favourite": { "favourite": {
"reload": "Muat ulang data" "reload": "Muat ulang data"
@ -106,4 +115,4 @@
"split": { "split": {
"cancel": "Batal" "cancel": "Batal"
} }
} }

View file

@ -13,8 +13,12 @@
}, },
"2": { "2": {
"then": "Anjing diperbolehkan, tetapi mereka harus diikat" "then": "Anjing diperbolehkan, tetapi mereka harus diikat"
},
"3": {
"then": "Anjing diperbolehkan dan dapat berkeliaran dengan bebas"
} }
} },
"question": "Apakah anjing diperbolehkan dalam bisnis ini?"
}, },
"email": { "email": {
"question": "Apa alamat surel dari {title()}?" "question": "Apa alamat surel dari {title()}?"
@ -23,6 +27,18 @@
"mappings": { "mappings": {
"3": { "3": {
"then": "Berlokasi di lantai pertama" "then": "Berlokasi di lantai pertama"
},
"1": {
"then": "Terletak di lantai dasar"
},
"0": {
"then": "Terletak di bawah tanah"
},
"2": {
"then": "Terletak di lantai dasar"
},
"4": {
"then": "Terletak di lantai basement pertama"
} }
}, },
"question": "Pada tingkat apa fitur ini diletakkan?" "question": "Pada tingkat apa fitur ini diletakkan?"
@ -45,4 +61,4 @@
"question": "Apa situs web dari {title()}?" "question": "Apa situs web dari {title()}?"
} }
} }
} }

View file

@ -8,7 +8,8 @@
"title": "Buka Peta Karya Seni" "title": "Buka Peta Karya Seni"
}, },
"benches": { "benches": {
"title": "Bangku" "title": "Bangku",
"shortDescription": "Peta bangku"
}, },
"cafes_and_pubs": { "cafes_and_pubs": {
"title": "Kafe dan pub" "title": "Kafe dan pub"
@ -282,5 +283,12 @@
}, },
"waste_basket": { "waste_basket": {
"title": "Keranjang Sampah" "title": "Keranjang Sampah"
},
"bicyclelib": {
"title": "Perpustakaan sepeda"
},
"bicycle_rental": {
"title": "Sewa sepeda",
"shortDescription": "Peta dengan stasiun persewaan sepeda dan toko penyewaan sepeda"
} }
} }