public class MapsTest
{
public async Task NavigateToBuilding25()
{
var placemark = new Placemark
{
CountryName = "United States",
AdminArea = "WA",
Thoroughfare = "Microsoft Building 25",
Locality = "Redmond"
};
var options = new MapsLaunchOptions { Name = "Microsoft Building 25" };
await Maps.OpenAsync(placemark, options);
}
}
I did that with my desired location below, but I added zip code.
Placemark placemark = new Placemark
{
CountryName = "United States",
AdminArea = "FL",
Thoroughfare = "528 Andros Lane ",
Locality = "Indian Harbor Beach", // city or town
PostalCode = "32937"
};
var options = new MapsLaunchOptions
{
Name = "528 Andros Lane ",
MapDirectionsMode = MapDirectionsMode.Driving
};
await Maps.OpenAsync(placemark, options);
Expected Behavior
Map should appear with the location specified with a pin on it.
see attachment EssentialsMapDroid.gif
Actual Behavior
In emulator, shows a route from San Francisco to FL
see attachment EssentialsMapIos.png for simulator
see attachment EssentialsMapRealiOS.jpg
Basic Information
There is apparently, another 528 Andros Lane in south FL, as there are many springfields in the country, etc.
Even setting the SubAdminArea = "Brevard County") does not help.
Why specify zipcode or country if they are going to be ignored?
Version with issue: Xamarin.Essentials v0.9.1-preview
Last known good version: first appearance of Maps is v0.9.1-preview
IDE: Visual Studio 2017 15.7.5, Visual Studio for Mac 7.5.4 (build 3)
Bug report best practices: Submitting Issues
Sorry, first time reporting, overwhelmed!
Description
When using Maps.OpenAsync(placemark, options), neither the iOS simulator nor a real iOS device shows the proper location.
In addition, it shows a route when I do not want one.
Replacing the great idea Xamarin.Essentials, from using Plugin.ExternalMaps
Android works just fine; iOS is the problem.
using Maps, which states "Open the maps application to a specific location" It does not indicate any routing is going to happen.
from this url, https://docs.microsoft.com/en-us/xamarin/essentials/maps?content=xamarin%2Fxamarin-forms&tabs=ios which states, "The Maps class enables an application to open the installed maps application to a specific location or placemark."
Steps to Reproduce
the example is below, which is replicated in your tests (https://github.com/xamarin/Essentials/blob/master/Tests/Maps_Tests.cs)
public class MapsTest { public async Task NavigateToBuilding25() { var placemark = new Placemark { CountryName = "United States", AdminArea = "WA", Thoroughfare = "Microsoft Building 25", Locality = "Redmond" }; var options = new MapsLaunchOptions { Name = "Microsoft Building 25" };
}
Placemark placemark = new Placemark { CountryName = "United States", AdminArea = "FL", Thoroughfare = "528 Andros Lane ", Locality = "Indian Harbor Beach", // city or town PostalCode = "32937" };
var options = new MapsLaunchOptions { Name = "528 Andros Lane ", MapDirectionsMode = MapDirectionsMode.Driving }; await Maps.OpenAsync(placemark, options);
Expected Behavior
Map should appear with the location specified with a pin on it.
see attachment EssentialsMapDroid.gif
Actual Behavior
In emulator, shows a route from San Francisco to FL see attachment EssentialsMapIos.png for simulator see attachment EssentialsMapRealiOS.jpg
Basic Information
There is apparently, another 528 Andros Lane in south FL, as there are many springfields in the country, etc. Even setting the SubAdminArea = "Brevard County") does not help. Why specify zipcode or country if they are going to be ignored?
Screenshots
see above
Reproduction Link
thanks for your help!