private void OpenInBingMaps() { if (_itemLocation != null) { double zoom = 18.0; /*if (AppPlatform.IsMango) * { * var bingMaps = ((App)(App.Current)).Mango.Tasks.CreateBingMapsTask(); * bingMaps.Center = center; * bingMaps.ZoomLevel = zoom; * worked = true; * bingMaps.Show(); * } * else*/ if (_placePushpin != null && _placePushpin.Content is MapPlaceInformation) { var mpi = _placePushpin.Content as MapPlaceInformation; if (mpi != null) { var bing = new BingMapsDirectionsTask(); bing.End = new LabeledMapLocation { Label = mpi.Name, Location = _placePushpin.Location }; try { bing.Show(); } catch { MessageBox.Show("On some phones the map cannot be opened. Your culture may be set to a non-English culture where a known bug exists.", "Sorry!", MessageBoxButton.OK); } } } else if (MangoOnSeven.IsMangoRunning) { try { MangoOnSeven.TryBingMapsTask(_itemLocation, zoom); } catch (Exception) { MessageBox.Show("On some phones the map cannot be opened. Your culture may be set to a non-English culture where a known bug exists.", "Sorry!", MessageBoxButton.OK); } } } }
private void OpenInBingMaps() { if (_itemLocation != null) { double zoom = 18.0; /*if (AppPlatform.IsMango) * { * var bingMaps = ((App)(App.Current)).Mango.Tasks.CreateBingMapsTask(); * bingMaps.Center = center; * bingMaps.ZoomLevel = zoom; * worked = true; * bingMaps.Show(); * } * else*/ if (MangoOnSeven.IsMangoRunning) { MangoOnSeven.TryBingMapsTask(_itemLocation, zoom); } } }