SYMapPlaceCategory Class Reference

SYMapPlaceCategory contains visual style properties of the places belonging to this category. More...

#import <SYMapPlace.h>

Inheritance diagram for SYMapPlaceCategory:
Collaboration diagram for SYMapPlaceCategory:

Instance Methods

(nonnull instancetype) - initWithId:
 Initializes the category only with its identifier. Use properties to adjust the category later. Note that description text won't be shown if an image is not set. More...
 
(nonnull instancetype) - initWithId:backgroundNinepatchImage:backgroundImageAnchor:textStyle:image:
 Initializes the category appearance with background image and content (text and optional image) on top of it. More...
 
(nonnull instancetype) - initWithId:image:imageAnchor:textStyle:textPlacement:
 Initializes the category appearance with an image and text. More...
 
((unavailable("Use init with parameters instead.") - __attribute__
 

Class Methods

((unavailable("Use init with parameters instead.") + __attribute__
 

Properties

NSString * categoryId
 A category identifier. It's recommended to use SYPlaceCategory values, but technically you can use any string as a category identifier. More...
 
SYMapPlaceBackgroundStylebackground
 Describes the background part of the place appearance. If nil, the background image is not shown. More...
 
SYMapPlaceTextStyledescriptionStyle
 Describes how the description text looks like. The description will be shown if at least one image property is set: background and/or imageStyle. If the category defines a cluster for grouping other categories, the style is used to show the number of grouped objects in a cluster. If nil, a default font will be used. More...
 
SYMapPlaceImageStyleimageStyle
 Contains an image and its settings. If nil, the image is not shown. More...
 
NSString * clusterId
 An identifier of the category containing cluster style specification. If this property is empty, places of this category won't be clustered. The cluster category defines visual appearance of the clusters the same way as place categories. More...
 
CGFloat zoomLimit
 Zoom limit for the place, if the map zoom is less than this property (the camera distance is larger), the place won't be visible. More...
 

Detailed Description

SYMapPlaceCategory contains visual style properties of the places belonging to this category.

Method Documentation

◆ initWithId:

- (nonnull instancetype) initWithId: (nonnull NSString *)  categoryId

Initializes the category only with its identifier. Use properties to adjust the category later. Note that description text won't be shown if an image is not set.

◆ initWithId:backgroundNinepatchImage:backgroundImageAnchor:textStyle:image:

- (nonnull instancetype) initWithId: (nonnull NSString *)  categoryId
backgroundNinepatchImage: (nonnull UIImage *)  backgroundImage
backgroundImageAnchor: (CGPoint)  backgroundImageAnchor
textStyle: (nullable SYMapObjectTextStyle *)  textStyle
image: (nullable UIImage *)  image 

Initializes the category appearance with background image and content (text and optional image) on top of it.

Parameters
backgroundNinepatchImageA nine-patch image to be set as a background. Must be in nine-patch format. It will be automatically resized according to content size.
backgroundImageAnchorA relative point on the background image, which is connected to the map coordinate of the place. For details, see SYMapPlaceBackgroundStyle.anchor.
textStyleA text style for the place description text. If nil, the default style will be used.
imageAn image which appears on the left side of the description text. If nil, the image won't be shown.

◆ initWithId:image:imageAnchor:textStyle:textPlacement:

- (nonnull instancetype) initWithId: (nonnull NSString *)  categoryId
image: (nonnull UIImage *)  image
imageAnchor: (CGPoint)  imageAnchor
textStyle: (nullable SYMapObjectTextStyle *)  textStyle
textPlacement: (nullable SYMapPlaceStyleAnchorPlacement *)  textPlacement 

Initializes the category appearance with an image and text.

Parameters
imageAn image to be shown at the map place coordinate. Shown as is, without auto-resizing for the text.
imageAnchorA relative point on the image, which is connected to the map coordinate of the place. For details, see SYMapPlaceStyleAnchorPlacement.anchor.
textStyleA text style for the place description text. If nil, the default style will be used, and textPlacement parameter will be ignored.
textPlacementA relative point on the image, which is connected to the center of the text. If nil, the text will be shown outside of the image, on its right side.

◆ __attribute__ [1/2]

- ((unavailable("Use init with parameters instead.") __attribute__

◆ __attribute__ [2/2]

+ ((unavailable("Use init with parameters instead.") __attribute__

Property Documentation

◆ categoryId

- (NSString*) categoryId
readnonatomicassign

A category identifier. It's recommended to use SYPlaceCategory values, but technically you can use any string as a category identifier.

◆ background

- (SYMapPlaceBackgroundStyle*) background
readwritenonatomicstrong

Describes the background part of the place appearance. If nil, the background image is not shown.

◆ descriptionStyle

- (SYMapPlaceTextStyle*) descriptionStyle
readwritenonatomicstrong

Describes how the description text looks like. The description will be shown if at least one image property is set: background and/or imageStyle. If the category defines a cluster for grouping other categories, the style is used to show the number of grouped objects in a cluster. If nil, a default font will be used.

◆ imageStyle

- (SYMapPlaceImageStyle*) imageStyle
readwritenonatomicstrong

Contains an image and its settings. If nil, the image is not shown.

◆ clusterId

- (NSString*) clusterId
readwritenonatomicstrong

An identifier of the category containing cluster style specification. If this property is empty, places of this category won't be clustered. The cluster category defines visual appearance of the clusters the same way as place categories.

If cluster is not set, and two nearby objects are about to overlap, one of them will be hidden. If cluster is set, nearby objects are grouped together into a cluster, and the description text is replaced with the number of objects in the group.

◆ zoomLimit

- (CGFloat) zoomLimit
readwritenonatomicassign

Zoom limit for the place, if the map zoom is less than this property (the camera distance is larger), the place won't be visible.


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