Commit dcf9418304f08416fcbed0ff3589e47d38ebc387

Authored by Igor Kulikov
1 parent b80544a3

UI: fix maps update

... ... @@ -307,11 +307,11 @@ export default abstract class LeafletMap {
307 307 keys.push(data.entityName);
308 308 });
309 309 const toDelete: string[] = [];
310   - for (const mKey in this.markers.keys()) {
  310 + this.markers.forEach((v, mKey) => {
311 311 if (!keys.includes(mKey)) {
312 312 toDelete.push(mKey);
313 313 }
314   - }
  314 + });
315 315 toDelete.forEach((key) => {
316 316 this.deleteMarker(key);
317 317 });
... ... @@ -408,11 +408,11 @@ export default abstract class LeafletMap {
408 408 }
409 409 });
410 410 const toDelete: string[] = [];
411   - for (const mKey in this.polylines.keys()) {
  411 + this.polylines.forEach((v, mKey) => {
412 412 if (!keys.includes(mKey)) {
413 413 toDelete.push(mKey);
414 414 }
415   - }
  415 + });
416 416 toDelete.forEach((key) => {
417 417 this.removePolyline(key);
418 418 });
... ... @@ -471,11 +471,11 @@ export default abstract class LeafletMap {
471 471 }
472 472 });
473 473 const toDelete: string[] = [];
474   - for (const mKey in this.polygons.keys()) {
  474 + this.polygons.forEach((v, mKey) => {
475 475 if (!keys.includes(mKey)) {
476 476 toDelete.push(mKey);
477 477 }
478   - }
  478 + });
479 479 toDelete.forEach((key) => {
480 480 this.removePolygon(key);
481 481 });
... ...
... ... @@ -714,9 +714,8 @@ export class WidgetConfigComponent extends PageComponent implements OnInit, Cont
714 714 }
715 715
716 716 private fetchEntityKeys(entityAliasId: string, query: string, dataKeyTypes: Array<DataKeyType>): Observable<Array<DataKey>> {
717   - return this.aliasController.getAliasInfo(entityAliasId).pipe(
718   - mergeMap((aliasInfo) => {
719   - const entity = aliasInfo.currentEntity;
  717 + return this.aliasController.resolveSingleEntityInfo(entityAliasId).pipe(
  718 + mergeMap((entity) => {
720 719 if (entity) {
721 720 const fetchEntityTasks: Array<Observable<Array<DataKey>>> = [];
722 721 for (const dataKeyType of dataKeyTypes) {
... ...