pub struct SuperclusterOptions {
pub min_zoom: usize,
pub max_zoom: usize,
pub min_points: usize,
pub radius: f64,
pub extent: f64,
pub node_size: usize,
}
Expand description
Options for Supercluster generation
Fields§
§min_zoom: usize
Minimum zoom level at which clusters are generated.
Defaults to 0
.
max_zoom: usize
Maximum zoom level at which clusters are generated.
Defaults to 16
.
min_points: usize
Minimum number of points to form a cluster.
Defaults to 2
.
radius: f64
Cluster radius, in pixels.
Defaults to 40
.
extent: f64
Tile extent. Radius is calculated relative to this value.
Defaults to 512
.
node_size: usize
Size of the KD-tree leaf node. Affects performance.
Defaults to 64
.
Implementations§
Source§impl SuperclusterOptions
impl SuperclusterOptions
pub fn new() -> Self
pub fn with_min_zoom(self, min_zoom: usize) -> Self
pub fn with_max_zoom(self, max_zoom: usize) -> Self
pub fn with_min_points(self, min_points: usize) -> Self
pub fn with_radius(self, radius: f64) -> Self
pub fn with_extent(self, extent: f64) -> Self
pub fn with_node_size(self, node_size: usize) -> Self
Trait Implementations§
Source§impl Clone for SuperclusterOptions
impl Clone for SuperclusterOptions
Source§fn clone(&self) -> SuperclusterOptions
fn clone(&self) -> SuperclusterOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for SuperclusterOptions
impl Debug for SuperclusterOptions
Source§impl Default for SuperclusterOptions
impl Default for SuperclusterOptions
impl Copy for SuperclusterOptions
Auto Trait Implementations§
impl Freeze for SuperclusterOptions
impl RefUnwindSafe for SuperclusterOptions
impl Send for SuperclusterOptions
impl Sync for SuperclusterOptions
impl Unpin for SuperclusterOptions
impl UnwindSafe for SuperclusterOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more