I have multiple arrays to keep track of which kml to feed the map.
Anyhow it run into problem when using preserveViewport =true.

It works without preserveViewport set but jumps around the map :-(
Also it works setting it to "true" when just using a single KML
file..
But when assigning the arrayindexes the true setting in the loop below
nothing shows up!?


Also is there a way to just set the map once to display all in the
KmlLayer[i] array)?



for (i = 0; i < KmlID.length; i++) {
if (KmlID[i]!= undefined){
KmlLayer[i]= new google.maps.KmlLayer(url+locations[i][1]+".KML",
{preserveViewport:true});
//ALSO TRIED THE BELOW, SAME RESULT
//KmlLayer[i].set('preserveViewport', true);
}

}

for (i = 0; i < KmlID.length; i++) {
if (KmlID[i]!= undefined){
KmlLayer[i].setMap(map);
 }
}

-- 
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 google-maps-js-api-v3@googlegroups.com.
To unsubscribe from this group, send email to 
google-maps-js-api-v3+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to