diff --git a/dist/commonjs/zoneerder/components/ol-layerswitcher.d.ts b/dist/commonjs/zoneerder/components/ol-layerswitcher.d.ts index 2791a711..39cdc24d 100644 --- a/dist/commonjs/zoneerder/components/ol-layerswitcher.d.ts +++ b/dist/commonjs/zoneerder/components/ol-layerswitcher.d.ts @@ -18,7 +18,7 @@ export declare class Layerswitcher extends ol.control.Control { setMap(map: any): void; ensureTopVisibleBaseLayerShown_(): void; setVisible_(lyr: any, visible: boolean): void; - renderLayer_(lyr: any, idx: any): HTMLLIElement; + renderLayer_(lyr: any): HTMLLIElement; private addLegend; renderLayers_(lyr: any, elm: Element): void; forEachRecursive(lyr: any, fn: any): void; diff --git a/dist/commonjs/zoneerder/components/ol-layerswitcher.js b/dist/commonjs/zoneerder/components/ol-layerswitcher.js index d9ec6643..b98058af 100644 --- a/dist/commonjs/zoneerder/components/ol-layerswitcher.js +++ b/dist/commonjs/zoneerder/components/ol-layerswitcher.js @@ -17,6 +17,7 @@ var __extends = (this && this.__extends) || (function () { Object.defineProperty(exports, "__esModule", { value: true }); exports.Layerswitcher = void 0; var ol = require("openlayers"); +var typescript_guid_1 = require("typescript-guid"); var layerConfig_enums_1 = require("../models/layerConfig.enums"); var Layerswitcher = (function (_super) { __extends(Layerswitcher, _super); @@ -114,11 +115,12 @@ var Layerswitcher = (function (_super) { }); } }; - Layerswitcher.prototype.renderLayer_ = function (lyr, idx) { + Layerswitcher.prototype.renderLayer_ = function (lyr) { var self = this; + var id = typescript_guid_1.Guid.create(); var li = document.createElement('li'); var lyrTitle = lyr.get('title'); - var lyrId = lyr.get('title').replace(' ', '-') + '_' + idx; + var lyrId = lyr.get('title').replace(' ', '-') + '_' + id; var label = document.createElement('label'); if (lyr.getLayers) { li.className = 'group'; @@ -211,13 +213,13 @@ var Layerswitcher = (function (_super) { } }; Layerswitcher.prototype.renderLayers_ = function (lyr, elm) { + var _this = this; var lyrs = lyr.getLayers().getArray().slice().reverse(); - for (var i = 0, l = void 0; i < lyrs.length; i++) { - l = lyrs[i]; + lyrs.forEach(function (l) { if (l.get('title')) { - elm.appendChild(this.renderLayer_(l, i)); + elm.appendChild(_this.renderLayer_(l)); } - } + }); }; Layerswitcher.prototype.forEachRecursive = function (lyr, fn) { var _this = this; diff --git a/dist/commonjs/zoneerder/components/ol-layerswitcher.js.map b/dist/commonjs/zoneerder/components/ol-layerswitcher.js.map index 61dc4e0d..730675bd 100644 --- a/dist/commonjs/zoneerder/components/ol-layerswitcher.js.map +++ b/dist/commonjs/zoneerder/components/ol-layerswitcher.js.map @@ -1 +1 @@ -{"version":3,"sources":["zoneerder/components/ol-layerswitcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,+BAAiC;AACjC,iEAAwD;AAExD;IAAmC,iCAAkB;IAanD,uBAAY,UAAe;QACzB,YAAA,MAAK,YAAC,UAAU,CAAC,SAAC;QAPb,aAAO,GAAY,KAAK,CAAC;QAQ9B,KAAI,CAAC,OAAO,GAAG,UAAU,IAAI,EAAE,CAAC;QAEhC,KAAI,CAAC,QAAQ,GAAG,KAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;YACrC,KAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC;QAEnC,KAAI,CAAC,UAAU,GAAG,KAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;YACpC,KAAI,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,cAAc,CAAC;QAEtC,KAAI,CAAC,YAAY,GAAG,EAAE,CAAC;QAEvB,KAAI,CAAC,eAAe,GAAG,2CAA2C,CAAC;QACnE,KAAI,CAAC,cAAc,GAAG,KAAI,CAAC,eAAe,GAAG,QAAQ,CAAC;QAEtD,KAAI,CAAC,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;QAC7C,KAAI,CAAC,OAAO,CAAC,SAAS,GAAG,KAAI,CAAC,eAAe,CAAC;QAE9C,KAAI,CAAC,MAAM,GAAG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AC,UAAU,CAAC,CAAC;YAClC,EAAE,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAQM,qCAAa,GAApB,UAAqB,GAAQ,EAAE,GAAY;QAA3C,iBAOC;QANC,IAAM,IAAI,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,CAAC;QAC1D,IAAI,CAAC,OAAO,CAAC,UAAC,CAAC;YACb,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;gBACnB,GAAG,CAAC,WAAW,CAAC,KAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YACxC,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IASM,wCAAgB,GAAvB,UAAwB,GAAQ,EAAE,EAAO;QAAzC,iBAOC;QANC,GAAG,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,UAAC,IAAS,EAAE,GAAQ,EAAE,CAAM;YAClD,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;YACjB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACnB,KAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAClC,CAAC;QACH,CAAC,EAAE,IAAI,CAAC,CAAC;IACX,CAAC;IACH,oBAAC;AAAD,CA5RA,AA4RC,CA5RkC,EAAE,CAAC,OAAO,CAAC,OAAO,GA4RpD;AA5RY,sCAAa","file":"ol-layerswitcher.js","sourceRoot":"../../../../src/"} \ No newline at end of file diff --git a/dist/native-modules/zoneerder/components/ol-layerswitcher.d.ts b/dist/native-modules/zoneerder/components/ol-layerswitcher.d.ts index 2791a711..39cdc24d 100644 --- a/dist/native-modules/zoneerder/components/ol-layerswitcher.d.ts +++ b/dist/native-modules/zoneerder/components/ol-layerswitcher.d.ts @@ -18,7 +18,7 @@ export declare class Layerswitcher extends ol.control.Control { setMap(map: any): void; ensureTopVisibleBaseLayerShown_(): void; setVisible_(lyr: any, visible: boolean): void; - renderLayer_(lyr: any, idx: any): HTMLLIElement; + renderLayer_(lyr: any): HTMLLIElement; private addLegend; renderLayers_(lyr: any, elm: Element): void; forEachRecursive(lyr: any, fn: any): void; diff --git a/dist/native-modules/zoneerder/components/ol-layerswitcher.js b/dist/native-modules/zoneerder/components/ol-layerswitcher.js index a0d39041..0e84f957 100644 --- a/dist/native-modules/zoneerder/components/ol-layerswitcher.js +++ b/dist/native-modules/zoneerder/components/ol-layerswitcher.js @@ -14,6 +14,7 @@ var __extends = (this && this.__extends) || (function () { }; })(); import * as ol from 'openlayers'; +import { Guid } from 'typescript-guid'; import { LayerType } from '../models/layerConfig.enums'; var Layerswitcher = (function (_super) { __extends(Layerswitcher, _super); @@ -111,11 +112,12 @@ var Layerswitcher = (function (_super) { }); } }; - Layerswitcher.prototype.renderLayer_ = function (lyr, idx) { + Layerswitcher.prototype.renderLayer_ = function (lyr) { var self = this; + var id = Guid.create(); var li = document.createElement('li'); var lyrTitle = lyr.get('title'); - var lyrId = lyr.get('title').replace(' ', '-') + '_' + idx; + var lyrId = lyr.get('title').replace(' ', '-') + '_' + id; var label = document.createElement('label'); if (lyr.getLayers) { li.className = 'group'; @@ -208,13 +210,13 @@ var Layerswitcher = (function (_super) { } }; Layerswitcher.prototype.renderLayers_ = function (lyr, elm) { + var _this = this; var lyrs = lyr.getLayers().getArray().slice().reverse(); - for (var i = 0, l = void 0; i < lyrs.length; i++) { - l = lyrs[i]; + lyrs.forEach(function (l) { if (l.get('title')) { - elm.appendChild(this.renderLayer_(l, i)); + elm.appendChild(_this.renderLayer_(l)); } - } + }); }; Layerswitcher.prototype.forEachRecursive = function (lyr, fn) { var _this = this; diff --git a/dist/native-modules/zoneerder/components/ol-layerswitcher.js.map b/dist/native-modules/zoneerder/components/ol-layerswitcher.js.map index 8997ca91..63e620b1 100644 --- a/dist/native-modules/zoneerder/components/ol-layerswitcher.js.map +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E,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAC5B,CAAC;IACH,CAAC;IAQM,qCAAa,GAApB,UAAqB,GAAQ,EAAE,GAAY;QACzC,IAAM,IAAI,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,CAAC;QAC1D,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,SAAA,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACxC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;YACZ,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;gBACnB,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;YAC3C,CAAC;QACH,CAAC;IACH,CAAC;IASM,wCAAgB,GAAvB,UAAwB,GAAQ,EAAE,EAAO;QAAzC,iBAOC;QANC,GAAG,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,UAAC,IAAS,EAAE,GAAQ,EAAE,CAAM;YAClD,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;YACjB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACnB,KAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAClC,CAAC;QACH,CAAC,EAAE,IAAI,CAAC,CAAC;IACX,CAAC;IACH,oBAAC;AAAD,CA5RA,AA4RC,CA5RkC,EAAE,CAAC,OAAO,CAAC,OAAO,GA4RpD","file":"ol-layerswitcher.js","sourceRoot":"../../../../src/"} \ No newline at end of file +{"version":3,"sources":["zoneerder/components/ol-layerswitcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,EAAE,MAAM,YAAY,CAAC;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAA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QANC,IAAM,IAAI,GAAG,GAAG,CAAC,SAAS,EAAE,CAAC,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,OAAO,EAAE,CAAC;QAC1D,IAAI,CAAC,OAAO,CAAC,UAAC,CAAC;YACb,IAAI,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;gBACnB,GAAG,CAAC,WAAW,CAAC,KAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YACxC,CAAC;QACH,CAAC,CAAC,CAAA;IACJ,CAAC;IASM,wCAAgB,GAAvB,UAAwB,GAAQ,EAAE,EAAO;QAAzC,iBAOC;QANC,GAAG,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,UAAC,IAAS,EAAE,GAAQ,EAAE,CAAM;YAClD,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,CAAC;YACjB,IAAI,IAAI,CAAC,SAAS,EAAE,CAAC;gBACnB,KAAI,CAAC,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YAClC,CAAC;QACH,CAAC,EAAE,IAAI,CAAC,CAAC;IACX,CAAC;IACH,oBAAC;AAAD,CA5RA,AA4RC,CA5RkC,EAAE,CAAC,OAAO,CAAC,OAAO,GA4RpD","file":"ol-layerswitcher.js","sourceRoot":"../../../../src/"} \ No newline at end of file diff --git a/package.json b/package.json index 5f7ae547..50d7c0e7 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "primer-tooltips": "^2.0.0", "proj4": "^2.4.3", "sass": "^1.53.0", - "toastr": "^2.1.4" + "toastr": "^2.1.4", + "typescript-guid": "^1.0.3" }, "devDependencies": { "@types/jasmine": "^2.8.9", diff --git a/src/zoneerder/components/ol-layerswitcher.ts b/src/zoneerder/components/ol-layerswitcher.ts index e1b65b57..51173e26 100644 --- a/src/zoneerder/components/ol-layerswitcher.ts +++ b/src/zoneerder/components/ol-layerswitcher.ts @@ -1,4 +1,5 @@ import * as ol from 'openlayers'; +import { Guid } from 'typescript-guid'; import { LayerType } from '../models/layerConfig.enums'; export class Layerswitcher extends ol.control.Control { @@ -158,11 +159,12 @@ export class Layerswitcher extends ol.control.Control { * @param {ol.layer.Base} lyr Layer to be rendered (should have a title property). * @param {Number} idx Position in parent group list. */ - public renderLayer_(lyr: any, idx: any) { + public renderLayer_(lyr: any) { const self = this; + const id = Guid.create(); const li = document.createElement('li'); const lyrTitle = lyr.get('title'); - const lyrId = lyr.get('title').replace(' ', '-') + '_' + idx; + const lyrId = lyr.get('title').replace(' ', '-') + '_' + id; const label = document.createElement('label'); if (lyr.getLayers) { @@ -262,12 +264,11 @@ export class Layerswitcher extends ol.control.Control { */ public renderLayers_(lyr: any, elm: Element) { const lyrs = lyr.getLayers().getArray().slice().reverse(); - for (let i = 0, l; i < lyrs.length; i++) { - l = lyrs[i]; + lyrs.forEach((l) => { if (l.get('title')) { - elm.appendChild(this.renderLayer_(l, i)); + elm.appendChild(this.renderLayer_(l)); } - } + }) } /** diff --git a/yarn.lock b/yarn.lock index 6a444d2d..d19cbfce 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7739,6 +7739,11 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= +typescript-guid@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/typescript-guid/-/typescript-guid-1.0.3.tgz#d02734e409f66bc4fd3a80aee2a8c5900d6ce3e9" + integrity sha512-8fXm02GoRLKt5o9rIxNM6ayDb+odP2iB6/jpfYUEG2JIJCgtSwHRjCXv8sBx9Np6VasrQsyLv4Ua4xzOmdjkOw== + typescript@5.5.3: version "5.5.3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.3.tgz#e1b0a3c394190838a0b168e771b0ad56a0af0faa"