pub struct MapProjectionHandle { /* private fields */ }Expand description
Standalone projection snapshot created from a map transform.
The projection does not retain the source map after creation. It remains thread-affine and must be used and closed on its owner thread.
Implementations§
Source§impl MapProjectionHandle
impl MapProjectionHandle
Sourcepub fn close(self) -> Result<(), HandleOperationError<Self>>
pub fn close(self) -> Result<(), HandleOperationError<Self>>
Explicitly destroys the projection snapshot.
Sourcepub fn camera(&self) -> Result<CameraOptions>
pub fn camera(&self) -> Result<CameraOptions>
Reads the projection helper’s current camera snapshot.
Sourcepub fn set_camera(&self, camera: &CameraOptions) -> Result<()>
pub fn set_camera(&self, camera: &CameraOptions) -> Result<()>
Applies camera fields to this projection helper.
Sourcepub fn set_visible_coordinates(
&self,
coordinates: &[LatLng],
padding: EdgeInsets,
) -> Result<()>
pub fn set_visible_coordinates( &self, coordinates: &[LatLng], padding: EdgeInsets, ) -> Result<()>
Updates the projection camera so coordinates are visible within padding.
Sourcepub fn set_visible_geometry(
&self,
geometry: &Geometry,
padding: EdgeInsets,
) -> Result<()>
pub fn set_visible_geometry( &self, geometry: &Geometry, padding: EdgeInsets, ) -> Result<()>
Updates the projection camera so geometry coordinates are visible.
Sourcepub fn pixel_for_lat_lng(&self, coordinate: LatLng) -> Result<ScreenPoint>
pub fn pixel_for_lat_lng(&self, coordinate: LatLng) -> Result<ScreenPoint>
Converts a geographic world coordinate to a screen point.
Sourcepub fn lat_lng_for_pixel(&self, point: ScreenPoint) -> Result<LatLng>
pub fn lat_lng_for_pixel(&self, point: ScreenPoint) -> Result<LatLng>
Converts a screen point to a geographic world coordinate.
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for MapProjectionHandle
impl !RefUnwindSafe for MapProjectionHandle
impl !Send for MapProjectionHandle
impl !Sync for MapProjectionHandle
impl Unpin for MapProjectionHandle
impl UnsafeUnpin for MapProjectionHandle
impl UnwindSafe for MapProjectionHandle
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more