Struct Geo

Source
pub struct Geo<'a> { /* private fields */ }

Implementations§

Source§

impl<'a> Geo<'a>

Source

pub fn domain(&mut self) -> &mut Domain<'a>

Source

pub fn fitbounds(&mut self, fitbounds: Fitbounds) -> &mut Self

Determines if this subplot’s view settings are auto-computed to fit trace data. On scoped maps, setting fitbounds leads to center.lon and center.lat getting auto-filled. On maps with a non-clipped projection, setting fitbounds leads to center.lon, center.lat, and projection.rotation.lon getting auto-filled. On maps with a clipped projection, setting fitbounds leads to center.lon, center.lat, projection.rotation.lon, projection.rotation.lat, lonaxis.range and lonaxis.range getting auto-filled. If locations, only the trace’s visible locations are considered in the fitbounds computations. If geojson, the entire trace input geojson (if provided) is considered in the fitbounds computations, Defaults to false.

default: false

Source

pub fn resolution(&mut self, resolution: Resolution) -> &mut Self

Sets the resolution of the base layers. The values have units of km/mm e.g. 110 corresponds to a scale ratio of 1:110,000,000.

default: 110

Source

pub fn scope(&mut self, scope: Scope) -> &mut Self

Set the scope of the map.

default: world

Source

pub fn projection(&mut self) -> &mut Projection<'a>

Source

pub fn center(&mut self) -> &mut Center

Source

pub fn visible(&mut self, visible: bool) -> &mut Self

Sets the default visibility of the base layers.

default: true

Source

pub fn showcoastlines(&mut self, showcoastlines: bool) -> &mut Self

Sets whether or not the coastlines are drawn.

Source

pub fn coastlinecolor(&mut self, coastlinecolor: &'a str) -> &mut Self

Sets the coastline color.

default: #444

Source

pub fn coastlinewidth(&mut self, coastlinewidth: f64) -> &mut Self

Sets the coastline stroke width (in px).

default: 1

Source

pub fn showland(&mut self, showland: bool) -> &mut Self

Sets whether or not land masses are filled in color.

default: false

Source

pub fn landcolor(&mut self, landcolor: &'a str) -> &mut Self

Sets the land mass color.

default: #F0DC82

Source

pub fn showocean(&mut self, showocean: bool) -> &mut Self

Sets whether or not oceans are filled in color.

default: false

Source

pub fn oceancolor(&mut self, oceancolor: &'a str) -> &mut Self

Sets the ocean color

default: #3399FF

Source

pub fn showlakes(&mut self, showlakes: bool) -> &mut Self

Sets whether or not lakes are drawn.

default: false

Source

pub fn lakecolor(&mut self, lakecolor: &'a str) -> &mut Self

Sets the color of the lakes.

default: #3399FF

Source

pub fn showrivers(&mut self, showrivers: bool) -> &mut Self

Sets whether or not rivers are drawn.

default: false

Source

pub fn rivercolor(&mut self, rivercolor: &'a str) -> &mut Self

Sets color of the rivers.

default: #3399FF

Source

pub fn riverwidth(&mut self, riverwidth: f64) -> &mut Self

Sets the stroke width (in px) of the rivers.

default: 1

Source

pub fn showcountries(&mut self, showcountries: bool) -> &mut Self

Sets whether or not country boundaries are drawn.

Source

pub fn countrycolor(&mut self, countrycolor: &'a str) -> &mut Self

Sets line color of the country boundaries.

default: #444

Source

pub fn countrywidth(&mut self, countrywidth: f64) -> &mut Self

Sets line width (in px) of the country boundaries.

default: 1

Source

pub fn showsubunits(&mut self, showsubunits: bool) -> &mut Self

Sets whether or not boundaries of subunits within countries (e.g. states, provinces) are drawn.

Source

pub fn subunitcolor(&mut self, subunitcolor: &'a str) -> &mut Self

Sets the color of the subunits boundaries.

default: #444

Source

pub fn subunitwidth(&mut self, subunitwidth: f64) -> &mut Self

Sets the stroke width (in px) of the subunits boundaries.

default: 1

Source

pub fn showframe(&mut self, showframe: bool) -> &mut Self

Sets whether or not a frame is drawn around the map.

Source

pub fn framecolor(&mut self, framecolor: &'a str) -> &mut Self

Sets the color the frame.

default: #444

Source

pub fn framewidth(&mut self, framewidth: f64) -> &mut Self

Sets the stroke width (in px) of the frame.

default: 1

Source

pub fn bgcolor(&mut self, bgcolor: &'a str) -> &mut Self

Set the background color of the map

default: #fff

Source

pub fn lonaxis(&mut self) -> &mut Lonaxis<'a>

Source

pub fn lataxis(&mut self) -> &mut Lataxis<'a>

Source

pub fn uirevision(&mut self, uirevision: Any) -> &mut Self

Controls persistence of user-driven changes in the view (projection and center). Defaults to layout.uirevision.

Trait Implementations§

Source§

impl<'a> Default for Geo<'a>

Source§

fn default() -> Geo<'a>

Returns the “default value” for a type. Read more
Source§

impl<'a> Serialize for Geo<'a>

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for Geo<'a>

§

impl<'a> RefUnwindSafe for Geo<'a>

§

impl<'a> Send for Geo<'a>

§

impl<'a> Sync for Geo<'a>

§

impl<'a> Unpin for Geo<'a>

§

impl<'a> UnwindSafe for Geo<'a>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.