pub trait MapSourceExt: IsA<MapSource> + 'static {
Show 35 methods
// Provided methods
fn fill_tile_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
tile: &Tile,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
) { ... }
fn fill_tile_future(
&self,
tile: &Tile,
) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>> { ... }
fn column_count(&self, zoom_level: u32) -> u32 { ... }
fn id(&self) -> Option<GString> { ... }
fn latitude(&self, zoom_level: f64, y: f64) -> f64 { ... }
fn license(&self) -> Option<GString> { ... }
fn license_uri(&self) -> Option<GString> { ... }
fn longitude(&self, zoom_level: f64, x: f64) -> f64 { ... }
fn max_zoom_level(&self) -> u32 { ... }
fn meters_per_pixel(
&self,
zoom_level: f64,
latitude: f64,
longitude: f64,
) -> f64 { ... }
fn min_zoom_level(&self) -> u32 { ... }
fn name(&self) -> Option<GString> { ... }
fn projection(&self) -> MapProjection { ... }
fn row_count(&self, zoom_level: u32) -> u32 { ... }
fn tile_size(&self) -> u32 { ... }
fn tile_size_at_zoom(&self, zoom_level: f64) -> f64 { ... }
fn x(&self, zoom_level: f64, longitude: f64) -> f64 { ... }
fn y(&self, zoom_level: f64, latitude: f64) -> f64 { ... }
fn set_id(&self, id: &str) { ... }
fn set_license(&self, license: &str) { ... }
fn set_license_uri(&self, license_uri: &str) { ... }
fn set_max_zoom_level(&self, zoom_level: u32) { ... }
fn set_min_zoom_level(&self, zoom_level: u32) { ... }
fn set_name(&self, name: &str) { ... }
fn set_projection(&self, projection: MapProjection) { ... }
fn set_tile_size(&self, tile_size: u32) { ... }
fn connect_modified<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId { ... }
fn connect_license_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_license_uri_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_max_zoom_level_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_min_zoom_level_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_name_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_projection_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
fn connect_tile_size_notify<F: Fn(&Self) + 'static>(
&self,
f: F,
) -> SignalHandlerId { ... }
}Expand description
Provided Methods§
Sourcefn fill_tile_async<P: FnOnce(Result<(), Error>) + 'static>(
&self,
tile: &Tile,
cancellable: Option<&impl IsA<Cancellable>>,
callback: P,
)
fn fill_tile_async<P: FnOnce(Result<(), Error>) + 'static>( &self, tile: &Tile, cancellable: Option<&impl IsA<Cancellable>>, callback: P, )
fn fill_tile_future( &self, tile: &Tile, ) -> Pin<Box_<dyn Future<Output = Result<(), Error>> + 'static>>
Sourcefn column_count(&self, zoom_level: u32) -> u32
fn column_count(&self, zoom_level: u32) -> u32
Sourcefn license_uri(&self) -> Option<GString>
fn license_uri(&self) -> Option<GString>
Sourcefn max_zoom_level(&self) -> u32
fn max_zoom_level(&self) -> u32
Sourcefn min_zoom_level(&self) -> u32
fn min_zoom_level(&self) -> u32
Sourcefn projection(&self) -> MapProjection
fn projection(&self) -> MapProjection
Sourcefn tile_size(&self) -> u32
fn tile_size(&self) -> u32
Gets map source’s tile size.
§Returns
the tile’s size (width and height) in pixels for this map source
Sourcefn tile_size_at_zoom(&self, zoom_level: f64) -> f64
fn tile_size_at_zoom(&self, zoom_level: f64) -> f64
Gets the apparent size of the map tiles at the given fractional zoom level.
As the map is zoomed in, a tile gets bigger and bigger until, at the next integer zoom level, it “splits” into four tiles at the next zoom level. Thus, the size increase follows an exponential curve, base 2.
§zoom_level
a zoom level
§Returns
the tile’s size (width and height) in pixels for this map source at this zoom level
Sourcefn set_license(&self, license: &str)
fn set_license(&self, license: &str)
Sourcefn set_license_uri(&self, license_uri: &str)
fn set_license_uri(&self, license_uri: &str)
Sourcefn set_max_zoom_level(&self, zoom_level: u32)
fn set_max_zoom_level(&self, zoom_level: u32)
Sourcefn set_min_zoom_level(&self, zoom_level: u32)
fn set_min_zoom_level(&self, zoom_level: u32)
Sourcefn set_projection(&self, projection: MapProjection)
fn set_projection(&self, projection: MapProjection)
Sourcefn set_tile_size(&self, tile_size: u32)
fn set_tile_size(&self, tile_size: u32)
Sourcefn connect_modified<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_modified<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
Emitted when the source is modified in such a way that tiles previously filled by it should be refreshed.
It is the MapSource implementation’s responsibility to emit this signal when appropriate, such as when a
data source or rendering parameter changes.
fn connect_id_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_license_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_license_uri_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_max_zoom_level_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_min_zoom_level_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_name_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId
fn connect_projection_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
fn connect_tile_size_notify<F: Fn(&Self) + 'static>( &self, f: F, ) -> SignalHandlerId
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".