Hi
When the device language is english, this Chinese character do not display.
As for code, there is nothing special on the page/map level.
Bing map control just sits in a grid. When the Map page is navigated to it displays XAML circles at locations on the map.
Bing Map control details:
Name: Bing Maps for C#, C++, or Visual Basic
FileType: SDK
Identity: Bing.Maps.Xaml, Version=1.313.0825.0
Path: C:\Users\myself\AppData\Local\Microsoft SDKs\Windows\v8.1\ExtensionSDKs\Bing.Maps.Xaml\1.313.0825.0\
Resolved: True
Version: 1.313.825.0
//-----------------------
XAML MapPage.xaml
<Grid >
<local:MapView x:Name="mapViewControl" Zoom="15"
Credentials="MyCredentialsUplrgw3Gn4fhk8m_P_etc"
MapServiceToken="q_SOME_Tokenc4cJuixLOpEJ_lw" />
</Grid>
...and in the Code behind is MapPage.xaml.cs
public sealed partial class MapPopup : Page
{
protected override void OnNavigatedTo(NavigationEventArgs e)
{
// get data.
foreach(dataItem in dataItems)
{
mapViewControl.AddPushpin(position, data); // Set the data up in the map.
}
}
}
MapView.cs file
public class MapView : Grid, INotifyPropertyChanged
{
private Bing.Maps.Map _map;
private Bing.Maps.MapLayer _pinLayer;
public string Credentials{...}
public string MapServiceToken{...}
public double Zoom{...}
public MapView()
{
_map = new Map();
_map.Language = lang; // this is taken from GlobalizationPreferences.Languages[0];
_pinLayer = new MapLayer();
//_pinLayer.Language = lang; // These were added later, but have no effect.
_map.Children.Add(_pinLayer);
this.Children.Add(_map);
}
public void AddPushpin(BasicGeoposition location, List<object> displayInfo, string text = "")
{
CustomPin customPin = new CustomPin(); // a xaml control circle with a custom drawn tooltip
customPin.DataContext = (CustomDataObject)displayInfo[0];
Bing.Maps.MapLayer.SetPosition(customPin, location.ToLocation());
_pinLayer.Children.Add(customPin);
}
}
Also as mention in the original post
In the application's OnLaunched() method
ApplicationLanguages.PrimaryLanguageOverride is set to the current language (GlobalizationPreferences.Languages[0]) .
Subsequently when we initialise the Bing.Maps.Map control we also set the Map.Language to be the same. This does not help.
(Are these Chinese language sets embedded with the Bing map control? How can we override to the devices preferred language?)