SYMapMarker Class Reference

Marker used to display an icon on a geographical position on a map. The map handles proper placement of icons on the screen as well as panning and rotation. To automatically group map objects during zoom in / zoom out, use SYMapPlace. More...

#import <SYMapObjects.h>

Inheritance diagram for SYMapMarker:
Collaboration diagram for SYMapMarker:

Instance Methods

(nonnull instancetype) - initWithCoordinate:image:
 Initializes a SYMapMarker instance with the specified SYGeoCoordinate and UIImage for the displayed image. More...
 
(nonnull instancetype) - initWithCoordinate:image:payload:
 Initializes a SYMapMarker instance with the specified SYGeoCoordinate and UIImage for the displayed image. More...
 
(nonnull instancetype) - initWithScreenPosition:image:
 Initializes a SYMapMarker instance with the specified screen position and UIImage for the displayed image. More...
 
(nonnull instancetype) - initWithScreenPosition:image:payload:
 Initializes a SYMapMarker instance with the specified screen position and UIImage for the displayed image. More...
 

Properties

UIImage * image
 The image displayed at the marker location. More...
 
CGPoint anchorPosition
 The relative CGPoint position of the SYMapMarker from its anchored location. Value of 0,0 is top left location of SYMapMarker, 1,1 is bottom right. Default value is 0.5,0.5. More...
 
CGFloat minZoomLevel
 Minimum zoom level, at which SYMapMarker is displayed. More...
 
CGFloat maxZoomLevel
 Maximum zoom level, at which SYMapMarker is displayed. More...
 
UIEdgeInsets clickableAreaInsets
 Clickable area insets, defined by margin values from SYMapMarker.image size. Zero by default. More...
 
- Properties inherited from SYMapObject
NSInteger tag
 An integer that you can use to identify view objects in your application. Default value is 0. More...
 
SYMapObjectType mapObjectType
 Map object type. See the available SYMapObjectTypes. More...
 
NSUInteger zIndex
 Z-index (stacking order) for the SYMapObject. Objects with the highest value are placed at the top of the stacking order. More...
 
BOOL visibility
 Visibility of the SYMapObject. Can be shown or hidden. More...
 
- Properties inherited from SYViewObject
SYGeoCoordinatecoordinate
 Geographical location of the SYViewObject. The meaning of the location for a particular object depends on that object's type. Objects that don't have a location will return nil. The meaning of the location for certain view objects is as follows: More...
 
CGPoint screenPosition
 Position of the SYViewObject on the screen. More...
 
SYViewObjectType baseType
 Determines which type of this ViewObject it is. More...
 
id< NSCoding > payload
 Optional payload for storing custom data. More...
 

Detailed Description

Marker used to display an icon on a geographical position on a map. The map handles proper placement of icons on the screen as well as panning and rotation. To automatically group map objects during zoom in / zoom out, use SYMapPlace.

Method Documentation

◆ initWithCoordinate:image:

- (nonnull instancetype) initWithCoordinate: (nonnull SYGeoCoordinate *)  coordinate
image: (nonnull UIImage *)  image 

Initializes a SYMapMarker instance with the specified SYGeoCoordinate and UIImage for the displayed image.

◆ initWithCoordinate:image:payload:

- (nonnull instancetype) initWithCoordinate: (nonnull SYGeoCoordinate *)  coordinate
image: (nonnull UIImage *)  image
payload: (nullable id< NSCoding >)  payload 

Initializes a SYMapMarker instance with the specified SYGeoCoordinate and UIImage for the displayed image.

Parameters
payloadOptional data payload that can be stored in SYMapMarker.

◆ initWithScreenPosition:image:

- (nonnull instancetype) initWithScreenPosition: (CGPoint)  screenPosition
image: (nonnull UIImage *)  image 

Initializes a SYMapMarker instance with the specified screen position and UIImage for the displayed image.

◆ initWithScreenPosition:image:payload:

- (nonnull instancetype) initWithScreenPosition: (CGPoint)  screenPosition
image: (nonnull UIImage *)  image
payload: (nullable id< NSCoding >)  payload 

Initializes a SYMapMarker instance with the specified screen position and UIImage for the displayed image.

Parameters
payloadOptional data payload that can be stored in SYMapMarker.

Property Documentation

◆ image

- (UIImage*) image
readwritenonatomicstrong

The image displayed at the marker location.

◆ anchorPosition

- (CGPoint) anchorPosition
readwritenonatomicassign

The relative CGPoint position of the SYMapMarker from its anchored location. Value of 0,0 is top left location of SYMapMarker, 1,1 is bottom right. Default value is 0.5,0.5.

◆ minZoomLevel

- (CGFloat) minZoomLevel
readwritenonatomicassign

Minimum zoom level, at which SYMapMarker is displayed.

◆ maxZoomLevel

- (CGFloat) maxZoomLevel
readwritenonatomicassign

Maximum zoom level, at which SYMapMarker is displayed.

◆ clickableAreaInsets

- (UIEdgeInsets) clickableAreaInsets
readwritenonatomicassign

Clickable area insets, defined by margin values from SYMapMarker.image size. Zero by default.


The documentation for this class was generated from the following file: