GeoDownloaderToolMapControl
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β
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