MSFPopup

Objective-C


@interface MSFPopup : MSFBillboard

Swift

class MSFPopup : MSFBillboard

An abstract billboard element that can be displayed on the map. It always faces the camera and has a dynamically drawn bitmap.

  • Returns the horizontal anchor point of this popup.

    Declaration

    Objective-C

    - (float)getAnchorPointX;

    Swift

    func getAnchorPointX() -> Float

    Return Value

    The horizontal anchor point of this popup.

  • Sets the horizontal anchor point for the popup. It should only be called from Popup::drawBitmap method, to match the anchor point to the drawn bitmap.

    Declaration

    Objective-C

    - (void)setAnchorPointX:(float)anchorPointX;

    Swift

    func setAnchorPointX(_ anchorPointX: Float)

    Parameters

    anchorPointX

    The new horizontal anchor point for the popup. -1 means the left side, 0 the center and 1 the right side of the popup. The default is 0.

  • Returns the vertical anchor point of this popup.

    Declaration

    Objective-C

    - (float)getAnchorPointY;

    Swift

    func getAnchorPointY() -> Float

    Return Value

    The vertical anchor point of this popup.

  • Sets the vertical anchor point for the popup. It should only be called from Popup::drawBitmap method, to match the anchor point to the drawn bitmap.

    Declaration

    Objective-C

    - (void)setAnchorPointY:(float)anchorPointY;

    Swift

    func setAnchorPointY(_ anchorPointY: Float)

    Parameters

    anchorPointY

    The vertical anchor point for the popup. -1 means the bottom, 0 the center and 1 the top of the popup. The default is -1.

  • Sets the anchor point for the popup. It should only be called from Popup::drawBitmap method, to match the anchor point to the drawn bitmap. Values will be clamped to [-1, 1] range.

    Declaration

    Objective-C

    - (void)setAnchorPointX:(float)anchorPointX anchorPointY:(float)anchorPointY;

    Swift

    func setAnchorPointX(_ anchorPointX: Float, anchorPointY: Float)

    Parameters

    anchorPointX

    The new horizontal anchor point for the popup. -1 means the left side, 0 the center and 1 the right side of the popup. The default is 0.

    anchorPointY

    The vertical anchor point for the popup. -1 means the bottom, 0 the center and 1 the top of the popup. The default is -1.

  • Returns the style of this Popup.

    Declaration

    Objective-C

    - (MSFPopupStyle *)getStyle;

    Swift

    func getStyle() -> MSFPopupStyle!

    Return Value

    The style that defines what this Popup looks like.

  • Sets the style for this Popup.

    Declaration

    Objective-C

    - (void)setStyle:(MSFPopupStyle *)style;

    Swift

    func setStyle(_ style: MSFPopupStyle!)

    Parameters

    style

    The new style that defines what this popup looks like.

  • Handles the click events for this Popup.

    Declaration

    Objective-C

    - (BOOL)processClick:(MSFClickInfo *)clickInfo
                clickPos:(MSFMapPos *)clickPos
         elementClickPos:(MSFScreenPos *)elementClickPos;

    Swift

    func processClick(_ clickInfo: MSFClickInfo!, click clickPos: MSFMapPos!, elementClick elementClickPos: MSFScreenPos!) -> Bool

    Parameters

    clickInfo

    The click attributes.

    clickPos

    The position of the click.

    elementClickPos

    The 2D position of the click on the popup.

    Return Value

    True if the click was handled. False otherwise.

  • Draws a custom bitmap for this Popup that will be used for drawing the Popup on the map. The method is called each time the Popup gets reloaded internally.

    Declaration

    Objective-C

    - (MSFBitmap *)drawBitmap:(MSFScreenPos *)anchorScreenPos
                  screenWidth:(float)screenWidth
                 screenHeight:(float)screenHeight
                       dpToPX:(float)dpToPX;

    Swift

    func drawBitmap(_ anchorScreenPos: MSFScreenPos!, screenWidth: Float, screenHeight: Float, dpToPX: Float) -> MSFBitmap!

    Parameters

    anchorScreenPos

    The screen position of the anchor point of this popup in pixels.

    screenWidth

    The current screen width in pixels.

    screenHeight

    The current screen height in pixels.

    dpToPX

    The value used for converting display independent pixels (dp) to pixels (px).

    Return Value

    The custom Popup bitmap.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;

    Swift

    func dealloc()