Select to view content in your preferred language

KML Network Link not working with ArcGIS Online

2931
2
Jump to solution
06-04-2012 01:17 PM
MichaelRock
Occasional Contributor
We have a kml file that is updated every 5 seconds.  I would like to use this as a layer in ArcGIS Online.  I can add the kml file directly, but it does not update.  So I created another kml with a network link to that kml.  When I try to add that to a map in ArcGIS Online I get the error message:
------
The KML, http://at http://data.cabq.gov/transit/realtime/route/allroutes_network.kml, cannot be added to the map. It is either not available or you have entered an invalid URL for the type of layer you want to reference.
-------
Does this work in theory? To get ArcGIS Online to refresh a kml file at a set interval of seconds?  If it should work can anyone tell where my kml code is wrong?

Here is the link to the ArcGIS Online map.

Here is the latest code for the network link kml.  I have tried a bunch of different iterations of the code using suggestions from this forum, Google's kml reference, and a general Google search.

<?xml version="1.0" encoding="UTF-8"?>
<kml>
<folder>
<NetworkLink>
<name>All Transit Routes</name>
<open>1</open>
<visibility>1</visibility>
<Url>
  <href>http://data.cabq.gov/transit/realtime/route/allroutes.kml</href>
  <refreshMode>onInterval</refreshMode>
  <refreshInterval>10</refreshInterval>
  <viewRefreshMode>onStop</viewRefreshMode>
  <viewRefreshTime>7</viewRefreshTime>
</Url>
</NetworkLink>
</folder>
</kml>

Thanks for your help.

Mike Rock
City of Albuquerque
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
MikeMinami
Esri Notable Contributor
This link seems to work for me, but interestingly, it doesn't work in Google Earth.

"http://data.cabq.gov/transit/realtime/route/allroutes_network.kml"

To add it to the web map, from the Map Viewer, I clicked Add>Add file from web. I chose the KML option and entered the URL.

Thanks,

Mike

View solution in original post

0 Kudos
2 Replies
MikeMinami
Esri Notable Contributor
This link seems to work for me, but interestingly, it doesn't work in Google Earth.

"http://data.cabq.gov/transit/realtime/route/allroutes_network.kml"

To add it to the web map, from the Map Viewer, I clicked Add>Add file from web. I chose the KML option and entered the URL.

Thanks,

Mike
0 Kudos
MichaelRock
Occasional Contributor
Thanks Mike for checking.  It works for me now too, and I didn't change anything!  I suspect it might be our server caching kml files - maybe my code was wrong on the first network link kml and when I got the correct code the server was still using the old file.

Anyway, thanks! 


This link seems to work for me, but interestingly, it doesn't work in Google Earth.

"http://data.cabq.gov/transit/realtime/route/allroutes_network.kml"

To add it to the web map, from the Map Viewer, I clicked Add>Add file from web. I chose the KML option and entered the URL.

Thanks,

Mike
0 Kudos