MapFlyout Class
Note
Bing Maps SDK for Android and iOS retirement
Bing Maps SDK for Android and iOS is deprecated and will be retired. Free (Basic) account customers can continue to use Bing Maps SDK for Android and iOS until June 30th, 2025. Enterprise account customers can continue to use Bing Maps SDK for Android and iOS until June 30th, 2028. To avoid service disruptions, all implementations using Bing Maps SDK for Android and iOS will need to be updated to use Azure Maps Web SDK by the retirement date that applies to your Bing Maps for Enterprise account type.
Azure Maps is Microsoft's next-generation maps and geospatial services for developers. Azure Maps has many of the same features as Bing Maps for Enterprise, and more. To get started with Azure Maps, create a free Azure subscription and an Azure Maps account. For more information about azure Maps, see Azure Maps Documentation. For migration guidance, see Bing Maps Migration Overview.
Represents a user control that displays lightweight informational UI.
Android
public class MapFlyout
iOS
@interface MSMapFlyout : NSObject
Properties
Visible
Whether flyout is currently being displayed.
Android
boolean isVisible()
iOS
@property (nonatomic, readonly) BOOL visible
Title
Primary text to be displayed on flyout's default view. Can be null; empty string is treated as null.
Android
@Nullable String getTitle() void setTitle(@Nullable String title)
iOS
@property (nonatomic, nullable) NSString *title
Description
Secondary text to be displayed on flyout's default view. Can be null; empty string is treated as null.
Android
@Nullable String getDescription() void setDescription(@Nullable String description)
iOS
@property (nonatomic, nullable) NSString *description
NormalizedAnchorPoint
Point on the flyout that will be used as its anchor.
Possible values range between (0, 0)
and (1, 1)
. The default is (0.5, 1.0)
(bottom center).
Android
android.graphics.PointF getNormalizedAnchorPoint() void setNormalizedAnchorPoint(android.graphics.PointF point)
iOS
@property (nonatomic) CGPoint normalizedAnchorPoint
NormalizedRelativePosition
Point on the associated MapIcon that the flyout will be anchored to.
Possible values range between (0, 0)
and (1, 1)
. The default is (0.5, 0.0)
(top center).
Android
android.graphics.PointF getNormalizedRelativePosition() void setNormalizedRelativePosition(android.graphics.PointF position)
iOS
@property (nonatomic) CGPoint normalizedRelativePosition
LightDismissEnabled
Whether flyout can be closed by tapping outside of it. Defaults to true.
Android
boolean isLightDismissEnabled() void setLightDismissEnabled(boolean enabled)
iOS
@property (nonatomic) BOOL lightDismissEnabled
CustomViewAdapter
Provides custom view for the flyout. If set to null, the default view with flyout's title and description will be used.
Important: View will be rendered on canvas, with interactive elements no longer interactive.
Android
void setCustomViewAdapter(@Nullable MapFlyout.CustomViewAdapter adapter)
iOS
@property (nonatomic) MSMapFlyoutCustomViewAdapter customViewAdapter
See also: MapFlyoutCustomViewAdapter
Methods
Show
Shows the flyout at the specified relative position. If another flyout is active at the time, it will be hidden.
Android
void show()
iOS
- (void)show
Hide
Hides the flyout.
Android
void hide()
iOS
- (void)hide
StyleDefaultView
Styles default view with customizable background color and text color in ARGB format. The default background color is dark gray (0xff555555) and text color is white (0xffffffff)
Android
void styleDefaultView(int colorBackground, int colorText)
iOS
- (void)styleDefaultViewWithBackgroundColor:(UIColor*)backgroundColor textColor:(UIColor*)textColor