pub trait Layer: Any {
// Required methods
fn handle_input(
&mut self,
response: &Response,
projection: &MapProjection,
) -> bool;
fn draw(&self, painter: &Painter, projection: &MapProjection);
fn as_any(&self) -> &dyn Any;
fn as_any_mut(&mut self) -> &mut dyn Any;
}Expand description
A trait for map layers.
Required Methods§
Sourcefn handle_input(
&mut self,
response: &Response,
projection: &MapProjection,
) -> bool
fn handle_input( &mut self, response: &Response, projection: &MapProjection, ) -> bool
Handles user input for the layer. Returns true if the input was handled and should not be
processed further by the map.
Sourcefn draw(&self, painter: &Painter, projection: &MapProjection)
fn draw(&self, painter: &Painter, projection: &MapProjection)
Draws the layer.
Sourcefn as_any_mut(&mut self) -> &mut dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
Gets the layer as a mutable dyn Any.