Search code examples
anychart

Selecting MapPoint via ID


how can I activate a point on the map using the ID of a point?

I thought of something like "series.select(1234)" -> https://api.anychart.com/7.12.0/anychart.core.map.series.Marker#select

But for example this code doesn't select any point on my map:

var series = map.marker(data);
series.select(2359);

Any ideas?


Solution

  • It looks like you've passed the wrong arguments to the select() method. In this case you should pass the array of indexes of the point to select, like

    series.select([0, 1, 4]);
    

    Also, you can take a look at this working example: http://jsfiddle.net/anycharts/4sn65L52/