0

i'm refreshing an array of markers every 5 seconds using the setInterval function. I need to compare the two arrays (before/after the refresh) in order to select which markers will be added (or removed) to the map. Is there any efficent way to do it (beyond the classical approach of two chained for loops)?

Deleting all markers before the refresh is automatically closing the infowindow (which is not desirable).

thanks

1 Answers1

0

Refer this discussion JavaScript array difference .i think Joshaven Potters answer gives solution for u.

Community
  • 1
  • 1
lintu
  • 1,092
  • 11
  • 24