Struct staticmap::StaticMapBuilder[][src]

pub struct StaticMapBuilder { /* fields omitted */ }

Builder for StaticMap.

Implementations

impl StaticMapBuilder[src]

pub fn width(&mut self, value: u32) -> &mut Self[src]

Image width in pixels. Default is 300.

pub fn height(&mut self, value: u32) -> &mut Self[src]

Image height in pixels. Default is 300.

pub fn padding(&mut self, value: (u32, u32)) -> &mut Self[src]

Minimal distance between map features and map border in pixels. Given as a tuple of (x, y). Default is (0, 0).

pub fn zoom(&mut self, value: u8) -> &mut Self[src]

Map zoom, usually between 1-17. Default is calculated based on features if not specified.

pub fn lat_center(&mut self, value: f64) -> &mut Self[src]

Latitude center of map. Default is calculated based on features if not specified.

pub fn lon_center(&mut self, value: f64) -> &mut Self[src]

Longitude center of map. Default is calculated based on features if not specified.

pub fn url_template<VALUE: Into<String>>(&mut self, value: VALUE) -> &mut Self[src]

URL template. e.g. “https://a.tile.osm.org/{z}/{x}/{y}.png”. Default is used if not specified.

pub fn tile_size(&mut self, value: u32) -> &mut Self[src]

Tile size. Default is 256.

pub fn build(&self) -> Result<StaticMap, String>[src]

Builds a new StaticMap.

Errors

If a required field has not been initialized.

Trait Implementations

impl Clone for StaticMapBuilder[src]

impl Default for StaticMapBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Pointable for T

type Init = T

The type for initializers.

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.