merge method

void merge(
  1. double x,
  2. double y,
  3. double intensity
)

merge weighted lat long value the current WeightedLatLng,

Implementation

void merge(double x, double y, double intensity) {
  var newX = (x * intensity + latLng.longitude * this.intensity) /
      (intensity + this.intensity);
  var newY = (y * intensity + latLng.latitude * this.intensity) /
      (intensity + this.intensity);
  latLng = LatLng(newY, newX);
  this.intensity += intensity;
}