Skip to content

Commit

Permalink
Added default zoom support for Bing maps (#626)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Nov 30, 2024
1 parent 546b567 commit 92f6688
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions InternetTest/InternetTest/Pages/LocateIpPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ private void MapBtn_Click(object sender, RoutedEventArgs e)
_ = double.TryParse(lon.Replace(".", ","), out double dLon);
Process.Start("explorer.exe", Global.Settings.MapProvider switch
{
MapProvider.OpenStreetMap => $"\"https://www.openstreetmap.org/directions?engine=graphhopper_foot&route={lat}%2C{lon}%3B{lat}%2C{lon}#map=12/{lat}/{lon}\"",
MapProvider.OpenStreetMap => $"\"https://www.openstreetmap.org/directions?engine=graphhopper_foot&route={lat}%2C{lon}%3B{lat}%2C{lon}#map={Global.Settings.MapZoomLevel}/{lat}/{lon}\"",
MapProvider.Google => $"\"https://www.google.com/maps/place/{Global.GetGoogleMapsPoint(dLat, dLon)}\"",
MapProvider.Microsoft => $"\"https://www.bing.com/maps?q={lat} {lon}\"",
MapProvider.Here => $"\"https://wego.here.com/directions/mix/{lat},{lon}/?map={lat},{lon},12\"",
MapProvider.Yandex => $"\"https://yandex.com/maps/?ll={lon}%2C{lat}&z=12\"",
_ => $"\"https://www.openstreetmap.org/directions?engine=graphhopper_foot&route={lat}%2C{lon}%3B{lat}%2C{lon}#map=12/{lat}/{lon}\""
MapProvider.Microsoft => $"\"https://www.bing.com/maps?q={lat} {lon}&lvl={Global.Settings.MapZoomLevel}&cp={lat}~{lon}\"",
MapProvider.Here => $"\"https://wego.here.com/directions/mix/{lat},{lon}/?map={lat},{lon},{Global.Settings.MapZoomLevel}\"",
MapProvider.Yandex => $"\"https://yandex.com/maps/?ll={lon}%2C{lat}&z={Global.Settings.MapZoomLevel}\"",
_ => $"\"https://www.openstreetmap.org/directions?engine=graphhopper_foot&route={lat}%2C{lon}%3B{lat}%2C{lon}#map={Global.Settings.MapZoomLevel}/{lat}/{lon}\""
});
}

Expand Down

0 comments on commit 92f6688

Please sign in to comment.