[Silverlight] Bing Maps Learning Series (6): Extended Modes)

Source: Internet
Author: User

Microsoft Bing Maps has been launched for some time. through continuous improvement and new map updates, a complete map engine solution has been basically formed, some time ago, the Bing Maps Silverlight control was launched. This version of map mode only supports the path mode and the AerialMode mode ), through continuous efforts, we finally launched two Extended Modes for Bing Maps display of the Silverlight controls on wed9-12-9, namely, BirdseyeMode) and StreetsideMode ). When I received an email from Microsoft about the extended map mode, I couldn't wait to view the relevant information through the connection. I felt that the map works well in these two modes, bing Maps is becoming more and more perfect.

 

To use the extended mode, you must make some preparations. The original control version cannot be implemented. You must download the new control version to support the new map mode function. First, download the new version of Bing Maps Silverlight control that supports the extended mode, and then download the components in the map extended mode (Microsoft. maps. mapControl. extendedModes. dll), which consists of two types of Map Display Mode extension (BirdseyeMode and StreetsideMode), which respectively represent the bird's view mode and street mode.

 

The extended Mode is very easy to use, but it is done by modifying the Mode attribute of the map. I will not introduce it here. If you are not clear about it, refer to the second article in this series. A simple example of the extension mode is as follows:

1 <Grid x: Name = "LayoutRoot" Width = "640" Height = "480">
2 <m: Map CredentialsProvider = "example" x: Name = "myMap"
3 Center = "34.9294740237661, 107.506492025863" ZoomLevel = "4">
4 </m: Map>
5 </Grid>

Public partial class MainPage: UserControl
{
Public MainPage ()
{
InitializeComponent ();
// Set the map display mode to the Bird's Nest chart mode.
MyMap. Mode = new BirdseyeMode ();
}
}

 

 

The preceding code block sets the map Mode to BirdseyeMode, which is both the Bird's Nest chart Mode and the StreetsideMode Mode to be set to the street Mode.

 

The Bing Maps Silverlight mode does not add the two extended modes to the map navigation menu, if you want to display the menu items in these two modes on the navigation menu, you must manually use the static AddModeToNavigationBar method of the extended mode. The Code is as follows:

1 public partial class MainPage: UserControl
2 {
3 public MainPage ()
4 {
5 InitializeComponent ();
6
7 // Add the Bird's Nest chart mode to the map navigation menu
8 BirdseyeMode. AddModeToNavigationBar (myMap );
9 // Add the street mode to the map navigation menu
10 StreetsideMode. AddModeToNavigationBar (myMap );
11
12 myMap. Mode = new BirdseyeMode ();
13}
14}

 

 

The use of the extended mode mainly involves setting the display mode and navigation menu. Unfortunately, there are no complete Bird's Nest map data and street map data, some countries in Europe have opened part of map data, which is awaiting further efforts by Microsoft. Soon, the Chinese map's Bird's Nest map data and street map data will be launched.

 

Description

This document is a learning note and is intended to be shared with people with lofty ideals. You are welcome to repost this article, but mark the original article connection in a prominent position.

Author: Beniao

Article Source: http://beniao.cnblogs.com/or http://www.cnblogs.com/

 

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.