AnteaterKit / angular2-yandex-maps

Angular 2 components Yandex Maps.
27 stars 23 forks source link

как обновить маркеры? #22

Open martrix78 opened 6 years ago

martrix78 commented 6 years ago

например рядом с картой у меня список маркеров, по клику на элементе списка я меняю свойство preset. в элементе оно меняется, а на карте нет. как перерисовать маркер? selectItem(marker){ var index = this.poi.indexOf(marker, 0); if (this.poi[index].select){ this.poi[index].preset = 'islands#blueDotIcon'; }else{ this.poi[index].preset = 'islands#redDotIcon'; } this.poi[index].select = !this.poi[index].select; }