Fix optimalization, some cleanup
This commit is contained in:
parent
8c9e2a36b3
commit
d40d77d86f
13 changed files with 8 additions and 20 deletions
|
@ -140,12 +140,12 @@ export default class FeaturePipelineState extends MapState {
|
|||
|
||||
}
|
||||
|
||||
public CreatePopup(tags:any , layer: LayerConfig): ScrollableFullScreen{
|
||||
if(this.popups.has(tags.id)){
|
||||
// return this.popups.get(tags.id)
|
||||
public CreatePopup(tags:UIEventSource<any> , layer: LayerConfig): ScrollableFullScreen{
|
||||
if(this.popups.has(tags.data.id)){
|
||||
return this.popups.get(tags.data.id)
|
||||
}
|
||||
const popup = new FeatureInfoBox(tags, layer, this)
|
||||
this.popups.set(tags.id, popup)
|
||||
this.popups.set(tags.data.id, popup)
|
||||
return popup
|
||||
}
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@ import {Utils} from "../Utils";
|
|||
|
||||
export default class Constants {
|
||||
|
||||
public static vNumber = "0.16.4";
|
||||
public static vNumber = "0.16.5";
|
||||
|
||||
public static ImgurApiKey = '7070e7167f0a25a'
|
||||
public static readonly mapillary_client_token_v4 = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85"
|
||||
|
|
|
@ -141,7 +141,6 @@ export default class DefaultGUI {
|
|||
leafletMap: state.leafletMap,
|
||||
layerToShow: new LayerConfig(home_location_json, "all_known_layers", true),
|
||||
features: state.homeLocation,
|
||||
popup: undefined,
|
||||
state
|
||||
})
|
||||
|
||||
|
|
|
@ -95,7 +95,6 @@ export default class ExportPDF {
|
|||
features: tile,
|
||||
leafletMap: minimap.leafletMap,
|
||||
layerToShow: tile.layer.layerDef,
|
||||
popup: undefined,
|
||||
doShowLayer: tile.layer.isDisplayed,
|
||||
state: undefined
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ import CheckBoxes from "../Input/Checkboxes";
|
|||
|
||||
class PreviewPanel extends ScrollableFullScreen {
|
||||
|
||||
constructor(tags, layer) {
|
||||
constructor(tags: UIEventSource<any>, layer) {
|
||||
super(
|
||||
_ => new FixedUiElement("Element to import"),
|
||||
_ => new Combine(["The tags are:",
|
||||
|
|
|
@ -189,7 +189,6 @@ export default class LocationInput extends InputElement<Loc> implements MinimapO
|
|||
console.log("Constructing the snap-to layer", this._snapTo)
|
||||
new ShowDataMultiLayer({
|
||||
features: new StaticFeatureSource(this._snapTo, true),
|
||||
popup: undefined,
|
||||
zoomToFeatures: false,
|
||||
leafletMap: this.map.leafletMap,
|
||||
layers: State.state.filteredLayers
|
||||
|
@ -204,7 +203,6 @@ export default class LocationInput extends InputElement<Loc> implements MinimapO
|
|||
})
|
||||
new ShowDataLayer({
|
||||
features: new StaticFeatureSource(matchPoint, true),
|
||||
popup: undefined,
|
||||
zoomToFeatures: false,
|
||||
leafletMap: this.map.leafletMap,
|
||||
layerToShow: this._matching_layer,
|
||||
|
|
|
@ -96,7 +96,6 @@ class ApplyButton extends UIElement {
|
|||
|
||||
new ShowDataLayer({
|
||||
leafletMap: previewMap.leafletMap,
|
||||
popup: undefined,
|
||||
zoomToFeatures: true,
|
||||
features: new StaticFeatureSource(features, false),
|
||||
state: this.state,
|
||||
|
|
|
@ -237,7 +237,6 @@ ${Utils.special_visualizations_importRequirementDocs}
|
|||
// SHow all relevant data - including (eventually) the way of which the geometry will be replaced
|
||||
new ShowDataMultiLayer({
|
||||
leafletMap: confirmationMap.leafletMap,
|
||||
popup: undefined,
|
||||
zoomToFeatures: true,
|
||||
features: new StaticFeatureSource([feature], false),
|
||||
state: state,
|
||||
|
@ -248,7 +247,6 @@ ${Utils.special_visualizations_importRequirementDocs}
|
|||
action.getPreview().then(changePreview => {
|
||||
new ShowDataLayer({
|
||||
leafletMap: confirmationMap.leafletMap,
|
||||
popup: undefined,
|
||||
zoomToFeatures: false,
|
||||
features: changePreview,
|
||||
state,
|
||||
|
|
|
@ -81,7 +81,6 @@ export default class SplitRoadWizard extends Toggle {
|
|||
features: new StaticFeatureSource([roadElement], false),
|
||||
layers: state.filteredLayers,
|
||||
leafletMap: miniMap.leafletMap,
|
||||
popup: undefined,
|
||||
zoomToFeatures: true,
|
||||
state
|
||||
})
|
||||
|
@ -90,7 +89,6 @@ export default class SplitRoadWizard extends Toggle {
|
|||
features: new StaticFeatureSource(splitPoints, true),
|
||||
leafletMap: miniMap.leafletMap,
|
||||
zoomToFeatures: false,
|
||||
popup: undefined,
|
||||
layerToShow: SplitRoadWizard.splitLayerStyling,
|
||||
state
|
||||
})
|
||||
|
|
|
@ -44,7 +44,7 @@ export default class ShowDataLayer {
|
|||
*/
|
||||
private readonly leafletLayersPerId = new Map<string, { feature: any, leafletlayer: any }>()
|
||||
private readonly showDataLayerid: number;
|
||||
private readonly createPopup: (tags: any, layer: LayerConfig) => ScrollableFullScreen
|
||||
private readonly createPopup: (tags: UIEventSource<any>, layer: LayerConfig) => ScrollableFullScreen
|
||||
|
||||
/**
|
||||
* Creates a datalayer.
|
||||
|
|
|
@ -8,7 +8,7 @@ export interface ShowDataLayerOptions {
|
|||
features: FeatureSource,
|
||||
selectedElement?: UIEventSource<any>,
|
||||
leafletMap: UIEventSource<L.Map>,
|
||||
popup?: undefined | ((tags: any, layer: LayerConfig) => ScrollableFullScreen),
|
||||
popup?: undefined | ((tags: UIEventSource<any>, layer: LayerConfig) => ScrollableFullScreen),
|
||||
zoomToFeatures?: false | boolean,
|
||||
doShowLayer?: UIEventSource<boolean>,
|
||||
state?: { allElements?: ElementStorage }
|
||||
|
|
|
@ -56,7 +56,6 @@ export default class ShowTileInfo {
|
|||
leafletMap: options.leafletMap,
|
||||
doShowLayer: options.doShowLayer,
|
||||
state: State.state,
|
||||
popup: undefined
|
||||
})
|
||||
|
||||
}
|
||||
|
|
|
@ -268,7 +268,6 @@ export default class SpecialVisualizations {
|
|||
new ShowDataMultiLayer(
|
||||
{
|
||||
leafletMap: minimap["leafletMap"],
|
||||
popup: undefined,
|
||||
zoomToFeatures: true,
|
||||
layers: state.filteredLayers,
|
||||
features: new StaticFeatureSource(featuresToShow, true)
|
||||
|
@ -314,7 +313,6 @@ export default class SpecialVisualizations {
|
|||
new ShowDataLayer(
|
||||
{
|
||||
leafletMap: minimap["leafletMap"],
|
||||
popup: undefined,
|
||||
zoomToFeatures: true,
|
||||
layerToShow: new LayerConfig(left_right_style_json, "all_known_layers", true),
|
||||
features: new StaticFeatureSource([copy], false),
|
||||
|
|
Loading…
Reference in a new issue