Completed
Last Updated: 14 Jun 2018 14:44 by Dimitar
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: Map
Type: Feature Request
1
To reproduce: The TileSize property of the LocalMapProvider is readonly.

Workaround:

 public class CustomLocalMapProvider : LocalMapProvider
        {
           
            public CustomLocalMapProvider()
            {
              
                FieldInfo fi = typeof(LocalMapProvider).GetField("tileSize", BindingFlags.Instance | BindingFlags.NonPublic);
                fi.SetValue(this, new Size(200,200));
            }
        }
Completed
Last Updated: 13 Jun 2018 14:28 by Dimitar
ADMIN
Created by: Dess | Tech Support Engineer, Sr.
Comments: 0
Category: Map
Type: Feature Request
1
https://msdn.microsoft.com/en-us/library/ff701717.aspx
Completed
Last Updated: 10 Apr 2018 13:44 by Dimitar
How to reproduce: check the attached project, the expected behavior would be that the MapPoint object have its text painted
Workaround:
public partial class RadForm1 : Telerik.WinControls.UI.RadForm
{
    public RadForm1()
    {
        InitializeComponent();

        MapLayer pinsLayer = new MapLayer("Buildings Layout");
        this.radMap1.Layers.Add(pinsLayer);
        EmptyMapProvider emptyProvider = new EmptyMapProvider();
        emptyProvider.InitializationComplete += emptyProvider_InitializationComplete;

        this.radMap1.Providers.Add(emptyProvider);
        using (FileStream seatsStream = File.OpenRead(@"..\..\shapes-new\Label_Pk_Boulou2.shp"))
        {
            using (FileStream seatsDataStream = File.OpenRead(@"..\..\shapes-new\Label_Pk_Boulou2.dbf"))
            {
                ShapeFileReaderParameters parameters = new ShapeFileReaderParameters();
                parameters.ShapeStream = seatsStream;
                parameters.DbfStream = seatsDataStream;
                //parameters.CoordinateConverter = new EPSG900913Converter();
                ShapeFileReader reader = new ShapeFileReader();
                List<MapVisualElement> elements = reader.Read(parameters);
                foreach (var item in elements)
                {
                    item.Text = Convert.ToString(((IExtendedData)item).ExtendedData["Text"]);
                }

                this.radMap1.Layers["Buildings Layout"].AddRange(elements);

            }
        }
    }
}

Completed
Last Updated: 21 Dec 2017 07:49 by ADMIN
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));
        }
    }
}
Completed
Last Updated: 15 Aug 2017 10:29 by ADMIN
ADMIN
Created by: Hristo
Comments: 1
Category: Map
Type: Feature Request
1