HERE iOS SDK Developer's Guide

NMAMediaImage

Class Summary

class NMAMediaImage

Derived from: NMAMedia

Represents an image associated with an NMAPlace.

Include: NMAKit.framework/headers/NMAMediaImage.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAMediaImage

[For complete information, see the section Class Details]

See also:

NMAMediaEditorial

NMAMediaReview

NMAMediaRating

Public Property Summary

Table 1. Public Properties
Public Properties

[readable, assign] NSString *  imageSource

The external URL of the image source

[readable, assign] NSString *  uniqueId

The unique identifier of the image

[readable, assign] NMALink user

The details of the user who contributed the image

Instance Method Summary

Table 2. Instance Methods
Instance Method Summary

-(nullable NSString *) URLForImageWithWidth:(NSInteger) width height:(NSInteger) height

Gets a URL for an image with specific width-height dimensions

-(nonnull instancetype) init

Class Method Summary

Table 3. Class Methods
Class Methods

+(nonnull instancetype) new

Class Details

Represents an image associated with an NMAPlace. Images are uploaded by the HERE user community.

See also:

NMAMediaEditorial

NMAMediaReview

NMAMediaRating

Public Property Details

[readable, assign] NSString * imageSource

The external URL of the image source.

[readable, assign] NSString * uniqueId

The unique identifier of the image.

Note:

An ID for an image is optional. Attempts to read this property could return nil.

[readable, assign] NMALinkuser

The details of the user who contributed the image.

Note:

A user-contributor for an image is optional. Attempts to read this property could return nil.

Instance Method Details

-(nullable NSString *) URLForImageWithWidth:(NSInteger) width height:(NSInteger) height

Gets a URL for an image with specific width-height dimensions.

The provided width-height are used as upper boundaries for the dimensions of the returned images. The solution will never scale up small images and will maintain the aspect ratio of the original image.

A URL of image with specific width-height dimensions will not be returned if it has not been queried with NMARequest:addImageSizeWithWidth:height

For example:

image_dimensions=w32-h32,w64-h64
image_dimensions=w32-h32,w300
image_dimensions=h200

Parameters:

  • width

    The image width.

  • height

    The image height.

Returns:

The URL to retrieve the image with the specified width-height dimensions. Can be nil if an image with the specified dimensions is unavailable.

-(nonnull instancetype) init

Instances of this class should not be initialized directly

Class Method Details

+(nonnull instancetype) new

Instances of this class should not be initialized directly