Select to view content in your preferred language

Question about KML files and map refershing

2664
1
03-09-2016 11:17 AM
JacobCoble
New Contributor

I have a general question about using KML files, not specifically about ArcGIS Earth, so I hope it is okay to ask it here. I searched this site for for "kml" and this was one of the few forums that I found.

I am using a KML file in an ArcGIS Online Web Map. I imported the KML file into ArcGIS Online and this KML file shows up as a layer in a Web Map. I am having trouble with refreshing the KML in the map. I have found two ways to do a refresh, and both ways are not ideal.

1. I can either refresh the kml layer according to a time interval or,

2. refresh the kml layer when there is a change to the map (pan or zoom).

1. If I use onInterval, as shown below, the contents of the entire layer will refresh on the map every 30 seconds. Some items from the kml layer are stationary (such as weather stations) and some items from the kml layer are moving (vehicles with GPS). So when I refresh the layer by time interval, everything on the layer refreshes, even the items that are stationary. So this whole layer blinks off and reappears on refresh. Ideally I would like it so that only the items from the kml that have actually changed will refresh (I don't know if that is possible).

<Link>

   <href>http://aprs.fi/aprsupdate.kml?units=metric&units_temp=C</href>

    <refreshMode>onInterval</refreshMode>

    <viewRefreshMode>onStop</viewRefreshMode>

    <viewRefreshTime>30</viewRefreshTime>

</Link>

2. The code below (using onChange) will refresh the kml items when the map has a change such as the map being panned. This isn't what I want, either.

<Link>

   <href>http://aprs.fi/aprsupdate.kml?units=metric&units_temp=C</href>

    <refreshMode>onChange</refreshMode>

    <refreshInterval>1</refreshInterval>

    <viewRefreshMode>onStop</viewRefreshMode>

    <viewRefreshTime>1</viewRefreshTime>

</Link>

If there is a way to refresh items that have moved and it is better than the way I described in #1 above, I would like to know about it. I hope this isn't too off topic and I appreciate any help. I have attached the kml file I am using.

Jacob

0 Kudos
1 Reply
by Anonymous User
Not applicable

Hi Jacob,

KML is pretty tricky and there may be a way to do what you are asking, but I haven't heard it, at least not in the way you are trying. The approach that I would probably take would be to have two network links in the same KML, one that refreshes and one that doesn't.

Chris

0 Kudos