I have a simple google maps view which is a CollectionView and has a contentBinding to an array controller. Every time I set the content to a new set of objects by setting it to a new array the CollectionView which has the maps on is removed from the DOM. However, If I push objects to content it will work fine. I need to reset the content with a new array of data though as it will be coming from an API. Can someone please tell me why this is happening I've been trying to solve this for a good day now.

Here is a jsbin. You can uncomment the code within the 'refresh' method that I've described above to see it working / failing.

有帮助吗?

解决方案

Finally, I've found a solution. I created a ember component which applies the goole maps view to its self and then within the components view template add the collection view for the markers. Now I can refresh the data without it removing the google maps view. Please see this jsbin to see it working

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top