What do you mean by "looping"? It looks like the KML file is
continually updated, so I'm guessing you want the map to keep
refreshing the KML layer to keep the visuals constantly moving.
You can use a Network Link in a KML file that has a refresh interval
set. I tried this, and it seemed to work pretty well:
<?xml version="1.0" encoding="UTF-8"?>
<NetworkLink>
<visibility>0</visibility>
<open>0</open>
<refreshVisibility>0</refreshVisibility>
<flyToView>0</flyToView>
<Link>
<href>http://www.srh.noaa.gov/ridge/kml/animation/N0R/
SGF_N0R_loop.kml</href>
<refreshMode>onInterval</refreshMode>
<refreshInterval>2</refreshInterval>
</Link>
</NetworkLink>
The <refreshInterval>2</refreshInterval> part means that ever 2
seconds, it will refresh the overlay.
To learn more about Network Links, check here:
http://code.google.com/apis/kml/documentation/kml_tut.html#network_links
On Jun 20, 6:39 pm, Chris Wilson <[email protected]> wrote:
> Hey,
>
> Been looking around for a couple of hours, i'm trying to find a way to loop
> my kml data overlay....
>
> I'm pulling data from the NWS (radar loops) and it plays once, then
> stops....Cant seem to find any information on controls...I'd like to get it
> to indefinitely loop.
>
> function initialize() {
> var chicago = new google.maps.LatLng(39.715, -96.106);
> var myOptions = {
> zoom: 11,
> center: chicago,
> mapTypeId: google.maps.MapTypeId.ROADMAP
> }
>
> var map = new google.maps.Map(document.getElementById("map_canvas"),
> myOptions);
>
> var ctaLayer = new
> google.maps.KmlLayer('http://www.srh.noaa.gov/ridge/kml/animation/N0R/SGF_N0R_loop.kml');
> ctaLayer.setMap(map);}
>
> </script>
> </head>
> <html>
> <body onload="initialize()">
>
> <div id="map_canvas" style="width:550px; height:600px; float:left"></div>
>
> Any help would be appreciated.
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.