HERE Android SDK Developer's Guide

MapState

The class MapState is a member of com.here.android.mpa.mapping .

Class Summary

public final class MapState

   implements android.os.Parcelable

extends java.lang.Object

Represents a composite class comprised of tilt, orientation, zoom level and center point for a Map.

[For complete information, see the section Class Details]

Constructor Summary

Table 1. Constructors in MapState
Constructors

MapState (float tilt, float orientation, double zoomLevel, GeoCoordinate center)

A constructor that initializes state values for tilt, orientation, zoom level, and map center.

Field Summary

Table 2. Fields in MapState
Fields

public static final android.os.Parcelable.Creator <MapState> CREATOR

Method Summary

Table 3. Methods in MapState
Methods

public int describeContents ()

For documentation, see android.os.Parcelable.describeContents()

public GeoCoordinate getCenter ()

Returns the GeoCoordinate representing the center position.

public float getOrientation ()

Returns the orientation, in degrees relative to true-north (which is designated as being an orientation of 0 degrees).

public float getTilt ()

Returns the tilt, in degrees.

public double getZoomLevel ()

Returns the zoom level.

public void writeToParcel (Parcel dest, int flags)

For documentation, see android.os.Parcelable.writeToParcel()

Class Details

Represents a composite class comprised of tilt, orientation, zoom level and center point for a Map.

Constructor Details

MapState (float tilt, float orientation, double zoomLevel, GeoCoordinate center)

A constructor that initializes state values for tilt, orientation, zoom level, and map center.

Parameters:

  • tilt

    tilt value, in degrees

  • orientation

    orientation value, in degrees, where true-north is 0 degrees

  • zoomLevel

    zoom level value

  • center

    A GeoCoordinate representing the center of the map

See also:

setZoomLevel(double)

Field Details

public static final android.os.Parcelable.Creator <MapState> CREATOR

Method Details

public int describeContents ()

For documentation, see android.os.Parcelable.describeContents()

public GeoCoordinate getCenter ()

Returns the GeoCoordinate representing the center position.

Returns:

The center position GeoCoordinate

public float getOrientation ()

Returns the orientation, in degrees relative to true-north (which is designated as being an orientation of 0 degrees).

Returns:

orientation, in degrees relative to true-north

public float getTilt ()

Returns the tilt, in degrees.

Returns:

tilt, in degrees

public double getZoomLevel ()

Returns the zoom level.

Returns:

zoom level

public void writeToParcel (Parcel dest, int flags)

For documentation, see android.os.Parcelable.writeToParcel()

Parameters:

  • dest
  • flags