private void Button_gridbut_Click(object sender, RoutedEventArgs e) { if (sender == LaunchButton) { GeoCoordinate toGeo = null; try { toGeo = new GeoCoordinate(Double.Parse(LatitudeBox.Text), Double.Parse(LongittudeBox.Text)); } catch (Exception) { toGeo = null; } try { ExploremapsExplorePlacesTask searchMap = new ExploremapsExplorePlacesTask(); searchMap.Location = toGeo; if (StringBox.Text.Length > 0){ searchMap.Category.Add(StringBox.Text); } searchMap.Show(); } catch (Exception erno) { MessageBox.Show("Error message: " + erno.Message); } } else if (sender == getGeoButton) { NavigationService.Navigate(new Uri("/LocationSelectorPage.xaml?target=Location", UriKind.Relative)); } }
private void btnExploremapsExplorePlacesTask_Click(object sender, RoutedEventArgs e) { try { ExploremapsExplorePlacesTask searchMap = new ExploremapsExplorePlacesTask(); searchMap.Location = new GeoCoordinate(LatitudSevilla, LongitudSevilla); searchMap.Category.Add(Nokia.Phone.HereLaunchers.PlaceCategoryId.shopping); searchMap.Show(); } catch (Exception ex) { MessageBox.Show("Error message: " + ex.Message); } }