public ClusterGenerator(IGpsValueConverter converter, int NumZoomLevels) { this.cachedConvertedObjects = new Dictionary <Object, BasicGeoposition>(); this.keyToItems = new Dictionary <string, IList <Object> >(); this.zoomLevelToClusters = new List <ClusterList>(); this.validItemsToCluster = new ClusterList(); this.gpsConverter = converter; this.numZoomLevels = NumZoomLevels; // This is a 100 pixels for the minimum hitbox length this.MinHitBoxSizeInMiles = GeospatialHelperStatic.ConvertPixelsToMiles(100, NumZoomLevels); this.LeastClustersZoomLevel = 1; this.MostClustersZoomLevel = 1; }
public ClusterGenerator(IGpsValueConverter converter, int NumZoomLevels, double lengthValue, BoxLengthType hitBoxType) { this.cachedConvertedObjects = new Dictionary <Object, BasicGeoposition>(); this.keyToItems = new Dictionary <string, IList <Object> >(); this.zoomLevelToClusters = new List <ClusterList>(); this.validItemsToCluster = new ClusterList(); this.gpsConverter = converter; this.numZoomLevels = NumZoomLevels; if (hitBoxType == BoxLengthType.Distance) { this.MinHitBoxSizeInMiles = lengthValue; } else if (hitBoxType == BoxLengthType.Pixels) { this.MinHitBoxSizeInMiles = GeospatialHelperStatic.ConvertPixelsToMiles(lengthValue, NumZoomLevels); } this.LeastClustersZoomLevel = 1; this.MostClustersZoomLevel = 1; }