@eox/layercontrol 0.6.1 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,35 +0,0 @@
1
- import { EOxMap } from "../../map/main";
2
- import mapIntegrationJson from "./mapIntegration.json";
3
-
4
- describe("Layer Control", () => {
5
- beforeEach(() => {
6
- cy.visit("/elements/layercontrol/test/mapIntegration.html");
7
- });
8
-
9
- it("loads the layercontrol", () => {
10
- let eoxMap: EOxMap;
11
- cy.get("eox-map").should(($el) => {
12
- eoxMap = <EOxMap>$el[0];
13
- // @ts-ignore
14
- const olMap = eoxMap.map;
15
- eoxMap.setLayers(mapIntegrationJson);
16
- olMap
17
- .getLayers()
18
- .getArray()
19
- .forEach((layer, index) => {
20
- layer.set("name", "Layer " + index);
21
- layer.set("id", "layer" + index);
22
- if (index === 0) {
23
- layer.set("baseLayer", true);
24
- }
25
- if (index === 1) {
26
- layer.set("extent", [-14000000, 2000000, -8000000, 7000000]);
27
- // layer.set("displayInLayerControl", false);
28
- }
29
- if (index === 2) {
30
- layer.setVisible(false);
31
- }
32
- });
33
- });
34
- });
35
- });
@@ -1,47 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <style>
5
- html,
6
- body {
7
- padding: 0;
8
- margin: 0;
9
- }
10
- eox-map {
11
- width: 100%;
12
- height: 400px;
13
- }
14
- </style>
15
- <script type="module" defer src="../../map/dist/eox-map.js"></script>
16
- <script type="module" defer src="../dist/eox-layercontrol.js"></script>
17
- </head>
18
- <body>
19
- <eox-map></eox-map>
20
- <div style="display: flex">
21
- <eox-layercontrol
22
- for="eox-map"
23
- .layerConfig="['opacity', 'color']"
24
- layerIdentifier="id"
25
- layerTitle="name"
26
- style="width: 300px"
27
- >
28
- Layer Control with internal layer config
29
- </eox-layercontrol>
30
-
31
- <eox-layercontrol
32
- for="eox-map"
33
- externalLayerConfig
34
- .layerConfig="['opacity', 'color']"
35
- layerIdentifier="id"
36
- layerTitle="name"
37
- id="test-control"
38
- style="width: 300px"
39
- >
40
- Layer Control with external layer config
41
- </eox-layercontrol>
42
- <eox-layerconfig for="#test-control"
43
- >External layer config</eox-layerconfig
44
- >
45
- </div>
46
- </body>
47
- </html>
@@ -1,65 +0,0 @@
1
- {
2
- "version": 8,
3
- "name": "",
4
- "sources": {
5
- "states": {
6
- "type": "raster",
7
- "tileSize": 512,
8
- "tiles": [
9
- "https://ahocevar.com/geoserver/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image/png&TRANSPARENT=true&LAYERS=topp:states&STYLES=&WIDTH=512&HEIGHT=512&SRS=EPSG:3857&BBOX={bbox-epsg-3857}"
10
- ]
11
- },
12
- "countries": {
13
- "type": "geojson",
14
- "data": "https://openlayersbook.github.io/openlayers_book_samples/assets/data/countries.geojson"
15
- },
16
- "countriesTiles": {
17
- "type": "vector",
18
- "tiles": [
19
- "https://ahocevar.com/geoserver/gwc/service/tms/1.0.0/ne:ne_10m_admin_0_countries@EPSG%3A900913@pbf/{z}/{x}/{-y}.pbf"
20
- ]
21
- }
22
- },
23
- "layers": [
24
- {
25
- "id": "states",
26
- "type": "raster",
27
- "source": "states"
28
- },
29
- {
30
- "id": "countries_fill",
31
- "type": "fill",
32
- "source": "countries",
33
- "paint": {
34
- "fill-color": "rgba(255, 255, 255, 0.5)"
35
- }
36
- },
37
- {
38
- "id": "countries_outline",
39
- "type": "line",
40
- "source": "countries",
41
- "paint": {
42
- "line-color": "#219e46",
43
- "line-width": 2
44
- }
45
- },
46
- {
47
- "id": "countries_fill_tiles",
48
- "type": "fill",
49
- "source": "countriesTiles",
50
- "source-layer": "ne_10m_admin_0_countries",
51
- "paint": {
52
- "fill-color": "rgba(255, 0, 100, 0.5)"
53
- }
54
- },
55
- {
56
- "id": "countries_outline_tiles",
57
- "type": "line",
58
- "source": "countriesTiles",
59
- "source-layer": "ne_10m_admin_0_countries",
60
- "paint": {
61
- "line-color": "rgba(255, 0, 100, 1)"
62
- }
63
- }
64
- ]
65
- }
package/test/zIndex.cy.ts DELETED
@@ -1,34 +0,0 @@
1
- import { EOxMap } from "../../map/main";
2
- import mapIntegrationJson from "./mapIntegration.json";
3
-
4
- describe("Layer Control", () => {
5
- beforeEach(() => {
6
- cy.visit("/elements/layercontrol/test/mapIntegration.html");
7
- });
8
-
9
- it("loads the layercontrol", () => {
10
- let eoxMap: EOxMap;
11
- cy.get("eox-map").should(($el) => {
12
- eoxMap = <EOxMap>$el[0];
13
- // @ts-ignore
14
- const olMap = eoxMap.map;
15
- eoxMap.setLayers(mapIntegrationJson);
16
- olMap
17
- .getLayers()
18
- .getArray()
19
- .forEach((layer, index) => {
20
- layer.set("name", "Layer " + index);
21
- layer.set("id", "layer" + index);
22
- if (index === 0) {
23
- layer.set("zIndex", 44);
24
- }
25
- if (index === 1) {
26
- layer.set("zIndex", 0);
27
- }
28
- if (index === 2) {
29
- layer.set("zIndex", 10);
30
- }
31
- });
32
- });
33
- });
34
- });