### Class

# Shumate Viewport

since: 1.0

#### Description [src]

    final class Shumate.Viewport : GObject.Object
      implements Shumate.Location {
      /* No available fields */
    }

The object holding the coordinate, zoom-level, and rotation state of the current view.

As the object implements `ShumateLocation`, the latitude and longitude are accessible via the interface methods.

Available since: 1.0

#### Ancestors

- GObject

#### Implements

- ShumateLocation

#### Constructors

###### shumate_viewport_new

Creates a new `ShumateViewport`.

since: 1.0

#### Instance methods

###### shumate_viewport_get_max_zoom_level

Get the maximal zoom level.

since: 1.0

###### shumate_viewport_get_min_zoom_level

Get the minimal zoom level.

since: 1.0

###### shumate_viewport_get_reference_map_source

Get the reference map source.

since: 1.0

###### shumate_viewport_get_rotation

Gets the current rotation.

since: 1.0

###### shumate_viewport_get_zoom_level

Get the current zoom level.

since: 1.0

###### shumate_viewport_location_to_widget_coords

Gets the position on `widget` that correspond to the given latitude and longitude.

since: 1.0

###### shumate_viewport_set_max_zoom_level

Set the maximal zoom level.

since: 1.0

###### shumate_viewport_set_min_zoom_level

Set the minimal zoom level.

since: 1.0

###### shumate_viewport_set_reference_map_source

Set the reference map source.

since: 1.0

###### shumate_viewport_set_rotation

Sets the rotation.

since: 1.0

###### shumate_viewport_set_zoom_level

Set the zoom level.

since: 1.0

###### shumate_viewport_widget_coords_to_location

Gets the latitude and longitude corresponding to a position on `widget`.

since: 1.0

##### Methods inherited from GObject (43)

Please see GObject for a full list of methods.

##### Methods inherited from ShumateLocation (4)

###### shumate_location_distance

Calculates the distance in meters between two locations.

unstable since: 1.2

###### shumate_location_get_latitude

Gets the latitude coordinate in degrees.

since: 1.0

###### shumate_location_get_longitude

Gets the longitude coordinate in degrees.

since: 1.0

###### shumate_location_set_location

Sets the coordinates of the location.

since: 1.0

#### Properties

###### Shumate.Viewport:max-zoom-level

The highest allowed level of zoom of the content.

since: 1.0

###### Shumate.Viewport:min-zoom-level

The lowest allowed level of zoom of the content.

since: 1.0

###### Shumate.Viewport:reference-map-source

The reference `ShumateMapSource` being displayed.

since: 1.0

###### Shumate.Viewport:rotation

The rotation of the map view, in radians clockwise from up being due north.

since: 1.0

###### Shumate.Viewport:zoom-level

The level of zoom of the content.

since: 1.0

##### Properties inherited from ShumateLocation (2)

###### ShumateLocation:latitude

The latitude coordonate in degrees.

since: 1.0

###### ShumateLocation:longitude

The longitude coordonate in degrees.

since: 1.0

#### Signals

##### Signals inherited from GObject (1)

###### GObject::notify

The notify signal is emitted on an object when one of its properties has its value set through g_object_set_property(), g_object_set(), et al.

unstable since: 2.0

#### Class structure

    struct ShumateViewportClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`
  No description available.