Struct galileo::MapBuilder
source · pub struct MapBuilder { /* private fields */ }
Expand description
Builder for a GalileoMap
.
Implementations§
source§impl MapBuilder
impl MapBuilder
sourcepub fn create_raster_tile_layer(
tile_source: impl UrlSource<TileIndex> + 'static,
tile_scheme: TileSchema
) -> RasterTileLayer<UrlImageProvider<TileIndex, FileCacheController>>
pub fn create_raster_tile_layer( tile_source: impl UrlSource<TileIndex> + 'static, tile_scheme: TileSchema ) -> RasterTileLayer<UrlImageProvider<TileIndex, FileCacheController>>
Create a new raster tile layer.
sourcepub fn with_raster_tiles(
self,
tile_source: impl UrlSource<TileIndex> + 'static,
tile_scheme: TileSchema
) -> Self
pub fn with_raster_tiles( self, tile_source: impl UrlSource<TileIndex> + 'static, tile_scheme: TileSchema ) -> Self
Add a new raster layer to the layer list.
sourcepub fn create_vector_tile_layer(
tile_source: impl UrlSource<TileIndex> + 'static,
tile_scheme: TileSchema,
style: VectorTileStyle
) -> VectorTileLayer<ThreadedProvider<UrlDataProvider<TileIndex, VtProcessor, FileCacheController>>>
pub fn create_vector_tile_layer( tile_source: impl UrlSource<TileIndex> + 'static, tile_scheme: TileSchema, style: VectorTileStyle ) -> VectorTileLayer<ThreadedProvider<UrlDataProvider<TileIndex, VtProcessor, FileCacheController>>>
Create a new vector tile layer.
source§impl MapBuilder
impl MapBuilder
sourcepub async fn build(self) -> GalileoMap
pub async fn build(self) -> GalileoMap
Consturct GalileoMap
.
sourcepub fn with_window(self, window: Window) -> Self
pub fn with_window(self, window: Window) -> Self
Use the given window instead of creating a default one.
sourcepub fn with_event_loop(self, event_loop: EventLoop<()>) -> Self
pub fn with_event_loop(self, event_loop: EventLoop<()>) -> Self
Use the given event loop instead of creating a default one.
sourcepub fn center(self, position: GeoPoint2d) -> Self
pub fn center(self, position: GeoPoint2d) -> Self
Set the center of the map.
sourcepub fn resolution(self, resolution: f64) -> Self
pub fn resolution(self, resolution: f64) -> Self
Set the resolution of the map. For explanation about resolution, see MapView::resolution
.
sourcepub fn with_vector_tiles(
self,
tile_source: impl UrlSource<TileIndex> + 'static,
tile_scheme: TileSchema,
style: VectorTileStyle
) -> Self
pub fn with_vector_tiles( self, tile_source: impl UrlSource<TileIndex> + 'static, tile_scheme: TileSchema, style: VectorTileStyle ) -> Self
Add a vector tile layer with the given parameters.
sourcepub fn with_layer(self, layer: impl Layer + 'static) -> Self
pub fn with_layer(self, layer: impl Layer + 'static) -> Self
Add a give layer to the map.
sourcepub fn with_event_handler(
self,
handler: impl Fn(&UserEvent, &mut Map) -> EventPropagation + MaybeSend + MaybeSync + 'static
) -> Self
pub fn with_event_handler( self, handler: impl Fn(&UserEvent, &mut Map) -> EventPropagation + MaybeSend + MaybeSync + 'static ) -> Self
Add an event handler.
Trait Implementations§
Auto Trait Implementations§
impl !Send for MapBuilder
impl !Sync for MapBuilder
impl !RefUnwindSafe for MapBuilder
impl Unpin for MapBuilder
impl !UnwindSafe for MapBuilder
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
§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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&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>
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.