Map.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(Location) |
First checks if the installed map application can be opened, then opens the installed application to a specific location with launch options. |
TryOpenAsync(Placemark) |
First checks if the installed map application can be opened, then open the installed application to a specific placemark with launch options. |
TryOpenAsync(Location, 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) |
First checks if the installed map application can be opened, then open the installed application to a specific placemark with launch options. |
TryOpenAsync(Double, Double) |
First checks if the installed map application can be opened, then open the installed application to a specific location 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(Location)
- 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:
static System::Threading::Tasks::Task<bool> ^ TryOpenAsync(Microsoft::Maui::Devices::Sensors::Location ^ location);
public static System.Threading.Tasks.Task<bool> TryOpenAsync (Microsoft.Maui.Devices.Sensors.Location location);
static member TryOpenAsync : Microsoft.Maui.Devices.Sensors.Location -> System.Threading.Tasks.Task<bool>
Public Shared Function TryOpenAsync (location As Location) As Task(Of Boolean)
Parameters
- location
- Location
Location to open in the map application.
Returns
true
if the map application is opened, otherwise false
.
Applies to
TryOpenAsync(Placemark)
- Source:
- Map.shared.cs
- Source:
- Map.shared.cs
First checks if the installed map application can be opened, then open the installed application to a specific placemark with launch options.
public:
static System::Threading::Tasks::Task<bool> ^ TryOpenAsync(Microsoft::Maui::Devices::Sensors::Placemark ^ placemark);
public static System.Threading.Tasks.Task<bool> TryOpenAsync (Microsoft.Maui.Devices.Sensors.Placemark placemark);
static member TryOpenAsync : Microsoft.Maui.Devices.Sensors.Placemark -> System.Threading.Tasks.Task<bool>
Public Shared Function TryOpenAsync (placemark As Placemark) As Task(Of Boolean)
Parameters
- placemark
- Placemark
Placemark to open in the map application.
Returns
true
if the map application is opened, otherwise false
.
Applies to
TryOpenAsync(Location, 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:
static System::Threading::Tasks::Task<bool> ^ TryOpenAsync(Microsoft::Maui::Devices::Sensors::Location ^ location, Microsoft::Maui::ApplicationModel::MapLaunchOptions ^ options);
public static System.Threading.Tasks.Task<bool> TryOpenAsync (Microsoft.Maui.Devices.Sensors.Location location, Microsoft.Maui.ApplicationModel.MapLaunchOptions options);
static member TryOpenAsync : Microsoft.Maui.Devices.Sensors.Location * Microsoft.Maui.ApplicationModel.MapLaunchOptions -> System.Threading.Tasks.Task<bool>
Public Shared Function TryOpenAsync (location As Location, options As MapLaunchOptions) As Task(Of Boolean)
Parameters
- location
- Location
Location 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(Placemark, MapLaunchOptions)
- Source:
- Map.shared.cs
- Source:
- Map.shared.cs
First checks if the installed map application can be opened, then open the installed application to a specific placemark with launch options.
public:
static System::Threading::Tasks::Task<bool> ^ TryOpenAsync(Microsoft::Maui::Devices::Sensors::Placemark ^ placemark, Microsoft::Maui::ApplicationModel::MapLaunchOptions ^ options);
public static System.Threading.Tasks.Task<bool> TryOpenAsync (Microsoft.Maui.Devices.Sensors.Placemark placemark, Microsoft.Maui.ApplicationModel.MapLaunchOptions options);
static member TryOpenAsync : Microsoft.Maui.Devices.Sensors.Placemark * Microsoft.Maui.ApplicationModel.MapLaunchOptions -> System.Threading.Tasks.Task<bool>
Public Shared 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)
- Source:
- Map.shared.cs
- Source:
- Map.shared.cs
First checks if the installed map application can be opened, then open the installed application to a specific location with launch options.
public:
static System::Threading::Tasks::Task<bool> ^ TryOpenAsync(double latitude, double longitude);
public static System.Threading.Tasks.Task<bool> TryOpenAsync (double latitude, double longitude);
static member TryOpenAsync : double * double -> System.Threading.Tasks.Task<bool>
Public Shared Function TryOpenAsync (latitude As Double, longitude As Double) As Task(Of Boolean)
Parameters
- latitude
- Double
Target latitude.
- longitude
- Double
Target longitude.
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:
static System::Threading::Tasks::Task<bool> ^ TryOpenAsync(double latitude, double longitude, Microsoft::Maui::ApplicationModel::MapLaunchOptions ^ options);
public static System.Threading.Tasks.Task<bool> TryOpenAsync (double latitude, double longitude, Microsoft.Maui.ApplicationModel.MapLaunchOptions options);
static member TryOpenAsync : double * double * Microsoft.Maui.ApplicationModel.MapLaunchOptions -> System.Threading.Tasks.Task<bool>
Public Shared Function TryOpenAsync (latitude As Double, longitude As Double, options As MapLaunchOptions) As Task(Of Boolean)
Parameters
- latitude
- Double
Latitude to open to.
- longitude
- Double
Longitude to open to.
- options
- MapLaunchOptions
Launch options to use.
Returns
true
if the map application is opened, otherwise false
.