Layer

Trait Layer 

Source
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§

Source

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.

Source

fn draw(&self, painter: &Painter, projection: &MapProjection)

Draws the layer.

Source

fn as_any(&self) -> &dyn Any

Gets the layer as a dyn Any.

Source

fn as_any_mut(&mut self) -> &mut dyn Any

Gets the layer as a mutable dyn Any.

Implementors§