Hi,
I am binding the map to JSON data and want to update particular points on the fly. I see the addItem, setItem and removeItem methods, but they require an index. How do I find the particular index of a data object. I don't see a "rows" method or anything similar through which I can loop.
Thanks in advance
Bill
Hello,
Thanks for your post.
When exactly you want to update this points? When you binding the data, or when you add some items? Please give me more details about your approach.
I'm looking forward your reply.
I want to initially bind some data to the map, then as more data comes in I want to either add, update, or remove points dependent on the data. It is a web app that displays real time data.
You don't need to use igMap for manipulating the dataSource. Every new inserted value in the data will be data.length - 1 position.
You can see this sample of how we bind the real time data to data chart: http://www.igniteui.com/data-chart/binding-real-time-data.
If you mean something different from that what I'm understanding, please send me an isolated working sample with your approach.
I do mean something different.
Suppose I get an initial set of data, say 100 different points. I then get an update to one of those points, I don't know if it was the 3rd or the 5th or the 80th in the original collection. I want to be able to find that point in the maps's data set and update it. I want to avoid having to pass a whole new collection of points over the wire every time just one point needs updating.
In the igGrid, you can "findRecordByKey" or even loop through the rows. I am looking for something similar for the Map.
I hope that makes sense.
I'm understating what you mean now. It seems that there isn't this option in the map. I can advise you to get the dataSource into map: $(".selector").igMap("option", "dataSource");. Than find the current point that you need and to update it.
".selector"
).igMap(
"option"
,
"dataSource"
);. Than find the current point that you need and to update it.
If you have further questions or need further assistance, please feel free to contact us.