Skip to main content

GeoDownloaderToolMapControl

geovisto-map β€’ Readme | API


geovisto-map / GeoDownloaderToolMapControl

Class: GeoDownloaderToolMapControl

Controler for Downloader tool. Manages almost everything around downloading geo objects from Overpass API. Can generate automatic hierarchy definition from downloaded objects.

Author​

VojtΔ›ch MalΓ½

Constructors​

new GeoDownloaderToolMapControl()​

new GeoDownloaderToolMapControl(map): GeoDownloaderToolMapControl

Parameters​

β€’ map: any

Returns​

GeoDownloaderToolMapControl

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:62

Properties​

adminLevelDIV​

private adminLevelDIV: HTMLElement

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:37


adminLevelMAP​

private adminLevelMAP: Map\<LabeledCheckboxFormInput, string>

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:38


countriesList​

private countriesList: countriesTYPE[]

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:45


countryInput​

private countryInput: LabeledAutocompleteFormInput

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:36


data​

private data: object

geo​

geo: any[]

geoFIltered​

geoFIltered: FeatureCollection[]

level​

level: number[]

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:48


downloadGeojsonBTN​

downloadGeojsonBTN: HTMLButtonElement

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:32


downloadHierarchyBTN​

downloadHierarchyBTN: HTMLButtonElement

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:33


hierarchy​

private hierarchy: hierarchyConfig

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:54


hierarchyEditToolDiv​

hierarchyEditToolDiv: HTMLDivElement

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:34


hierarchyPreviewButtons​

private hierarchyPreviewButtons: LabeledCheckboxFormInput[] = []

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:41


hierarchySliders​

private hierarchySliders: LabeledSliderFormInput[] = []

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:42


inProcess​

private inProcess: boolean = false

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:44


leafletMap​

private leafletMap: any

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:59


levelMap​

private levelMap: Map\<string, administrativeLevelsTYPE>

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:56


objectTypeInput​

objectTypeInput: LabeledAutocompleteFormInput

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:31


previewGeo​

private previewGeo: Map\<number, GeoJSON>

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:57


progressBar​

progressBar: HTMLProgressElement

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:35


selectedValue​

private selectedValue: string = ""

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:46


simplifyInputScale​

private simplifyInputScale: HTMLDivElement

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:39


simplifyInputScaleRange​

private simplifyInputScaleRange: LabeledSliderFormInput

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:40


tableOfLevels​

private tableOfLevels: administrativeLevelsTYPE[]

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:55


valueNameMap​

private valueNameMap: Map\<string, string>

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:53

Methods​

changeLevel()​

protected changeLevel(level): void

Change zoom level in hierarchy for certain administrative level.

Parameters​

β€’ level: number

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:370


changeToNormal()​

protected changeToNormal(): void

Change state of tool to normal -> download finished.

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:662


changeToWait()​

protected changeToWait(): void

Change state of tool to -> waiting for download to finish

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:652


createAdminLevelSelection()​

createAdminLevelSelection(): HTMLElement

Create chcekboxes with custom labels based on OpenStreetMap table. If not defined in table, creates clasic number labels.

Returns​

HTMLElement

Div element containing buttons.

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:130


createSelection()​

createSelection(): HTMLElement

Returns​

HTMLElement

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:758


createSimplifyNumberInput()​

createSimplifyNumberInput(): HTMLDivElement

Returns​

HTMLDivElement

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:698


disableLast()​

disableLast(): void

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:452


downloadGeo()​

downloadGeo(): void

Callback function for downloading GeoJSON

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:674


downloadHierarchy()​

downloadHierarchy(): void

Callback function for downloading Hierarchy definition.

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:687


enableLast()​

enableLast(): void

Method for making selected previews visible.

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:442


fetchGeo()​

protected fetchGeo(countryID, admin_levels): Promise\<any>

Asynchronous function to download geoobjects.

Parameters​

β€’ countryID: string

ID of country

β€’ admin_levels: number[]

Array of levels to be downloaded.

Returns​

Promise\<any>

Promise

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:403


fetchHandle()​

fetchHandle(): void

Call back function for start of download.

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:209


filterGeo()​

protected filterGeo(): void

Filters and simplify downloaded data.

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:458


generateHierarchy()​

protected generateHierarchy(): void

Automatic generator of hierarchy definition.

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:497


generateHierarchyEdit()​

protected generateHierarchyEdit(): void

Generate hierarchy editation interface

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:275


getParent()​

protected getParent(centerCHild, iterator): string

Function to reslove childs parent in automatic generating of hierarchy.

Parameters​

β€’ centerCHild: Feature

β€’ iterator: number

Returns​

string

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:545


getSelectedValuesFromMutliple()​

protected getSelectedValuesFromMutliple(): string[]

Returns selected administrative levels.

Returns​

string[]

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:386


getSimplifyScaled()​

protected getSimplifyScaled(input): number

From input number (0 - 10) converts to coefficient of simplification compatible with

Parameters​

β€’ input: number

Returns​

number

Turf​

funciton.

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:730


makeIDsPretty()​

protected makeIDsPretty(): void

Generate new IDs for geoobjects.

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:581


mergeToGeo()​

protected mergeToGeo(): string

Merge all administrative layers in one GeoJSON

Returns​

string

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:611


previewCleaner()​

private previewCleaner(): void

Method to hide all previewed objects.

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:196


simplifyDisable()​

simplifyDisable(): void

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:717


simplifyFeature()​

protected simplifyFeature(feature, simplifyIndex?): Feature

Parameters​

β€’ feature: AllGeoJSON

β€’ simplifyIndex?: number

Returns​

Feature

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:643


togglePreview()​

protected togglePreview(level): void

Show or clear prewiev of downloaded data.

Parameters​

β€’ level: number

Returns​

void

Source​

tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:313