![]() If you're currently using an older version of Visual Studio, you can download a free edition of Visual Studio 2010 Express, which contains these prerequisites. ![]() You might need Administrator privileges, depending on your environment. To begin, launch any version of Visual Studio that contains the Microsoft. With this knowledge, you'll be able to extend my demo program and create sophisticated visualizations using your own geographical data. I'll also offer some advice on when to use WPF and when to use a Web-based approach. In the sections that follow I'll walk you through the code that produced the screenshot in Figure 1. Notice that my mouse is hovering over the top-most yellow dot (the mouse pointer wasn't captured by my keyboard PrtScn so I pasted in a fake icon image) and the location of the dot is displayed in a ToolTip box. The code in the associated event handler read a tiny data source of three items that had latitude and longitude information, and then displayed those three data items as yellow marker dots. Next, I clicked on the button labeled Display Data. Then the application connected the first red dot to the two blue dots using a solid orange straight line and two dashed purple curved lines. As each dot was added to the map, the latitude and longitude coordinates were stored with it. Then the application placed a red marker dot on the map at the exact location of the double-click, and two blue marker dots to the right of the double-click. Behind the scenes the application fetched the XY coordinates of the mouse click within the WPF application window, computed the XY coordinates within the map, and determined the corresponding latitude and longitude of the click. Next, I double-clicked on the map in the traffic intersection near the middle of the map. A new control/library allows developers to add Bing Maps functionality to a WPF application. This programmatically centered the map to latitude 47.6421 and longitude -122.1420 (which is the location of the building where I work in Redmond, Wash.) and then zoomed the map view in to a level of 17.įigure 1. After the application launched and the embedded Bing Maps map object was initialized to a view of the entire globe, I clicked on the first button labeled Center-Zoom. It shows a demo WPF application with a Bing Maps Map control, three Button controls and a ListBox control. The best way to see where I'm headed is to take a look at Figure 1. In this article, I'll present additional examples that you can adapt to produce beautiful, interactive visualizations of geographical data. The downloadable SDK, which contains the library binaries and programming reference, provides some good examples to get you up and running, but moving beyond the sample code requires a bit more effort. Released in January, version 1 of the Bing Maps Windows Presentation Foundation (WPF) Control allows you to integrate mapping functionality directly into WPF applications. ![]() Bing Maps moves beyond Silverlight and AJAX with the new native WPF Control, which enables you to build interactive tools for visualizing geographical data on the desktop.
0 Comments
Leave a Reply. |