diff --git a/SampleApps/Shared/MapLayers.cs b/SampleApps/Shared/MapLayers.cs index 36e3a85b..47d5191c 100644 --- a/SampleApps/Shared/MapLayers.cs +++ b/SampleApps/Shared/MapLayers.cs @@ -162,13 +162,13 @@ namespace ViewModel public MapLayers() { - SetBingMapsApiKey(); - - // Bing Maps TileLayers with tile URLs retrieved from the Imagery Metadata Service + // Add Bing Maps TileLayers with tile URLs retrieved from the Imagery Metadata Service // (http://msdn.microsoft.com/en-us/library/ff701716.aspx). // A Bing Maps API Key (http://msdn.microsoft.com/en-us/library/ff428642.aspx) is required // for using these layers and must be assigned to the static BingMapsTileLayer.ApiKey property. + SetBingMapsApiKey(); + if (!string.IsNullOrEmpty(BingMapsTileLayer.ApiKey)) { MapLayerNames.Add("Bing Maps Road");