MapConfig

Trait MapConfig 

Source
pub trait MapConfig {
    // Required methods
    fn tile_url(&self, tile: &TileId) -> String;
    fn attribution(&self) -> Option<&String>;
    fn attribution_url(&self) -> Option<&String>;
    fn default_center(&self) -> (f64, f64);
    fn default_zoom(&self) -> u8;
}
Expand description

Configuration for a map provider.

Required Methods§

Source

fn tile_url(&self, tile: &TileId) -> String

Returns the URL for a given tile.

Source

fn attribution(&self) -> Option<&String>

Returns the attribution text to be displayed on the map. If returns None, no attribution is shown.

Source

fn attribution_url(&self) -> Option<&String>

Returns the attribution URL to be linked from the attribution text.

Source

fn default_center(&self) -> (f64, f64)

The default geographical center of the map. (longitude, latitude)

Source

fn default_zoom(&self) -> u8

The default zoom level of the map.

Implementors§