protected override Collection <DataRepositoryItem> GetSearchResultCore(IEnumerable <string> keywords) { var result = new Collection <DataRepositoryItem>(); if (keywords.Any(keyWord => Name.IndexOf(keyWord, StringComparison.OrdinalIgnoreCase) != -1)) { var item = new BingMapDataRepositoryItem(); item.Icon = null; result.Add(item); } return(result); }
public BingMapsConfigViewModel() { bingMapsKey = string.Empty; mapType = BingMapsMapType.Road; showMapTypeOptions = true; var baseMapDataPlugin = GisEditor.DataRepositoryManager.GetPlugins().OfType <BaseMapDataRepositoryPlugin>().FirstOrDefault(); if (baseMapDataPlugin != null && (bingMapDataRepositoryItem = baseMapDataPlugin.RootDataRepositoryItem.Children.OfType <BingMapDataRepositoryItem>().FirstOrDefault()) != null) { bingMapsKey = bingMapDataRepositoryItem.BingMapsKey; mapType = bingMapDataRepositoryItem.BingMapType; if (String.IsNullOrEmpty(bingMapsKey)) { byte[] keyBuffer = Convert.FromBase64String("QWk5SDVWVnQtZTI2VEdaRFgtakstVUVqOW5KeU9BdHF1OVAyalRURHdETXJTNS1CTUlzZVpxY01BVGpnSmtBeg=="); bingMapsKey = Encoding.UTF8.GetString(keyBuffer); } } }