pub struct PointCluster<M: Clone + Default + Serialize + DeserializeOwned = Properties, S: VectorStore<S2CellId, ClusterPoint<M>> = Vector<S2CellId, ClusterPoint<M>>> { /* private fields */ }Implementations§
Source§impl<M: Clone + Default + Serialize + DeserializeOwned, S: VectorStore<S2CellId, ClusterPoint<M>>> PointCluster<M, S>
impl<M: Clone + Default + Serialize + DeserializeOwned, S: VectorStore<S2CellId, ClusterPoint<M>>> PointCluster<M, S>
Sourcepub fn new(
options: Option<ClusterOptions>,
max_zoom_store: Option<PointIndex<Cluster<M>, S>>,
) -> PointCluster<M, S>
pub fn new( options: Option<ClusterOptions>, max_zoom_store: Option<PointIndex<Cluster<M>, S>>, ) -> PointCluster<M, S>
Create a new point cluster
Sourcepub fn insert(&mut self, id: S2CellId, point: S2Point, data: Option<M>)
pub fn insert(&mut self, id: S2CellId, point: S2Point, data: Option<M>)
Add a point to the maxzoom index. The point is a Point3D
Sourcepub fn insert_point<P: GetXY>(&mut self, point: P, data: Option<M>)
pub fn insert_point<P: GetXY>(&mut self, point: P, data: Option<M>)
Add a lon-lat pair as with any shape
Sourcepub fn insert_lon_lat(&mut self, ll: LonLat<M>)
pub fn insert_lon_lat(&mut self, ll: LonLat<M>)
Add a lon-lat pair to the cluster
Sourcepub fn insert_vector_point(&mut self, ll: VectorPoint<M>)
pub fn insert_vector_point(&mut self, ll: VectorPoint<M>)
Add a lon-lat pair from a vectorPoint to the cluster
Sourcepub fn insert_face_st(&mut self, face: Face, s: f64, t: f64, data: M)
pub fn insert_face_st(&mut self, face: Face, s: f64, t: f64, data: M)
Insert an STPoint to the index
Sourcepub fn insert_reader<T: Clone, F: FeatureReader<T, M, M>>(&mut self, reader: &F)
pub fn insert_reader<T: Clone, F: FeatureReader<T, M, M>>(&mut self, reader: &F)
Add all points from a reader. It will try to use the M-value first, but if it doesn’t exist it will use the feature properties data
Sourcepub fn insert_feature<T: Clone>(&mut self, data: JSONCollection<T, M, M>)
pub fn insert_feature<T: Clone>(&mut self, data: JSONCollection<T, M, M>)
Add a vector feature. It will try to use the M-value first, but if it doesn’t exist it will use the feature properties data
Sourcepub fn build_clusters(&mut self, cmp_: Option<ClusterDataComparitor<M>>)
pub fn build_clusters(&mut self, cmp_: Option<ClusterDataComparitor<M>>)
Build the clusters when done adding points
Trait Implementations§
Source§impl<M: Debug + Clone + Default + Serialize + DeserializeOwned, S: Debug + VectorStore<S2CellId, ClusterPoint<M>>> Debug for PointCluster<M, S>
impl<M: Debug + Clone + Default + Serialize + DeserializeOwned, S: Debug + VectorStore<S2CellId, ClusterPoint<M>>> Debug for PointCluster<M, S>
Auto Trait Implementations§
impl<M, S> Freeze for PointCluster<M, S>
impl<M = Map<String, ValueType>, S = Vector<S2CellId, IndexPoint<Cluster<M>>>> !RefUnwindSafe for PointCluster<M, S>
impl<M, S> Send for PointCluster<M, S>
impl<M = Map<String, ValueType>, S = Vector<S2CellId, IndexPoint<Cluster<M>>>> !Sync for PointCluster<M, S>
impl<M, S> Unpin for PointCluster<M, S>
impl<M = Map<String, ValueType>, S = Vector<S2CellId, IndexPoint<Cluster<M>>>> !UnwindSafe for PointCluster<M, S>
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more