KML file issues with Runtime for .NET app version 10.2.6: 3D scene view does not work 2D view works fine

11-12-2015 08:55 AM
New Contributor II

Hi All,

I have  simple runtime for .net application using a scene view. I try to load a kml file in that scene view and it does not work but as soon as I change the scene view to map view i.e. 2D it works fine. KML file supports 3D i.e. scene view as written in the documentation provided by ESRI for runtime sdk for .net 10.2.6. The KML file is present in my machine and the app uses the drag and drop event to locate the KML file.

Here is the link:

Here is the sample code:

private async void MyMapView_Drop(object sender, DragEventArgs e)


            if (e.Data.GetDataPresent(DataFormats.FileDrop))


                string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);

                KmlLayer kmlLayer = new KmlLayer(new Uri(files[0]));

                await kmlLayer.InitializeAsync();

                //Add the kml layer



                //Zoom to the kml layer if available

                if (kmlLayer.RootFeature.Viewpoint != null)

                    await MyMapView.SetViewAsync(kmlLayer.RootFeature.Viewpoint);

                await MyMapView.LayersLoadedAsync();



        private void ResetMapButton_Click(object sender, RoutedEventArgs e)


           // MyMapView.Map.Layers.Clear();

            //MyMapView.Map.Layers.Add(new ArcGISTiledMapServiceLayer(new Uri("")));


            MyMapView.Scene.Layers.Add(new ArcGISTiledMapServiceLayer(new Uri("")));


I am attaching the app and the kml file.

Kindly suggest.



0 Kudos
0 Replies