ngx-leaflet-draw icon indicating copy to clipboard operation
ngx-leaflet-draw copied to clipboard

Two-way bind a ngfor list to a featureGroup

Open AndreasSchmid1 opened this issue 7 years ago • 5 comments

I want to create an additional list in angular with basic information about each shape inside the featureGroup (like. length, type, radius and so on).

Is it somehow possible to two way bind both collections? Or do I have to implement it myself with the change events of both collections

Thank you very much in advance.

AndreasSchmid1 avatar Jun 07 '18 13:06 AndreasSchmid1

There's no built-in way to do that right now. It's an interesting idea that might make a good feature request. I'll keep it in mind for the next version.

For now, you'll have to maintain your own collection and sync it with the featureGroup.

reblace avatar Jun 07 '18 21:06 reblace

That would be amazing. When one can two way bind an Angular List to the featureGroup collection. Even more exciting szenarios are possible using RxJS reactive extensions. (For e.g. do a three way binding with a backed database). Really looking forward to this feature!

AndreasSchmid1 avatar Jun 08 '18 11:06 AndreasSchmid1

I am also interested in this feature

tvfire avatar Jul 31 '18 13:07 tvfire

any news on this topic?

AndreasSchmid1 avatar Aug 30 '18 13:08 AndreasSchmid1

I haven't had time or need to do this yet, so it's relatively low on the priority list. PR's are welcome though.

reblace avatar Sep 01 '18 13:09 reblace