Completed
Last Updated: 15 Aug 2017 10:29 by ADMIN
ADMIN
Hristo
Created on: 03 Apr 2017 09:14
Category: Map
Type: Feature Request
1
ADD. RadMap - support in KML reader for icons stored locally

		
(Total attached files size should be smaller than 20mb. Allowed extensions: .zip, .rar, .jpg, .png, .gif)
1 comment
ADMIN
Ralitsa
Posted on: 18 May 2017 08:30
In order to display local icons on the map, you can use the following code snippet: 

OpenStreetMapProvider osmProvider = new OpenStreetMapProvider();
this.radMap1.MapElement.Providers.Add(osmProvider);
this.radMap1.Layers.Clear();
this.radMap1.Layers.Add(new MapLayer("Capitals"));

using (FileStream kmlStream = new FileStream(@"..\..\Kmls\kmlImagesLocalSource.kml", FileMode.Open))
{
    KmlReader.UseLocalImages = true;
    KmlReader.LocalImagesFolder = @"D:\Kmls\images\";
    
    List<MapVisualElement> elements = KmlReader.Read(kmlStream);
    foreach (MapVisualElement item in elements)
    {
        item.BorderWidth = 1;
        item.BorderColor = Color.Red;
    }
    this.radMap1.Layers["Capitals"].AddRange(elements);
}

this.radMap1.BringIntoView(pointLisboa, 14);