Please refer to the sample project and follow the steps:
1. Run the attached application.
Hi Team,
Are there any intermediate zoomlevel in the RadMap object?
Currently the transition from one zoomlevel to another is too important.
Thank you for your response
1. Open the demo application >> Map >> Search example. 2. Enter some text and press Enter. 3. Move the mouse a little bit and you will notice the search box looses focus. Workaround: this.radMap1.MapElement.SearchBarElement.SearchTextBoxElement.TextBoxItem.LostFocus+=TextBoxItem_LostFocus; private void TextBoxItem_LostFocus(object sender, EventArgs e) { this.radMap1.MapElement.SearchBarElement.SearchTextBoxElement.TextBoxItem.TextBoxControl.Focus(); }
A sample for the required functionality: public void AddMarker(RadMap Map) { SearchRequest r = new SearchRequest(); r.Query = "Paris, France"; r.UserData = new Guid(); bingProvider.SearchCompleted += BingProvider_SearchCompleted; bingProvider.SearchAsync(r); } private void BingProvider_SearchCompleted(object sender, SearchCompletedEventArgs e) { //one cannot access the UserData here }
How to reproduce: public partial class Form3 : Form { public Form3() { InitializeComponent(); MapLayer pointLayer = new MapLayer("PointG"); pointLayer.ClusterStrategy = new ElementClusterStrategy(); pointLayer.ClusterDistance = 100; this.radMap1.Layers.Add(pointLayer); MapPin pin1 = new MapPin(new PointG(45d, 15d)) { BackColor = Color.Coral, ToolTipText = "Tool Tip1" }; MapPin pin2 = new MapPin(new PointG(44d, 18d)) { BackColor = Color.Coral, ToolTipText = "Tool Tip2" }; this.radMap1.Layers["PointG"].Add(pin1); this.radMap1.Layers["PointG"].Add(pin2); this.SetupProviders(); } private void radMap1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e) { MapCluster cluster = sender as MapCluster; if (cluster != null && cluster.ClusteredItems.Count == 1) { cluster.ToolTipText = ((MapPin)cluster.ClusteredItems[0]).ToolTipText; } } private void SetupProviders() { string cacheFolder = @"..\..\cache"; BingRestMapProvider bingProvider = new BingRestMapProvider(); bingProvider.Culture = System.Threading.Thread.CurrentThread.CurrentCulture; bingProvider.ImagerySet = ImagerySet.Road; bingProvider.UseSession = true; bingProvider.BingKey = "..."; LocalFileCacheProvider cache = new LocalFileCacheProvider(cacheFolder); bingProvider.CacheProvider = cache; this.radMap1.MapElement.Providers.Add(bingProvider); bingProvider.InitializationComplete += bingProvider_InitializationComplete; } private void bingProvider_InitializationComplete(object sender, EventArgs e) { this.radMap1.BringIntoView(new PointG(45d, 15d), 5); } } Workaround: handle the ToolTipNeededEvent private void radMap1_ToolTipTextNeeded(object sender, Telerik.WinControls.ToolTipTextNeededEventArgs e) { MapCluster cluster = sender as MapCluster; if (cluster != null && cluster.ClusteredItems.Count == 1) { cluster.ToolTipText = ((MapPin)cluster.ClusteredItems[0]).ToolTipText; } }
Until released use the following custom implementation: public partial class RoadOnDemandForm : RadForm { public RoadOnDemandForm() { InitializeComponent(); string cacheFolder = @"..\..\cache"; BingRestMapProvider bingProvider = new MyBingRestMapProvider(); bingProvider.Culture = System.Threading.Thread.CurrentThread.CurrentCulture; bingProvider.ImagerySet = ImagerySet.Road; bingProvider.UseSession = true; bingProvider.BingKey = "YourApiKey"; LocalFileCacheProvider cache = new LocalFileCacheProvider(cacheFolder); bingProvider.CacheProvider = cache; this.radMap1.MapElement.Providers.Add(bingProvider); } } public class MyBingRestMapProvider : BingRestMapProvider { private const string ImageryMetadataServiceUri = "https://dev.virtualearth.net/REST/v1/Imagery/Metadata/{set}?output=json&key={key}&c={culture}&dir={directory}"; protected override void InitializeImageryService() { typeof(BingRestMapProvider).GetField("tileMetadataInfo", System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic).SetValue(this, null); try { string uriString = ImageryMetadataServiceUri; uriString = uriString.Replace("{set}", "RoadOnDemand"); uriString = uriString.Replace("{key}", string.IsNullOrEmpty(this.SessionId) ? this.BingKey : this.SessionId); uriString = uriString.Replace("{culture}", this.Culture.ToString()); uriString = uriString.Replace("{directory}", "0"); WebClient client = new WebClient(); client.DownloadStringCompleted += this.InitializeImageryMetadataCompleted; client.DownloadStringAsync(new Uri(uriString, UriKind.Absolute)); } catch (Exception ex) { throw new Exception(string.Format("Imagery Service Exception: {0}", ex.Message)); } } }
How to reproduce: check the attached video Workaround: create a custom MapSearchBarElement public class MyRadMap : RadMap { public override string ThemeClassName { get { return typeof(RadMap).FullName; } } protected override RadMapElement CreateMapElement() { return new MyRadMapElement(); } } public class MyRadMapElement : RadMapElement { protected override Type ThemeEffectiveType { get { return typeof(RadMapElement); } } protected override MapSearchBarElement CreateSearchBarElement() { return new MyMapSearchBarElement(this); } } public class MyMapSearchBarElement : MapSearchBarElement { public MyMapSearchBarElement(MyRadMapElement mapElement) : base(mapElement) { } protected override Type ThemeEffectiveType { get { return typeof(MapSearchBarElement); } } protected override void SearchProviderSearchError(object sender, SearchErrorEventArgs e) { IMapSearchProvider provider = sender as IMapSearchProvider; provider.SearchCompleted -= SearchProviderSearchCompleted; provider.SearchError -= SearchProviderSearchError; if (this.ElementTree != null) { UnsubscribeToTextBoxEvents(this.SearchTextBoxElement); RadMessageBox.SetThemeName(this.ElementTree.ThemeName); RadMessageBox.Show(e.Error.Message); SubscribeToTextBoxEvents(this.SearchTextBoxElement); } } protected override void SubscribeToTextBoxEvents(RadTextBoxElement textBox) { textBox.TextChanged += OnSearchTextBoxTextChanged; textBox.KeyDown += OnSearchTextBoxKeyDown; } protected override void UnsubscribeToTextBoxEvents(RadTextBoxElement textBox) { textBox.TextChanged -= OnSearchTextBoxTextChanged; textBox.KeyDown -= OnSearchTextBoxKeyDown; } private void OnSearchTextBoxKeyDown(object sender, System.Windows.Forms.KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { this.Search(this.SearchTextBoxElement.Text); } } }
How to reproduce: change the Windows culture to Greek and start the OSM example
https://msdn.microsoft.com/en-us/library/ff701717.aspx
Error: System.ArgumentException was unhandled HResult=-2147024809 Message=An item with the same key has already been added. Source=mscorlib StackTrace: at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource) at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) at Telerik.WinControls.UI.DbfHeader.CreateExtendedPropertySet() at Telerik.WinControls.UI.DbfReader..ctor(Stream stream, ExtendedPropertySet propertySet, Encoding encoding) at Telerik.WinControls.UI.ShapeFileReader.Read(ShapeFileReaderParameters parameters) at _1125357MapShapeFiles.RadForm1..ctor() in d:\Projects\1125357MapShapeFiles\RadForm1.cs:line 37 at _1125357MapShapeFiles.Program.Main() in d:\Projects\1125357MapShapeFiles\Program.cs:line 17 at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args) at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() at System.Threading.ThreadHelper.ThreadStart_Context(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ThreadHelper.ThreadStart() InnerException:
To reproduce: - Use a DataTable as a data source for SqlGeospatialDataReader. - An exception will occur. Workaround: Convert the data table to a simple list of custom objects.
How to reproduce: Change the current culture so that a comma is used as a decimal separator, the Elevations example will fail with a (400) Bar Request error. Workaround: create a custom BingRestMapProvider class public class CustomBingRestMapProvider : BingRestMapProvider { protected override string GetPointsString(List<PointG> points) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < points.Count; i++) { PointG point = points[i]; if (i > 0) { sb.Append(","); } sb.Append(point.Latitude.ToString(CultureInfo.InvariantCulture) + "," + point.Longitude.ToString(CultureInfo.InvariantCulture)); } return sb.ToString(); } }
To reproduce: use the ToolTipTextNeeded event to assign some tool tips for the MapRoutes. You will notice that the tool tips are shown not only when you hover the route line but also around it.
Run the attached project and follow the steps in the gif file. As a result the following exception occurs:
System.IO.IOException: 'The process cannot access the file 't_0_0_1.png' because it is being used by another process.'
Run the attached project.
Expected:
10 points on each row.
Actual:
There is a seemingly random number of points on each row: