Skip to content

Commit

Permalink
Refactor function LayerFactory::get(config = {}) (#449)
Browse files Browse the repository at this point in the history
* refactor function `LayerFactory::get(config = {})`

- simplify nested `switch-if` logic
- convert `LayerFactory`  to ES6 class

* delete folder `src/app/core/layers/baselayers/`

* Add comments and change variable names

* start simplifying geomtype

* missing var

* add `is_empty`

* shorten variable names

* Add source variable and handle no and has geom

* comments

* refactor is_table_layer is_image_layer

* explicit boolean condition

* simplify please

* Fix missing bracket and explicit boolean condition

* remove yoda

---------

Co-authored-by: volterra79 <[email protected]>
  • Loading branch information
Raruto and volterra79 authored Aug 25, 2023
1 parent 3d44a21 commit 795b213
Show file tree
Hide file tree
Showing 9 changed files with 191 additions and 279 deletions.
File renamed without changes.
28 changes: 0 additions & 28 deletions src/app/core/layers/baselayers/arcgislayer.js

This file was deleted.

10 changes: 0 additions & 10 deletions src/app/core/layers/baselayers/baselayers.js

This file was deleted.

47 changes: 0 additions & 47 deletions src/app/core/layers/baselayers/binglayer.js

This file was deleted.

23 changes: 0 additions & 23 deletions src/app/core/layers/baselayers/osmlayer.js

This file was deleted.

29 changes: 0 additions & 29 deletions src/app/core/layers/baselayers/tmslayer.js

This file was deleted.

29 changes: 0 additions & 29 deletions src/app/core/layers/baselayers/wmslayer.js

This file was deleted.

32 changes: 0 additions & 32 deletions src/app/core/layers/baselayers/wmtslayer.js

This file was deleted.

Loading

0 comments on commit 795b213

Please sign in to comment.