Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- this.SetData = function (data) {
- if (data != null) {
- _data = data;
- var dLength = _data.length,
- iterations = Math.floor(dLength/8),
- leftover = dLength % 8,
- i = 0;
- console.log(dLength, iterations, leftover);
- if (dLength === 0) return;
- while (leftover --){
- //convert the data coordinate into a Location object and store it.
- _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
- i++;
- }
- while (iterations--){
- _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
- i++;
- _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
- i++;
- _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
- i++;
- _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
- i++;
- _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
- i++;
- _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
- i++;
- _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
- i++;
- _data[i]._LatLong = new Microsoft.Maps.Location(_data[i].Latitude, _data[i].Longitude);
- i++;
- };
- } else {
- _data = [];
- }
- cluster();
- };
Add Comment
Please, Sign In to add comment