IMap.TryOpenAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TryOpenAsync(Placemark, MapLaunchOptions) |
First checks if the installed map application can be opened, then opens the installed application to a specific placemark with launch options. |
TryOpenAsync(Double, Double, MapLaunchOptions) |
First checks if the installed map application can be opened, then opens the installed application to a specific location with launch options. |
TryOpenAsync(Placemark, MapLaunchOptions)
- Source:
- Map.shared.cs
- Source:
- Map.shared.cs
First checks if the installed map application can be opened, then opens the installed application to a specific placemark with launch options.
public:
System::Threading::Tasks::Task<bool> ^ TryOpenAsync(Microsoft::Maui::Devices::Sensors::Placemark ^ placemark, Microsoft::Maui::ApplicationModel::MapLaunchOptions ^ options);
public System.Threading.Tasks.Task<bool> TryOpenAsync (Microsoft.Maui.Devices.Sensors.Placemark placemark, Microsoft.Maui.ApplicationModel.MapLaunchOptions options);
abstract member TryOpenAsync : Microsoft.Maui.Devices.Sensors.Placemark * Microsoft.Maui.ApplicationModel.MapLaunchOptions -> System.Threading.Tasks.Task<bool>
Public Function TryOpenAsync (placemark As Placemark, options As MapLaunchOptions) As Task(Of Boolean)
Parameters
- placemark
- Placemark
Placemark to open in the map application.
- options
- MapLaunchOptions
Launch options to use.
Returns
true
if the map application is opened, otherwise false
.
Applies to
TryOpenAsync(Double, Double, MapLaunchOptions)
- Source:
- Map.shared.cs
- Source:
- Map.shared.cs
First checks if the installed map application can be opened, then opens the installed application to a specific location with launch options.
public:
System::Threading::Tasks::Task<bool> ^ TryOpenAsync(double latitude, double longitude, Microsoft::Maui::ApplicationModel::MapLaunchOptions ^ options);
public System.Threading.Tasks.Task<bool> TryOpenAsync (double latitude, double longitude, Microsoft.Maui.ApplicationModel.MapLaunchOptions options);
abstract member TryOpenAsync : double * double * Microsoft.Maui.ApplicationModel.MapLaunchOptions -> System.Threading.Tasks.Task<bool>
Public Function TryOpenAsync (latitude As Double, longitude As Double, options As MapLaunchOptions) As Task(Of Boolean)
Parameters
- latitude
- Double
Target latitude.
- longitude
- Double
Target longitude.
- options
- MapLaunchOptions
Launch options to use.
Returns
true
if the map application is opened, otherwise false
.