private void MyMap_Loaded(object sender, RoutedEventArgs e)
{
// Associate Bing Services token provided as initialization parameter to application with
// the Bing tile layers defined in page xaml.
foreach (Layer layer in MyMap.Layers)
if (layer is TileLayer)
{
(layer as TileLayer).Token = (Application.Current as BingApp.App).BingToken;
}
}
private void Map_Loaded(object sender, RoutedEventArgs e)
{
Map.ExtentChanged += Map_ExtentChanged;
{
foreach (Layer layer in Map.Layers)
if (layer is TileLayer)
(layer as TileLayer).Token = (Application.Current as BingApp.App).BingToken;
}
}
it keeps saying I am missing a reference to BingApp. Any suggestions?
(layer as TileLayer).Token = "<myBingKey>";