Bing map is still unavailable for Chinese users. Many of the locations are not identified and not detailed enough. Therefore, Google map immediately comes to mind, so I searched for related resources, using Google map in Windows Phone applications is actually very simple. The following describes the steps:
1. There is an encapsulated DLL Class Library: googlemaps. dll (click to download). This is the core content. add reference to this DLL in the project first:
2. Add several references to the XAML file and name them.
Xmlns: My = "CLR-namespace: Microsoft. Phone. Controls. Maps; Assembly = Microsoft. Phone. Controls. Maps"
Xmlns: googletilesource = "CLR-namespace: googlemaps; Assembly = googlemaps"
Xmlns: mspcmcore = "CLR-namespace: Microsoft. Phone. Controls. Maps. Core; Assembly = Microsoft. Phone. Controls. Maps"
3. calling Google map is a simple example. WP development is much more convenient than iOS development. Thanks to this DLL, you only need to nest a bit of content in the original Bing map control. Adding tags and obtaining geographic locations do not affect the content of the XAML as follows:
<My: Map x: Name = "mMain" margin = "," copyrightvisibility = "Collapsed" logovisibility = "Collapsed" scalevisibility = "visible" credentialsprovider = "ApBXPZf5IR94SLXE8nh5FYsb5WHKrH1XPY7428-EqQudseivcWhCROIJvGmtnkAV">
<My: maptilelayer name = "street" margin = "0, 0, 0, 32">
<My: maptilelayer. tilesources>
<Googletilesource: googletile tiletypes = "street">
</Googletilesource: googletile>
</My: maptilelayer. tilesources>
</My: maptilelayer>
</My: Map>
I have not studied the specific internal implementation. If you are interested, you can find the source code of this DLL.
The effect is as follows:
Http://www.xueit.com/windowsphone7/show-9764-2.aspx