示例#1
0
        private void btnGo_Click(object sender, RoutedEventArgs e)
        {
            MapsTask mt = new MapsTask();

            mt.SearchTerm = tbxSearch.Text;
            mt.Show();
        }
示例#2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            MapsTask _maps = new MapsTask();

            _maps.Center    = new GeoCoordinate(-6.2197, 106.8141);
            _maps.ZoomLevel = 15;
            _maps.Show();
        }
示例#3
0
        private void maps_task(object sender, RoutedEventArgs e)
        {
            MapsTask map = new MapsTask();

            map.SearchTerm = "istanbul taksim";
            map.ZoomLevel  = 3;
            map.Show();
        }
        public void SearchPlace(string search)
        {
            MapsTask mapsTask = new MapsTask();

            mapsTask.SearchTerm = search;
            mapsTask.ZoomLevel  = 2;
            mapsTask.Show();
        }
       private void btnMapsTask_Click_1(object sender, RoutedEventArgs e)
       {
           MapsTask mapsTask = new MapsTask();
           mapsTask.Center = new GeoCoordinate(37.387908, 6.001959);
           mapsTask.ZoomLevel = 8; // 1- 20
           mapsTask.SearchTerm = "restaurante";
 
           mapsTask.Show();
       }
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            double lat = double.Parse(App.ViewModel.Items[index].Latitude);
            double lon = double.Parse(App.ViewModel.Items[index].Longitude);

            MapsTask getCoffeeTask = new MapsTask();
            getCoffeeTask.Center = new GeoCoordinate(lat, lon);
            getCoffeeTask.SearchTerm = AppConstants.searchTerm;
            getCoffeeTask.ZoomLevel = 16;
            getCoffeeTask.Show();
        }
示例#7
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            double lat = double.Parse(App.ViewModel.Items[index].Latitude);
            double lon = double.Parse(App.ViewModel.Items[index].Longitude);

            MapsTask getCoffeeTask = new MapsTask();

            getCoffeeTask.Center     = new GeoCoordinate(lat, lon);
            getCoffeeTask.SearchTerm = AppConstants.searchTerm;
            getCoffeeTask.ZoomLevel  = 16;
            getCoffeeTask.Show();
        }
示例#8
0
        private void Hospital_Tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            MapsTask mapsTask = new MapsTask();

            //Omit the Center property to use the user's current location.
            //mapsTask.Center = new GeoCoordinate(47.6204, -122.3493);

            mapsTask.SearchTerm = "hopital";
            mapsTask.ZoomLevel = 2;
            Debug.WriteLine(sender);
            mapsTask.Show();
        }
示例#9
0
        private void Bbank_tap(object sender, System.Windows.Input.GestureEventArgs e)
        {
            Debug.WriteLine("bbank tap recieved");
            MapsTask mapsTask = new MapsTask();

            //Omit the Center property to use the user's current location.
            //mapsTask.Center = new GeoCoordinate(47.6204, -122.3493);

            mapsTask.SearchTerm = "blood bank";
            mapsTask.ZoomLevel = 2;
            Debug.WriteLine(sender);
            mapsTask.Show();
        }
示例#10
0
        private void Button_gridbut_Click(object sender, RoutedEventArgs e)
        {
            if (sender == LaunchButton)
            {
                MapsTask mapsTask = new MapsTask();

                //You could Omit the Center property to use the user's current location.
                mapsTask.Center    = oneMarker.GeoCoordinate;
                mapsTask.ZoomLevel = zoomSlider.Value;

                mapsTask.Show();
            }
        }
