POST
|
I contacted Support since I was not getting a response. I learned that I needed to call "kmlLayer.Connect()" right before I add it to the Map. I hope that helps someone else.
... View more
08-08-2013
07:09 AM
|
0
|
0
|
266
|
POST
|
I realized that I left out a line of code in my previous post. Here is a corrected sample of code: MapDisplay _md = null;
_md = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay;
string strMachineName = "localhost";
KmlLayer kmlLayer = new KmlLayer(new Uri(@"http://" + strMachineName + @"/KML/Projects.kml", UriKind.Absolute));
kmlLayer.Name = "LinkToKMLFile";
_md.Map.ChildItems.Add(kmlLayer);
... View more
07-19-2013
08:35 AM
|
0
|
0
|
266
|
POST
|
Is there a way to programmatically expand the ChildItems under an item in the Contents pane? I have a KmlLayer with a refresh interval set on it. Every time that it refreshes, it collapses and the ChildItems are not shown. Is there any way to keep this from happening?
... View more
06-18-2013
02:12 PM
|
0
|
0
|
406
|
POST
|
I am trying to add a KmlLayer to my Map programmatically. Here is what I am doing: MapDisplay _md = null; string strMachineName = "testmachine"; KmlLayer kmlLayer = new KmlLayer(new Uri(@"http://" + strMachineName + @"/KML/ProjectIndex.kml", UriKind.Absolute)); kmlLayer.Name = "Project Index"; _md.Map.ChildItems.Add(kmlLayer); When this code completes, the item in the Contents list has a red exclamation point in the icon and the tool-tip "Invalid data source". If I double-click it, the "Repair KML Network Link" dialog comes up with the URI that I added to my item. If I click the "Repair" button, the item it "fixed" somehow. What does this "repair" do to the KML Node? How can I do these fixes from my code?
... View more
06-18-2013
02:07 PM
|
0
|
2
|
639
|
POST
|
Is there a way to export a Note to KML using code from an Add-In? I want to be able to do the same thing I can do manually by "sharing" by note and creating a KML (really a KMZ file), but I want to do it using C# code in my custom Add-In. Is that possible? I do not see anything in the SDK that looks like what I want to do. Is something like this in the API anywhere?
... View more
06-07-2013
06:59 AM
|
0
|
0
|
415
|
POST
|
Is there a way to export a Note to KML using code from an Add-In? I want to be able to do the same thing I can do manually by "sharing" by note and creating a KML (really a KMZ file), but I want to do it using C# code in my custom Add-In. Is that possible? I do not see anything in the SDK that looks like what I want to do. Is something like this in the API anywhere?
... View more
06-05-2013
12:13 PM
|
0
|
0
|
97
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|