OverlayItemObject

Objective-C


@interface OverlayItemObject : NSObject

Swift

class OverlayItemObject : NSObject

This class encapsulates overlay item information.

  • Initializes and returns a newly allocated object using the model data.

    Declaration

    Objective-C

    - (nonnull instancetype)initWithModelData:(nonnull void *)data;
  • Returns the model data.

    Declaration

    Objective-C

    - (nonnull void *)getModelData;
  • Returns the unique ID of the item within the overlay.

    Declaration

    Objective-C

    - (NSInteger)getUid;

    Swift

    func getUid() -> Int
  • Returns the parent overlay UID.

    Declaration

    Objective-C

    - (NSInteger)getOverlayUid;

    Swift

    func getOverlayUid() -> Int
  • Get the parent overlay info.

    Declaration

    Objective-C

    - (nullable OverlayInfoObject *)getOverlayInfo;

    Swift

    func getOverlayInfo() -> OverlayInfoObject?
  • Returns the overlay item coordinates.

    Declaration

    Objective-C

    - (nullable CoordinatesObject *)getCoordinates;

    Swift

    func getCoordinates() -> CoordinatesObject?
  • Returns the name of the item.

    Declaration

    Objective-C

    - (nonnull NSString *)getName;

    Swift

    func getName() -> String
  • Returns the image of the item.

    Declaration

    Objective-C

    - (nullable UIImage *)getAspectRatioImage:(CGFloat)height;

    Swift

    func getAspectRatioImage(_ height: CGFloat) -> UIImage?

    Parameters

    height

    The image height in pixels. @details Aspect ratio is taking into consideration. The image is cached after first render.

  • Returns the image of the item.

    Declaration

    Objective-C

    - (nullable UIImage *)getAspectRatioImage:(CGFloat)height
                                        scale:(CGFloat)scale
                                          ppi:(NSInteger)ppi;

    Swift

    func getAspectRatioImage(_ height: CGFloat, scale: CGFloat, ppi: Int) -> UIImage?

    Parameters

    height

    The image height in pixels.

    scale

    The screen scale factor.

    ppi

    The screen pixel per inch. @details Aspect ratio is taking into consideration. The image is cached after first render.

  • Returns the image of the item.

    Declaration

    Objective-C

    - (nullable UIImage *)getImage:(CGSize)size;

    Swift

    func getImage(_ size: CGSize) -> UIImage?

    Parameters

    size

    The image size in pixels.

  • Returns the image of the item.

    Declaration

    Objective-C

    - (nullable UIImage *)getImage:(CGSize)size
                             scale:(CGFloat)scale
                               ppi:(NSInteger)ppi;

    Swift

    func getImage(_ size: CGSize, scale: CGFloat, ppi: Int) -> UIImage?

    Parameters

    size

    The image size in pixels.

    scale

    The screen scale factor.

    ppi

    The screen pixel per inch. @details The image is cached after first render.

  • Returns the preview URL for the item (if any). @details The preview URL may be opened by the UI into a web browser window to present more details to the user about this item.

    Declaration

    Objective-C

    - (nullable NSURL *)getPreviewUrl;

    Swift

    func getPreviewUrl() -> URL?

    Parameters

    webViewSize

    is the size of the web view window.

    Return Value

    empty if the item has no preview URL.

  • Returns the overlay item preview data.

    Declaration

    Objective-C

    - (nonnull NSString *)getPreviewData:(PreviewDataType)type;

    Swift

    func getPreviewData(_ type: PreviewDataType) -> String

    Parameters

    type

    The preview data format.

    Return Value

    The preview data in the given type format.

  • Returns the value for the social report overlay item preview data parameter type.

    Declaration

    Objective-C

    - (nullable NSValue *)searchInPreviewDataSocialReportParameterType:
        (SocialReportParameterType)parameterType;

    Swift

    func search(inPreviewDataSocialReportParameterType parameterType: SocialReportParameterType) -> NSValue?
  • Returns the value for the safety camera overlay item preview data parameter type.

    Declaration

    Objective-C

    - (nullable NSValue *)searchInPreviewDataSafetyCameraParameterType:
        (SafetyCameraParameterType)parameterType;

    Swift

    func search(inPreviewDataSafetyCameraParameterType parameterType: SafetyCameraParameterType) -> NSValue?
  • Check if this type has preview EXTENDED data ( dynamic data that needs to be downloaded ).

    Declaration

    Objective-C

    - (BOOL)hasPreviewExtendedData;

    Swift

    func hasPreviewExtendedData() -> Bool
  • Asynchronous get preview extended data ( dynamic data that needs to be downloaded ) as parameters list.

    Declaration

    Objective-C

    - (void)getPreviewExtendedDataWithCompletionHandler:
        (nonnull void (^)(SearchableParameterListObject *_Nonnull))handler;

    Swift

    func previewExtendedData() async -> SearchableParameterListObject

    Parameters

    parametersList

    The list that will be populated with the preview extended data once it is downloaded.

  • Cancel an asynchronous get preview extended data.

    Declaration

    Objective-C

    - (void)cancelGetPreviewExtendedDataWithCompletionHandler:
        (nonnull void (^)(BOOL))handler;

    Swift

    func cancelGetPreviewExtendedData() async -> Bool
  • Get OverlayItem category id.

    Declaration

    Objective-C

    - (int)getCategoryId;

    Swift

    func getCategoryId() -> Int32

    Return Value

    The overlay category id if exist otherwise 0.

  • Reset cache image.

    Declaration

    Objective-C

    - (void)resetCacheImage;

    Swift

    func resetCacheImage()