How to search for a Location with Coordinates on Bing Map in Windows Phone ?

In one of my previous posts , i explained about the following

In this blog post , i will explain how to search for a Location with Coordinates on Bing Map in Windows Phone ? programatically using C# .

You can use the BingMapTask.Center property to set the coordinates and display it on the Map as shown in the below sample sourcecode.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Tasks;
using System.Device.Location;

namespace PhoneApp1
{
    public partial class MainPage : PhoneApplicationPage
    {
        // Constructor
        public MainPage()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, RoutedEventArgs e)
        {
            BingMapsTask bingMapsTask = new BingMapsTask();
            double Latitude = 12.9380;
            double Longitude = 077.6031;
            GeoCoordinate coordinate = new GeoCoordinate(Latitude, Longitude);
            bingMapsTask.Center = coordinate;
            bingMapsTask.Show();
        }

    }
}
How to search for a Location with Coordinates on Bing Map in Windows Phone ?
How to search for a Location with Coordinates on Bing Map in Windows Phone ?

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this post, you’ll learn about the Win32 Error “0x000019E5 – ERROR_COULD_NOT_RESIZE_LOG” that you get when debugging system erors in...
In this post, you’ll learn about the error “CO_E_DBERROR 0x8004E02B” that is returned when working with COM based APIs or...
In this post, you’ll learn about the Win32 Error “0x000019D0 – ERROR_LOG_BLOCK_VERSION” that you get when debugging system erors in...