private static Layer LoadKmlFile(string path, string parentFrame)
 {
     KmlRoot newRoot = new KmlRoot(path, (KmlRoot)null);
     KmlLayer layer = new KmlLayer();
     layer.root = newRoot;
     KmlCollection.UpdateRootLinks(layer.root, Earth3d.MainWindow.KmlViewInfo);
     layer.UpdateRetainedVisuals();
     layer.Enabled = true;
     layer.Name = path.Substring(path.LastIndexOf('\\') + 1);
     LayerList.Add(layer.ID, layer);
     layer.ReferenceFrame = currentMap;
     AllMaps[currentMap].Layers.Add(layer);
     AllMaps[currentMap].Open = true;
     version++;
     LoadTree();
     if (newRoot.children != null && newRoot.children.Count > 0)
     {
         if (newRoot.children[0].LookAt != null)
         {
             KmlLayerUI.GotoLookAt(newRoot.children[0]);
         }
     }
     return layer;
 }
 public KmlLayerUI(KmlLayer layer)
 {
     this.layer = layer;
 }
Exemplo n.º 3
0
 public KmlLayerUI(KmlLayer layer)
 {
     this.layer = layer;
 }