EILLocationPin Class Reference

Inherits from NSObject
Conforms to NSCoding
Declared in EILLocationPin.h
EILLocationPin.m

Overview

Represents a physical objects inside location like landmarks or points of interests.

Properties

  name

Name of the location pin.

@property (nonatomic, strong, readonly) NSString *name

Declared In

EILLocationPin.h

  type

Type of the location pin.

@property (nonatomic, strong, readonly) NSString *type

Declared In

EILLocationPin.h

  identifier

Identifier of the location pin.

@property (nonatomic, readonly) NSNumber *identifier

Declared In

EILLocationPin.h

  position

Postion of the pin inside a location.

@property (nonatomic, strong, readonly) EILOrientedPoint *position

Declared In

EILLocationPin.h

Creating and Initializing

– initWithName:type:identifier:position:

Class constructor.

- (instancetype)initWithName:(NSString *)name type:(NSString *)type identifier:(nullable NSNumber *)identifier position:(EILOrientedPoint *)position

Parameters

name

of the pin.

type

of the pin.

identifier

of the pin.

position

of the pin.

Return Value

A new location pin.

Declared In

EILLocationPin.h

– locationPinTranslatedBydX:dY:

Translates the location pin by a given vector (dX, dY) and returns a new pin.

- (instancetype)locationPinTranslatedBydX:(double)dX dY:(double)dY

Parameters

dX

Value of translation on X axis.

dY

Value of translation on Y axis.

Return Value

A new location pin translated by (dX, dY).

Declared In

EILLocationPin.h

Serialization

+ locationPinFromDictionary:

Deserializes a location pin from NSDictionary.

+ (nullable EILLocationPin *)locationPinFromDictionary:(NSDictionary *)dict

Parameters

dict

NSDictionary to deserialize from.

Return Value

A location pin created from NSDictionary.

Declared In

EILLocationPin.h

– toDictionary

Serializes the point to NSDictionary.

- (NSDictionary *)toDictionary

Return Value

A location pin representation in NSDictionary.

Declared In

EILLocationPin.h

Encoding and Decoding

– initWithCoder:

Returns a location initialized from data in a given unarchiver.

- (nullable instancetype)initWithCoder:(NSCoder *)decoder

Parameters

decoder

An unarchiver object.

Return Value

A new location initialized using the data in decoder.

Declared In

EILLocationPin.h

– encodeWithCoder:

Encodes the location using a given archiver.

- (void)encodeWithCoder:(NSCoder *)coder

Parameters

An

archiver object.

Declared In

EILLocationPin.h