示例#11
0
        public static void OpenMaps(string address)
        {
            MapsTask mapsTask = new MapsTask();

            //Omit the Center property to use the user's current location.
            //mapsTask.Center = new GeoCoordinate(47.6204, -122.3493);

            mapsTask.SearchTerm = address;
            mapsTask.ZoomLevel = 2;

            mapsTask.Show();

        }
        // Sample code for building a localized ApplicationBar
        //private void BuildLocalizedApplicationBar()
        //{
        //    // Set the page's ApplicationBar to a new instance of ApplicationBar.
        //    ApplicationBar = new ApplicationBar();
        //    // Create a new button and set the text value to the localized string from AppResources.
        //    ApplicationBarIconButton appBarButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/appbar.add.rest.png", UriKind.Relative));
        //    appBarButton.Text = AppResources.AppBarButtonText;
        //    ApplicationBar.Buttons.Add(appBarButton);
        //    // Create a new menu item with the localized string from AppResources.
        //    ApplicationBarMenuItem appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarMenuItemText);
        //    ApplicationBar.MenuItems.Add(appBarMenuItem);
        //}
        private void mapTask_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(departureTerm.Text))
             {
            MessageBox.Show("Please enter a start location.");
            return;
             }

             var task = new MapsTask
             {
            // Center = ...
            SearchTerm = departureTerm.Text,
            ZoomLevel = 15,
             };
             task.Show();
        }
        // Sample code for building a localized ApplicationBar
        //private void BuildLocalizedApplicationBar()
        //{
        //    // Set the page's ApplicationBar to a new instance of ApplicationBar.
        //    ApplicationBar = new ApplicationBar();

        //    // Create a new button and set the text value to the localized string from AppResources.
        //    ApplicationBarIconButton appBarButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/appbar.add.rest.png", UriKind.Relative));
        //    appBarButton.Text = AppResources.AppBarButtonText;
        //    ApplicationBar.Buttons.Add(appBarButton);

        //    // Create a new menu item with the localized string from AppResources.
        //    ApplicationBarMenuItem appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarMenuItemText);
        //    ApplicationBar.MenuItems.Add(appBarMenuItem);
        //}

        private void mapTask_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(departureTerm.Text))
            {
                MessageBox.Show("Please enter a start location.");
                return;
            }

            var task = new MapsTask
            {
                // Center = ...
                SearchTerm = departureTerm.Text,
                ZoomLevel  = 15,
            };

            task.Show();
        }
 private async void launch()
 {
     if (!String.IsNullOrEmpty(DeviceStatus.DeviceManufacturer) &&
         DeviceStatus.DeviceManufacturer.Equals("nokia", StringComparison.InvariantCultureIgnoreCase))
     {
         string launchNokiaMaps =
             "explore-maps://v2.0/show/place/?latlon=12.992620,77.582566&zoom=16&title=The%20Lalit";
         await Windows.System.Launcher.LaunchUriAsync(new Uri(launchNokiaMaps));
     }
     else
     {
         var task = new MapsTask();
         task.Center = new GeoCoordinate(12.992620, 77.582566);
         task.ZoomLevel = 16;
         task.SearchTerm = "The Lalit";
         task.Show();
     }
 }
        private void Button_gridbut_Click(object sender, RoutedEventArgs e)
        {
            if (sender == LaunchButton)
            {
                MapsTask mapsTask = new MapsTask();

                //You could Omit the Center property to use the user's current location.
                mapsTask.Center = oneMarker.GeoCoordinate;
                mapsTask.SearchTerm = SearchTermBox.Text;
                mapsTask.ZoomLevel = zoomSlider.Value;

                mapsTask.Show();
            }
        }
示例#16
0
 public void OpenMapForCustomer(Customer customer)
 {
     var mapsTask = new MapsTask();
     mapsTask.SearchTerm = customer.City + ", " + customer.State;
     mapsTask.Show();
 }
示例#17
0
 /* Handle action based on item */
 private void Grid_DoubleTap(object sender, System.Windows.Input.GestureEventArgs e)
 {
     // Check selected item
     if ((_Selected >= 0) && (_Selected < App.ViewModel.Items.Count))
     {
         // Get the item
         ItemsModel item = App.ViewModel.Items[_Selected];
         // Check the action type
         if (item.Type != ActionType.None)
         {
             // Check for call
             if (item.Type == ActionType.Call)
             {
                 // Phone call
                 PhoneCallTask callTask = new PhoneCallTask();
                 callTask.PhoneNumber = item.Action;
                 callTask.Show();
             }
             else if (item.Type == ActionType.Map)
             {
                 // Map the address
                 MapsTask mapTask = new MapsTask();
                 mapTask.ZoomLevel = 10;
                 mapTask.SearchTerm = item.Action;
                 mapTask.Show();
             }
         }
     }
 }