GLMapBalloon

Objective-C


@interface GLMapBalloon : GLMapDrawable

Swift

class GLMapBalloon : GLMapDrawable

GLMapBalloondraws a ballon with text on map.

  • Initializes empty balloon that will be displayed with given drawOrder

    Declaration

    Objective-C

    - (nonnull instancetype)initWithDrawOrder:(int32_t)drawOrder;

    Swift

    init(drawOrder: Int32)

    Parameters

    drawOrder

    drawOrder of object

  • Sets backgroud image of balloon

    Declaration

    Objective-C

    - (void)setBackgroundImage:(nonnull PlatformImage *)image
                        insets:(PlatformEdgeInsets)insets;

    Swift

    func setBackgroundImage(_ image: NSImage, insets: PlatformEdgeInsets)

    Parameters

    image

    image to set

    insets

    insets of background image

  • Sets text of balloon

    Declaration

    Objective-C

    - (void)setText:(nonnull NSString *)text
          withStyle:(nonnull GLMapVectorStyle *)style
             insets:(PlatformEdgeInsets)insets
         completion:(dispatch_block_t _Nullable)completion;

    Swift

    func setText(_ text: String, with style: GLMapVectorStyle, insets: PlatformEdgeInsets) async

    Parameters

    text

    New text

    style

    A style object used for text

    completion

    A block called when balloon ready to draw with new text

  • Sets refrence angle to detect direction of balloon

    Declaration

    Objective-C

    - (void)setRefrenceAngle:(float)refrenceAngle;

    Swift

    func setRefrenceAngle(_ refrenceAngle: Float)

    Parameters

    refrenceAngle

    refrence angle

  • Sets positions where balloon can be displayed

    Declaration

    Objective-C

    - (void)setPossiblePositions:(nonnull const GLTrackSampleResult *)positions
                           count:(NSUInteger)count;

    Swift

    func setPossiblePositions(_ positions: UnsafePointer<GLTrackSampleResult>, count: UInt)

    Parameters

    positions

    positions to set

    count

    number of positions

  • If set to true position nearest to center of screen will be selected

    Declaration

    Objective-C

    - (void)setPlaceToCenter:(BOOL)placeToCenter;

    Swift

    func setPlaceToCenter(_ placeToCenter: Bool)

    Parameters

    placeToCenter

    value to set