Guest User

Untitled

a guest
Jan 4th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. this.SetData = function (data) {
  2. if (data != null) {
  3. _data = data;
  4.  
  5. var dLength = _data.length,
  6. iterations = Math.floor(dLength/8),
  7. leftover = dLength % 8,
  8. i = 0;
  9. console.log(dLength, iterations, leftover);
  10.  
  11. if (dLength === 0) return;
  12. while (leftover --){
  13. //convert the data coordinate into a Location object and store it.
  14. _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
  15. i++;
  16. }
  17. while (iterations--){
  18. _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
  19. i++;
  20. _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
  21. i++;
  22. _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
  23. i++;
  24. _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
  25. i++;
  26. _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
  27. i++;
  28. _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
  29. i++;
  30. _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
  31. i++;
  32. _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
  33. i++;
  34. };
  35. } else {
  36. _data = [];
  37. }
  38.  
  39. cluster();
  40. };
Add Comment
Please, Sign In to add comment