Skip to main content

GeoDownloaderTool

geovisto-map β€’ Readme | API


geovisto-map / GeoDownloaderTool

Class: GeoDownloaderTool

GeoDownladerTool -- Tool providing basic user interface for downloading GeoJSON objects from OverpassAPI. Objects can be downloaded for more than one administrative level of country. Can be also used for generating hierarchy definition in case of downloading polygons.

Author​

VojtΔ›ch MalΓ½

Extends​

Implements​

Constructors​

new GeoDownloaderTool()​

new GeoDownloaderTool(props?): GeoDownloaderTool

Parameters​

β€’ props?: IMapToolProps

Returns​

GeoDownloaderTool

Overrides​

MapTool.constructor

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:28

Properties​

mapForm​

private mapForm: GeoDownloaderToolMapForm

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:26

Methods​

changeForm()​

private changeForm(): void

Update displayed zoom level in form.

Returns​

void

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:78


copy()​

copy(): IGeoDownloaderTool

It creates copy of the uninitialized tool.

Returns​

IGeoDownloaderTool

Implementation of​

IGeoDownloaderTool.copy

Overrides​

MapTool.copy

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:63


create()​

create(): this

It creates a tool.

Returns​

this

Implementation of​

IGeoDownloaderTool.create

Overrides​

MapTool.create

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:67


createDefaults()​

createDefaults(): IGeoDownloaderToolDefaults

It creates new defaults of the tool.

Returns​

IGeoDownloaderToolDefaults

Overrides​

MapTool.createDefaults

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:43


createMapForm()​

protected createMapForm(): IMapForm

Returns​

IMapForm

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:47


createState()​

createState(): IGeoDownloaderToolState

It creates new defaults of the tool.

Returns​

IGeoDownloaderToolState

Overrides​

MapTool.createState

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:59


getAPIGetter()​

getAPIGetter(): undefined | IMapToolAPIGetter

It returns the tool API

Returns​

undefined | IMapToolAPIGetter

Implementation of​

IGeoDownloaderTool.getAPIGetter

Inherited from​

MapTool.getAPIGetter

Source​

model/internal/tool/MapTool.ts:74


getDefaults()​

getDefaults(): IGeoDownloaderToolDefaults

It returns default values of the state properties.

Returns​

IGeoDownloaderToolDefaults

Implementation of​

IGeoDownloaderTool.getDefaults

Overrides​

MapTool.getDefaults

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:39


getId()​

getId(): string

Help function which returns the id of the object.

Returns​

string

Implementation of​

IGeoDownloaderTool.getId

Inherited from​

MapTool.getId

Source​

model/internal/object/MapObject.ts:93


getMap()​

getMap(): undefined | IMap\<IMapProps, IMapDefaults, IMapState\<IMapProps, IMapDefaults, IMapConfig>, IMapConfig, IMapInitProps\<IMapConfig>>

Help function returns map which uses this tool.

Do not override this function. Use the state class instead.

Returns​

undefined | IMap\<IMapProps, IMapDefaults, IMapState\<IMapProps, IMapDefaults, IMapConfig>, IMapConfig, IMapInitProps\<IMapConfig>>

Implementation of​

IGeoDownloaderTool.getMap

Inherited from​

MapTool.getMap

Source​

model/internal/tool/MapTool.ts:112


getMapForm()​

getMapForm(): IMapForm

It returns a map control.

Returns​

IMapForm

Implementation of​

IMapFormControl.getMapForm

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:32


getProps()​

getProps(): IMapToolProps

Help function which returns the props given by the programmer.

Returns​

IMapToolProps

Implementation of​

IGeoDownloaderTool.getProps

Inherited from​

MapTool.getProps

Source​

model/internal/tool/MapTool.ts:39


getState()​

getState(): IGeoDownloaderToolState

It returns the map object state.

Returns​

IGeoDownloaderToolState

Implementation of​

IGeoDownloaderTool.getState

Overrides​

MapTool.getState

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:55


getType()​

getType(): string

Help function which returns the type of the object.

Returns​

string

Implementation of​

IGeoDownloaderTool.getType

Inherited from​

MapTool.getType

Source​

model/internal/object/MapObject.ts:86


handleEvent()​

handleEvent(event): void

This function is called when a custom event is invoked.

Override this function, if needed.

Parameters​

β€’ event: IMapEvent\<IMapObject\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectState\<IMapObjectProps, IMapObjectDefaults\<IMapObjectProps, IMapObjectConfig>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>, IMapObjectConfig, IMapObjectInitProps\<IMapObjectConfig>>>

Returns​

void

Inherited from​

MapTool.handleEvent

Source​

model/internal/tool/MapTool.ts:171


initialize()​

initialize(initProps): this

It initializes the state of the object. It processes the serialized config and sets further objects.

This cannot be done in the object constructor since the object can be created before the Geovisto map is created.

Parameters​

β€’ initProps: IMapToolInitProps\<IMapToolConfig>

Returns​

this

Implementation of​

IGeoDownloaderTool.initialize

Overrides​

MapTool.initialize

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:51


isEnabled()​

isEnabled(): boolean

Help getter which returns enabled property of state.

Do not override this function. Use the state class instead.

Returns​

boolean

Implementation of​

IGeoDownloaderTool.isEnabled

Inherited from​

MapTool.isEnabled

Source​

model/internal/tool/MapTool.ts:130


isSingleton()​

isSingleton(): boolean

Help getter which returns a logtical value whether the tool type is singleton.

Returns​

boolean

Implementation of​

IGeoDownloaderTool.isSingleton

Inherited from​

MapTool.isSingleton

Source​

model/internal/tool/MapTool.ts:81


setEnabled()​

setEnabled(enabled): void

Some tools might be dynamicaly enabled/disabled. This function is called externally when the tool is enabled/disabled.

Parameters​

β€’ enabled: boolean

Returns​

void

Implementation of​

IGeoDownloaderTool.setEnabled

Overrides​

MapTool.setEnabled

Source​

tools/geo-downloader/model/internal/tool/GeoDownloaderTool.ts:87


setProps()​

protected setProps(props): void

It updates the props.

Parameters​

β€’ props: IMapObjectProps

Returns​

void

Inherited from​

MapTool.setProps

Source​

model/internal/object/MapObject.ts:38


switchEnabled()​

switchEnabled(): void

Help function which switches enabled state (enabled/disabled).

Do not override this function. Use setEnabled instead.

Returns​

void

Implementation of​

IGeoDownloaderTool.switchEnabled

Inherited from​

MapTool.switchEnabled

Source​

model/internal/tool/MapTool.ts:158