### Class

# Shumate Viewport

#### 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.

#### Hierarchy

#### Ancestors

- GObject

#### Implements

- ShumateLocation

#### Constructors

###### shumate_viewport_new

Creates a new `ShumateViewport`.

#### Instance methods

###### shumate_viewport_get_max_zoom_level

Get the maximal zoom level.

###### shumate_viewport_get_min_zoom_level

Get the minimal zoom level.

###### shumate_viewport_get_reference_map_source

Get the reference map source.

###### shumate_viewport_get_rotation

Gets the current rotation.

###### shumate_viewport_get_zoom_level

Get the current zoom level.

###### shumate_viewport_location_to_widget_coords

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

###### shumate_viewport_set_max_zoom_level

Set the maximal zoom level.

###### shumate_viewport_set_min_zoom_level

Set the minimal zoom level.

###### shumate_viewport_set_reference_map_source

Set the reference map source.

###### shumate_viewport_set_rotation

Sets the rotation.

###### shumate_viewport_set_zoom_level

Set the zoom level.

###### shumate_viewport_widget_coords_to_location

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

##### 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.

since: 1.2

###### shumate_location_get_latitude

Gets the latitude coordinate in degrees.

###### shumate_location_get_longitude

Gets the longitude coordinate in degrees.

###### shumate_location_set_location

Sets the coordinates of the location.

#### Properties

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

The highest allowed level of zoom of the content.

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

The lowest allowed level of zoom of the content.

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

The reference `ShumateMapSource` being displayed.

###### Shumate.Viewport:rotation

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

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

The level of zoom of the content.

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

###### ShumateLocation:latitude

The latitude coordonate in degrees.

###### ShumateLocation:longitude

The longitude coordonate in degrees.

#### Signals

###### Shumate.Viewport::changed

Emitted when the viewport position (location, zoom, rotation, etc.) changes. Changes to multiple properties at once may be combined into a single signal emission.

since: 1.6

##### 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.

#### Class structure

    struct ShumateViewportClass {
      GObjectClass parent_class;

    }

No description available.

###### Class members

`parent_class: GObjectClass`

  No description available.