Select to view content in your preferred language

KML Network Link with Dynamically Generated KML

3952
5
01-03-2013 05:16 AM
GregMcMenimen
Emerging Contributor
I have been trying to figure this out for some time now and still cannot get it to work.  I have a KML file with one or more KML NetworkLinks.  In each NetworkLink Link tag the href tag holds a url that generates dynamic KML from another source using php and a number of parameters. 

When I test the url link that is contained in the href tag in a browser I am able to download the KML that it generates and I can view it on my map and on Google Earth.  So I know that the url generates KML but for some reason I cannot get the KMLLayer to parse it out as KM.  Is it because it is href generates dynamic KML?  I have no idea why this would not work.

Anybody else run into this problem with KML NetworkLinks and dynamic KML?

Thanks
0 Kudos
5 Replies
DominiqueBroux
Esri Frequent Contributor
Could you share an Url allowing to reproduce the issue?
0 Kudos
GregMcMenimen
Emerging Contributor
I wish I could but it is a closed network.  I have determined that the problem is a cross domain problem which gives me the 'Security Error' exception.  I have attempted to download the Silverlight proxy example from here:  http://help.arcgis.com/en/webapi/silverlight/help/SLProxyPage.zip but I keep getting a 404 error that the files is not available.
0 Kudos
DominiqueBroux
Esri Frequent Contributor
I have determined that the problem is a cross domain problem which gives me the 'Security Error' exception
If you set the ProxyUrl property of the KML layer, the proxy will be used for the Network Link as well.
So this should solve your issue.

For testing purpose you can use our proxy demo server : http://servicesbeta3.esri.com/SilverlightDemos/ProxyPage/proxy.ashx

If that helps you will have to install your own proxy.

I have attempted to download the Silverlight proxy example from here: http://help.arcgis.com/en/webapi/sil...LProxyPage.zip but I keep getting a 404 error that the files is not available.


You can download the proxy example here.
0 Kudos
GregMcMenimen
Emerging Contributor
The download worked great.  I ended up having to create a new website because I am using SharePoint in the same IIS which uses port 80 in the root web.  I set the default directory on the newly create web site to the location of the proxy.ashx files and tested the ping which worked without problems.  But I am getting a 401 authentication error and then all the 500 errors after that but the site that the network link is located does not require a token for authentication.  

The reason for setting the proxy in another web site is by putting it into the default web site I was getting a 404 error that it could not find the proxy.ashx.  Again, this is a closed network.  But with multiple domains.

Thanks again for your help.
0 Kudos
GregMcMenimen
Emerging Contributor
I now have the KML NetworkLink showing data on the map (ended up being that it was not reading the clientaccesspolicy.xml file) but when it performs the refresh it is not really refreshing the points generated from the KML link.  It looks like it is refreshing the original KML points and not pulling any of the new points added or changed.  I ran Fiddler after ading the network-linked KML layer to the map but Fiddler did not reveal anything that looked like it was pulling fresh KML.  Actually, Fiddler show no new sessions when I added the network-linked KML layer to the map and cleared all the original sessions.  My refresh interval was set to 10 seconds.  And you can see the KML points flash on the map every 10 seconds.  If I move one point of data that the network-linked KML is pulling from, the map shows nothing changed.

Am I missing something in the KML link?  I have refreshMode set to onInterval and refreshInterval set to 10 seconds.
0 Kudos