bluehalo / ngx-leaflet-draw

MIT License
88 stars 29 forks source link

Two-way bind a ngfor list to a featureGroup #57

Open AndreasSchmid1 opened 6 years ago

AndreasSchmid1 commented 6 years ago

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.

reblace commented 6 years ago

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.

AndreasSchmid1 commented 6 years ago

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!

tvfire commented 6 years ago

I am also interested in this feature

AndreasSchmid1 commented 6 years ago

any news on this topic?

reblace commented 6 years ago

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.