Closed TFreudi1 closed 5 years ago
Here is the complete project, very simple. MapsTest.zip
Looks like Google has changed the API: https://developers.google.com/maps/documentation/urls/android-intents
Uri gmmIntentUri = Uri.parse("geo:37.7749,-122.4192?q=" + Uri.encode("1st & Pike, Seattle"));
This is the new API without the extra lat long, which i always thought was weird that they put it there.
I can verify that their documented API doesn't work though :( it just does a search :( sad
I just verified that our functionality works just fine in Here maps and other map apps.
Validated that both work fine in here maps showing label and don't show label in Google Maps
geo:47.64516,-122.130603?q=47.64516,-122.130603(Microsoft%20Building%2025)
geo:0,0?q=47.64516,-122.130603(Microsoft%20Building%2025)
I confirmed that this used to work in a old version of Maps, so they must have broke it.
@jamesmontemagno Do you know how to start Heremaps with a intent and parameters ? I don't want to make it the default map app.
I just installed here maps and the turned off the old default and launched it again and did one time on my pixel 2. They may have a special launcher uri, but they also accept the default Geo codes we use.
Thank for your offtopic answer. Yes I know, that also working for me, but I dont want the Here Map as the default. I thought maybe by chance he know it, I keep searching the net.
Maybe a bit late to comment, but I was having this same issue and I found a workaround for this with Google Maps using Map URLs and its universal cross platform syntax: https://developers.google.com/maps/documentation/urls/guide#universal-cross-platform-syntax
This is my implementation in Xamarin.Forms:
var mapsUri = $"https://www.google.com/maps/search/?api=1&query={locationName} {locationAddress}";
mapsUri = Uri.EscapeUriString(mapsUri);
await Launcher.OpenAsync(new Uri(mapsUri));
This is also a workaround for #792.
This dont work for me because the location name is not really a name of a location. It is the location/name of a car, I tried to used it for small fleet management. Any other Map URL allows passing a name parameter to the pin, but we did'nt find it the google maps api's/urls.
Maps-Api don't show the Name in Android 6.0, Android 8.1, Android 9.0 maybe on more, it onl shows the coordinates.
I use this code: public async Task NavigateToBuilding25() { var location = new Location(47.645160, -122.1306032); var options = new MapLaunchOptions { Name = "Microsoft Building 25" };
Xamarin Essentials 1.0.1