Functions

The following functions are available globally.

  • Creates a new HereSDKMapRect from the given origin coordinates and size dimensions.

    Declaration

    Objective-C

    extern HereSDKMapRect HereSDKMapRectMake(double latitude, double longitude,
                                             double width, double height)

    Swift

    func HereSDKMapRectMake(_ latitude: Double, _ longitude: Double, _ width: Double, _ height: Double) -> HereSDKMapRect

    Parameters

    latitude

    The origin coordinate latitude value (latitude of the rectangle’s top-left corner)

    longitude

    The origin coordinate longitude value (longitude of the rectangle’s top-left corner)

    width

    The width of the rectangle in degrees.

    height

    The height of the rectangle in degrees.

    Return Value

    A map rectangle with the specified values.

  • Creates an invalid HereSDKMapRect.

    Declaration

    Objective-C

    extern HereSDKMapRect HereSDKMapRectInvalid()

    Swift

    func HereSDKMapRectInvalid() -> HereSDKMapRect
  • Returns a Boolean value indicating whether the two HereSDKMapRect objects are equal (in both size and location)

    Declaration

    Objective-C

    extern BOOL HereSDKMapRectEqualToRect(HereSDKMapRect rect1,
                                          HereSDKMapRect rect2)

    Swift

    func HereSDKMapRectEqualToRect(_ rect1: HereSDKMapRect, _ rect2: HereSDKMapRect) -> Bool

    Parameters

    rect1

    The first map rectangle.

    rect2

    The second map rectangle.

    Return Value

    YES if the rectangles are exactly the same or NO if the origin point or size values are different.

  • Returns minimum longitude of the specified HereSDKMapRect

    Declaration

    Objective-C

    extern double HereSDKMapRectGetMinLongitude(HereSDKMapRect rect)

    Swift

    func HereSDKMapRectGetMinLongitude(_ rect: HereSDKMapRect) -> Double

    Parameters

    rect

    The rectangle object

    Return Value

    The minimum longitude

  • Returns minimum latitude of the specified HereSDKMapRect

    Declaration

    Objective-C

    extern double HereSDKMapRectGetMinLatitude(HereSDKMapRect rect)

    Swift

    func HereSDKMapRectGetMinLatitude(_ rect: HereSDKMapRect) -> Double

    Parameters

    rect

    The rectangle object

    Return Value

    the minimum latitude

  • Returns the mid-point longitude of the specified HereSDKMapRect

    Declaration

    Objective-C

    extern double HereSDKMapRectGetMidLongitude(HereSDKMapRect rect)

    Swift

    func HereSDKMapRectGetMidLongitude(_ rect: HereSDKMapRect) -> Double

    Parameters

    rect

    The rectangle object

    Return Value

    the The mid-point longitude

  • Returns the midPoint latitude of the specified HereSDKMapRect

    Declaration

    Objective-C

    extern double HereSDKMapRectGetMidLatitude(HereSDKMapRect rect)

    Swift

    func HereSDKMapRectGetMidLatitude(_ rect: HereSDKMapRect) -> Double

    Parameters

    rect

    The rectangle object

    Return Value

    The mid-point latitude

  • Returns maximum longitude of the specified HereSDKMapRect

    Declaration

    Objective-C

    extern double HereSDKMapRectGetMaxLongitude(HereSDKMapRect rect)

    Swift

    func HereSDKMapRectGetMaxLongitude(_ rect: HereSDKMapRect) -> Double

    Parameters

    rect

    The rectangle object

    Return Value

    The maximum longitude

  • Returns maximum latitude of the specified HereSDKMapRect

    Declaration

    Objective-C

    extern double HereSDKMapRectGetMaxLatitude(HereSDKMapRect rect)

    Swift

    func HereSDKMapRectGetMaxLatitude(_ rect: HereSDKMapRect) -> Double

    Parameters

    rect

    The rectangle object

    Return Value

    The maximum latitude

  • Returns the width of the specified HereSDKMapRect

    Declaration

    Objective-C

    extern double HereSDKMapRectGetWidth(HereSDKMapRect rect)

    Swift

    func HereSDKMapRectGetWidth(_ rect: HereSDKMapRect) -> Double

    Parameters

    rect

    The rectangle object

    Return Value

    The rectangle’s width

  • Returns the height of the specified HereSDKMapRect

    Declaration

    Objective-C

    extern double HereSDKMapRectGetHeight(HereSDKMapRect rect)

    Swift

    func HereSDKMapRectGetHeight(_ rect: HereSDKMapRect) -> Double

    Parameters

    rect

    The rectangle object

    Return Value

    The rectangle’s height

  • Returns a Boolean value indicating whether the HereSDKMapRect is valid

    Declaration

    Objective-C

    extern _Bool HereSDKMapRectIsValid(HereSDKMapRect rect)

    Swift

    func HereSDKMapRectIsValid(_ rect: HereSDKMapRect) -> Bool

    Parameters

    rect

    The rectangle object to test

    Return Value

    YES if the rectangle is valid. NO otherwise.

  • Returns CLLocationCoordinate2D that represents the center of the HereSDKMapRect.

    Declaration

    Objective-C

    extern CLLocationCoordinate2D HereSDKMapRectGetCenter(HereSDKMapRect rect)

    Swift

    func HereSDKMapRectGetCenter(_ rect: HereSDKMapRect) -> CLLocationCoordinate2D

    Parameters

    rect

    The rectangle object

    Return Value

    CLLocationCoordinate2D of the center point