Thanks Mouni,
We rebuild the kml layer in the mapsuite 12. It should be easier to load kml here is the sample code.
private void Window_Loaded(object sender, RoutedEventArgs e)
{
mapView.MapUnit = GeographyUnit.DecimalDegree;
KmlFeatureLayer layer = new KmlFeatureLayer(System.AppDomain.CurrentDomain.BaseDirectory + @"\App_Data\VMP_16_07.kml");
string projString = System.IO.File.ReadAllText(System.AppDomain.CurrentDomain.BaseDirectory + @"\App_Data\VMP_16_07.kml.prj");
ProjectionConverter projectionConverter = new ProjectionConverter(Projection.ConvertWktToProjString(projString), 4326);
projectionConverter.Open();
layer.EnableEmbeddedStyle = false;
layer.ZoomLevelSet.ZoomLevel01.DefaultLineStyle = LineStyle.CreateSimpleLineStyle(GeoColor.FromArgb(255, 169, 195, 221), 2F, GeoColors.Red, 4F, false);
layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyle.CreateSimpleAreaStyle(GeoColor.FromArgb(255, 233, 232, 214), GeoColor.FromArgb(255, 156, 155, 154), 1);
layer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyle.CreateSimplePointStyle(PointSymbolType.Circle, GeoColors.Red, 5);
layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
layer.FeatureSource.ProjectionConverter = projectionConverter;
layer.Open();
mapView.CurrentExtent = layer.GetBoundingBox();
LayerOverlay layerOverlay = new LayerOverlay();
layerOverlay.Layers.Add(layer);
mapView.Overlays.Add(layerOverlay);
mapView.Refresh();
}
I also attached you the full project.
KmlDemo.zip (36.2 KB)
Thanks
Frank