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β
privateadminLevelDIV:HTMLElement
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:37
adminLevelMAPβ
privateadminLevelMAP:Map\<LabeledCheckboxFormInput,string>
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:38
countriesListβ
privatecountriesList:countriesTYPE[]
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:45
countryInputβ
privatecountryInput:LabeledAutocompleteFormInput
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:36
dataβ
privatedata: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β
privatehierarchy: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β
privatehierarchyPreviewButtons:LabeledCheckboxFormInput[] =[]
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:41
hierarchySlidersβ
privatehierarchySliders:LabeledSliderFormInput[] =[]
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:42
inProcessβ
privateinProcess:boolean=false
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:44
leafletMapβ
privateleafletMap:any
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:59
levelMapβ
privatelevelMap: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β
privatepreviewGeo: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β
privateselectedValue:string=""
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:46
simplifyInputScaleβ
privatesimplifyInputScale:HTMLDivElement
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:39
simplifyInputScaleRangeβ
privatesimplifyInputScaleRange:LabeledSliderFormInput
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:40
tableOfLevelsβ
privatetableOfLevels:administrativeLevelsTYPE[]
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:55
valueNameMapβ
privatevalueNameMap:Map\<string,string>
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:53
Methodsβ
changeLevel()β
protectedchangeLevel(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()β
protectedchangeToNormal():void
Change state of tool to normal -> download finished.
Returnsβ
void
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:662
changeToWait()β
protectedchangeToWait():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()β
protectedfetchGeo(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()β
protectedfilterGeo():void
Filters and simplify downloaded data.
Returnsβ
void
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:458
generateHierarchy()β
protectedgenerateHierarchy():void
Automatic generator of hierarchy definition.
Returnsβ
void
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:497
generateHierarchyEdit()β
protectedgenerateHierarchyEdit():void
Generate hierarchy editation interface
Returnsβ
void
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:275
getParent()β
protectedgetParent(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()β
protectedgetSelectedValuesFromMutliple():string[]
Returns selected administrative levels.
Returnsβ
string[]
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:386
getSimplifyScaled()β
protectedgetSimplifyScaled(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()β
protectedmakeIDsPretty():void
Generate new IDs for geoobjects.
Returnsβ
void
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:581
mergeToGeo()β
protectedmergeToGeo():string
Merge all administrative layers in one GeoJSON
Returnsβ
string
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:611
previewCleaner()β
privatepreviewCleaner():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()β
protectedsimplifyFeature(feature,simplifyIndex?):Feature
Parametersβ
β’ feature: AllGeoJSON
β’ simplifyIndex?: number
Returnsβ
Feature
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:643
togglePreview()β
protectedtogglePreview(level):void
Show or clear prewiev of downloaded data.
Parametersβ
β’ level: number
Returnsβ
void
Sourceβ
tools/geo-downloader/model/internal/form/GeoDownloaderToolMapControl.ts:313