pub struct SymbolLayout {Show 25 fields
pub layer_paint_properties: BTreeMap<String, LayerProperties>,
pub bucket_leader_id: String,
pub symbol_instances: Vec<SymbolInstance>,
pub sort_key_ranges: Vec<SortKeyRange>,
source_layer: Box<SymbolGeometryTileLayer>,
overscaling: f64,
zoom: f64,
canonical_id: CanonicalTileID,
mode: MapMode,
pixel_ratio: f64,
tile_size: u32,
tile_pixel_ratio: f64,
icons_need_linear: bool,
sort_features_by_y: bool,
sort_features_by_key: bool,
allow_vertical_placement: bool,
icons_in_text: bool,
placement_modes: Vec<TextWritingModeType>,
text_size: <TextSize as DataDrivenLayoutProperty>::UnevaluatedType,
icon_size: <IconSize as DataDrivenLayoutProperty>::UnevaluatedType,
text_radial_offset: <TextRadialOffset as DataDrivenLayoutProperty>::UnevaluatedType,
layout: SymbolLayoutProperties_PossiblyEvaluated,
features: Vec<SymbolGeometryTileFeature>,
bidi: BiDi,
compare_text: BTreeMap<U16String, Vec<Anchor>>,
}Expand description
maplibre/maplibre-native#4add9ea original name: SymbolLayout
Fields§
§layer_paint_properties: BTreeMap<String, LayerProperties>§bucket_leader_id: String§symbol_instances: Vec<SymbolInstance>§sort_key_ranges: Vec<SortKeyRange>§source_layer: Box<SymbolGeometryTileLayer>§overscaling: f64§zoom: f64§canonical_id: CanonicalTileID§mode: MapMode§pixel_ratio: f64§tile_size: u32§tile_pixel_ratio: f64§icons_need_linear: bool§sort_features_by_y: bool§sort_features_by_key: bool§allow_vertical_placement: bool§icons_in_text: bool§placement_modes: Vec<TextWritingModeType>§text_size: <TextSize as DataDrivenLayoutProperty>::UnevaluatedType§icon_size: <IconSize as DataDrivenLayoutProperty>::UnevaluatedType§text_radial_offset: <TextRadialOffset as DataDrivenLayoutProperty>::UnevaluatedType§layout: SymbolLayoutProperties_PossiblyEvaluated§features: Vec<SymbolGeometryTileFeature>§bidi: BiDi§compare_text: BTreeMap<U16String, Vec<Anchor>>Implementations§
Source§impl SymbolLayout
impl SymbolLayout
pub const INVALID_OFFSET_VALUE: f64 = 1.7976931348623157E+308f64
Sourcepub fn new(
parameters: &BucketParameters,
layers: &Vec<LayerProperties>,
source_layer: Box<SymbolGeometryTileLayer>,
layout_parameters: &mut LayoutParameters<'_>,
) -> Option<Self>
pub fn new( parameters: &BucketParameters, layers: &Vec<LayerProperties>, source_layer: Box<SymbolGeometryTileLayer>, layout_parameters: &mut LayoutParameters<'_>, ) -> Option<Self>
maplibre/maplibre-native#4add9ea original name: new
Sourcepub fn prepare_symbols(
&mut self,
glyph_map: &BTreeMap<u64, BTreeMap<u16, Option<Glyph>>>,
glyph_positions: &BTreeMap<u64, BTreeMap<u16, GlyphPosition>>,
image_map: &HashMap<String, Image>,
image_positions: &HashMap<String, ImagePosition>,
)
pub fn prepare_symbols( &mut self, glyph_map: &BTreeMap<u64, BTreeMap<u16, Option<Glyph>>>, glyph_positions: &BTreeMap<u64, BTreeMap<u16, GlyphPosition>>, image_map: &HashMap<String, Image>, image_positions: &HashMap<String, ImagePosition>, )
maplibre/maplibre-native#4add9ea original name: prepareSymbols
Sourcepub fn create_bucket(
&self,
_image_positions: HashMap<String, ImagePosition>,
_feature_index: Box<FeatureIndex>,
render_data: &mut HashMap<String, LayerRenderData>,
first_load: bool,
show_collision_boxes: bool,
canonical: &CanonicalTileID,
)
pub fn create_bucket( &self, _image_positions: HashMap<String, ImagePosition>, _feature_index: Box<FeatureIndex>, render_data: &mut HashMap<String, LayerRenderData>, first_load: bool, show_collision_boxes: bool, canonical: &CanonicalTileID, )
maplibre/maplibre-native#4add9ea original name: createBucket
Sourcefn has_symbol_instances(&self) -> bool
fn has_symbol_instances(&self) -> bool
maplibre/maplibre-native#4add9ea original name: hasSymbolInstances
Sourcefn has_dependencies(&self) -> bool
fn has_dependencies(&self) -> bool
maplibre/maplibre-native#4add9ea original name: hasDependencies
Sourcepub fn evaluate_variable_offset(
anchor: SymbolAnchorType,
offset: [f64; 2],
) -> [f64; 2]
pub fn evaluate_variable_offset( anchor: SymbolAnchorType, offset: [f64; 2], ) -> [f64; 2]
@brief Calculates variable text offset.
@param anchor text anchor
@param textOffset Either text-offset or [ text-radial-offset,
INVALID_OFFSET_VALUE ]
@return std::array<f64, 2> offset along x- and y- axis correspondingly.
maplibre/maplibre-native#4add9ea original name: evaluateVariableOffset
Sourcepub fn calculate_tile_distances(
line: &GeometryCoordinates,
anchor: &Anchor,
) -> Vec<f64>
pub fn calculate_tile_distances( line: &GeometryCoordinates, anchor: &Anchor, ) -> Vec<f64>
maplibre/maplibre-native#4add9ea original name: calculateTileDistances
Source§impl SymbolLayout
impl SymbolLayout
Sourcefn add_feature(
&mut self,
layout_feature_index: usize,
feature: &SymbolGeometryTileFeature,
shaped_text_orientations: &ShapedTextOrientations,
shaped_icon: Option<PositionedIcon>,
image_map: &HashMap<String, Image>,
text_offset: [f64; 2],
layout_text_size: f64,
layout_icon_size: f64,
icon_type: SymbolContent,
)
fn add_feature( &mut self, layout_feature_index: usize, feature: &SymbolGeometryTileFeature, shaped_text_orientations: &ShapedTextOrientations, shaped_icon: Option<PositionedIcon>, image_map: &HashMap<String, Image>, text_offset: [f64; 2], layout_text_size: f64, layout_icon_size: f64, icon_type: SymbolContent, )
maplibre/maplibre-native#4add9ea original name: addFeature
Sourcefn anchor_is_too_close(
&mut self,
text: &U16String,
repeat_distance: f64,
anchor: &Anchor,
) -> bool
fn anchor_is_too_close( &mut self, text: &U16String, repeat_distance: f64, anchor: &Anchor, ) -> bool
maplibre/maplibre-native#4add9ea original name: anchorIsTooClose
Sourcefn add_to_debug_buffers(&self, bucket: &mut SymbolBucket)
fn add_to_debug_buffers(&self, bucket: &mut SymbolBucket)
maplibre/maplibre-native#4add9ea original name: addToDebugBuffers
Sourcefn add_symbol(
&self,
buffer: &mut SymbolBucketBuffer,
size_data: Range<f64>,
symbol: &SymbolQuad,
label_anchor: &Anchor,
sort_key: f64,
) -> usize
fn add_symbol( &self, buffer: &mut SymbolBucketBuffer, size_data: Range<f64>, symbol: &SymbolQuad, label_anchor: &Anchor, sort_key: f64, ) -> usize
maplibre/maplibre-native#4add9ea original name: addSymbol
Sourcefn add_symbols(
&self,
buffer: &mut SymbolBucketBuffer,
size_data: Range<f64>,
symbols: &Vec<SymbolQuad>,
label_anchor: &Anchor,
placed_symbol: &mut PlacedSymbol,
sort_key: f64,
) -> usize
fn add_symbols( &self, buffer: &mut SymbolBucketBuffer, size_data: Range<f64>, symbols: &Vec<SymbolQuad>, label_anchor: &Anchor, placed_symbol: &mut PlacedSymbol, sort_key: f64, ) -> usize
maplibre/maplibre-native#4add9ea original name: addSymbols
Sourcefn add_symbol_glyph_quads(
&self,
bucket: &mut SymbolBucket,
symbol_instance: &SymbolInstance,
feature: &SymbolGeometryTileFeature,
writing_mode: WritingModeType,
placed_index: Option<usize>,
glyph_quads: &Vec<SymbolQuad>,
canonical: &CanonicalTileID,
last_added_section: Option<usize>,
) -> (usize, Option<usize>)
fn add_symbol_glyph_quads( &self, bucket: &mut SymbolBucket, symbol_instance: &SymbolInstance, feature: &SymbolGeometryTileFeature, writing_mode: WritingModeType, placed_index: Option<usize>, glyph_quads: &Vec<SymbolQuad>, canonical: &CanonicalTileID, last_added_section: Option<usize>, ) -> (usize, Option<usize>)
maplibre/maplibre-native#4add9ea original name: addSymbolGlyphQuads
Sourcefn update_paint_properties_for_section(
&self,
bucket: &SymbolBucket,
feature: &SymbolGeometryTileFeature,
section_index: usize,
canonical: &CanonicalTileID,
) -> usize
fn update_paint_properties_for_section( &self, bucket: &SymbolBucket, feature: &SymbolGeometryTileFeature, section_index: usize, canonical: &CanonicalTileID, ) -> usize
maplibre/maplibre-native#4add9ea original name: updatePaintPropertiesForSection
Auto Trait Implementations§
impl Freeze for SymbolLayout
impl RefUnwindSafe for SymbolLayout
impl !Send for SymbolLayout
impl !Sync for SymbolLayout
impl Unpin for SymbolLayout
impl UnwindSafe for SymbolLayout
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
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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