forked from MapComplete/MapComplete
First working version of fully automatic uploader
This commit is contained in:
parent
04dc373b1e
commit
e922768f99
21 changed files with 342 additions and 106 deletions
|
@ -49,7 +49,8 @@ export default class ElementsState extends FeatureSwitchState {
|
|||
constructor(layoutToUse: LayoutConfig) {
|
||||
super(layoutToUse);
|
||||
|
||||
this.changes = new Changes(layoutToUse?.isLeftRightSensitive() ?? false)
|
||||
// @ts-ignore
|
||||
this.changes = new Changes(this,layoutToUse?.isLeftRightSensitive() ?? false)
|
||||
{
|
||||
// -- Location control initialization
|
||||
const zoom = UIEventSource.asFloat(
|
||||
|
|
|
@ -9,6 +9,7 @@ import MapState from "./MapState";
|
|||
import SelectedFeatureHandler from "../Actors/SelectedFeatureHandler";
|
||||
import Hash from "../Web/Hash";
|
||||
import {BBox} from "../BBox";
|
||||
import {FeatureSourceForLayer} from "../FeatureSource/FeatureSource";
|
||||
|
||||
export default class FeaturePipelineState extends MapState {
|
||||
|
||||
|
|
|
@ -82,8 +82,8 @@ export default class MapState extends UserRelatedState {
|
|||
public overlayToggles: { config: TilesourceConfig, isDisplayed: UIEventSource<boolean> }[]
|
||||
|
||||
|
||||
constructor(layoutToUse: LayoutConfig) {
|
||||
super(layoutToUse);
|
||||
constructor(layoutToUse: LayoutConfig, options?: {attemptLogin: true | boolean}) {
|
||||
super(layoutToUse, options);
|
||||
|
||||
this.availableBackgroundLayers = AvailableBaseLayers.AvailableLayersAt(this.locationControl);
|
||||
|
||||
|
@ -265,7 +265,6 @@ export default class MapState extends UserRelatedState {
|
|||
|
||||
let gpsLayerDef: FilteredLayer = this.filteredLayers.data.filter(l => l.layerDef.id === "gps_location_history")[0]
|
||||
this.historicalUserLocations = new SimpleFeatureSource(gpsLayerDef, Tiles.tile_index(0, 0, 0), features);
|
||||
this.changes.useLocationHistory(this)
|
||||
|
||||
|
||||
const asLine = features.map(allPoints => {
|
||||
|
|
|
@ -36,7 +36,7 @@ export default class UserRelatedState extends ElementsState {
|
|||
public installedThemes: UIEventSource<{ layout: LayoutConfig; definition: string }[]>;
|
||||
|
||||
|
||||
constructor(layoutToUse: LayoutConfig) {
|
||||
constructor(layoutToUse: LayoutConfig, options:{attemptLogin : true | boolean}) {
|
||||
super(layoutToUse);
|
||||
|
||||
this.osmConnection = new OsmConnection({
|
||||
|
@ -50,7 +50,8 @@ export default class UserRelatedState extends ElementsState {
|
|||
"Used to complete the login"
|
||||
),
|
||||
layoutName: layoutToUse?.id,
|
||||
osmConfiguration: <'osm' | 'osm-test'>this.featureSwitchApiURL.data
|
||||
osmConfiguration: <'osm' | 'osm-test'>this.featureSwitchApiURL.data,
|
||||
attemptLogin: options?.attemptLogin
|
||||
})
|
||||
|
||||
this.mangroveIdentity = new MangroveIdentity(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue