Structures

The following structures are available globally.

  • The Analytics class is for sending analytics data to the Mappedin CMS. Some analytics events are fired automatically, but you are responsible for sending selectedLocation and selectedCategory, and they should also be fired in other parts of your app, even when the Map is not visible. This will make Smart Search work better for your venues

    See more

    Declaration

    Swift

    public struct Analytics
  • A BinaryDecoder holds a buffer and allows for extraction of values from said buffer. This keeps track of what has been read from the buffer, and what is still pending for reading to allow the buffer to be read like a tape.

    This is a required component to make the Deserializable protocol work. Currently, defining a custom Location types requires some exposure of this object. This should only be interacted with by the generated code delivered to you from your Mappedin rep.

    See more

    Declaration

    Swift

    public struct BinaryDecoder
  • Representation of a 2D Vector

    See more

    Declaration

    Swift

    public struct Vector2 : Deserializable
  • Representation of a 3D Vector

    See more

    Declaration

    Swift

    public struct Vector3 : Deserializable
    extension Vector3: Position
    extension Vector3: Focusable
    extension Vector3: Equatable
  • A Directions object will contain an array of Coordinate objects on a path, and a corresponding list of Instruction objects representing the instructions to display to the user.

    See more

    Declaration

    Swift

    public struct Directions
  • An ImageSet is a collection of image URLs corresponding to different resizes of the same base image. These resizes are done by the Mappedin CMS, and you will get an image that is equal or the next step bigger than the size you specified, if available.

    See more

    Declaration

    Swift

    public struct ImageSet : Deserializable
  • The Camera bounds defines constraints that can be applied to the user’s touch movements. This is used to stop keep the camera focused on the venue as a whole.

    Camera Bounds

    This diagram shows how the camera is constrained. The camera projects a ray that intersects with a 2D plane (xy), the plane height (z) is always 0 in the map coordinate space.

    This point on the plane will always kept within a circle that is defined from the center point and the radius of the circle is set with the radius variable.

    The camera itself can be outside of the circle, but what it is focusing on will always lie within this region.

    The hight adjustment specifics how far up or down the Camera can be from the map. Zooming in or out is achieved in the SDK by moving the camera closer or further away from the center of view. So the field of view is always fixed with our camera.

    When the camera exceeds the bounds, a hard stop is used to force the camera to be constrained looking at the map. For the center of view, this is done by moving the camera along the plane until it distance is one radius away. Then the height bounds is applied. This is done such that the camera’s distance away from it’s center of view is scaled to keep the max height and min height constraints satisfied.

    See more

    Declaration

    Swift

    public struct CameraBounds
  • A FocusPoints is a collection of one or more Focusable objects. It is used internally in the API and is not intended to be created by the API users themselves. A number of objects implement this Focusable protocol.

    Declaration

    Swift

    public struct FocusPoints
  • A PhoneNumber is a simple collection of a number and extension for a venue or location

    See more

    Declaration

    Swift

    public struct PhoneNumber : Deserializable
  • A single search result from a search query

    See more

    Declaration

    Swift

    public struct SearchResult
  • Contains information on how a search query pagination occurred This can be used if we need to expand our results.

    See more

    Declaration

    Swift

    public struct SearchPagination
  • An entry from the getVenues call. It can be used to uniquely identify a Venue and fetch it the Mappedin servers using the getVenue call.

    See more

    Declaration

    Swift

    public struct VenueListing