xamarin / Essentials

Xamarin.Essentials is no longer supported. Migrate your apps to .NET MAUI, which includes Maui.Essentials.
https://aka.ms/xamarin-upgrade
Other
1.53k stars 505 forks source link

Maps for iOS showing route when should show location #440

Closed Riversoft closed 6 years ago

Riversoft commented 6 years ago

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

  1. Replace your example, with another valid address.

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" };

    await Maps.OpenAsync(placemark, options);
}

}

  1. 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 essentialsmapdroid

Actual Behavior

In emulator, shows a route from San Francisco to FL see attachment EssentialsMapIos.png for simulator essentialsmapios see attachment EssentialsMapRealiOS.jpg essentialsmaprealios

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!

Mrnikbobjeff commented 6 years ago

I found the source of the issue. Pull request is finished.