Hello, I'm facing the following issue : here is my script: var myOptions = { mapTypeId: google.maps.MapTypeId.ROADMAP, disableDefaultUI: true, disableDoubleClickZoom: true, draggable: false, keyboardShortcuts: false, scrollwheel: false } mapMetropolitaine = new google.maps.Map(document.getElementById("map_metropolitaine"), myOptions); var ctaLayerMetro = new google.maps.KmlLayer('http://www.mywebsite.com/METROPOLE.KML'); ctaLayerMetro.setMap(mapMetropolitaine); mapMetropolitaine.setZoom(6); var centre = new google.maps.LatLng(46, 2); mapMetropolitaine.setCenter(centre);
The problem is that the setCenter and setZoom functions are executed before the KmlLayer is fully deployed. So it sets the new zoom and then it ends the KmlLayer deployment (done by setMap). So I was just wondering how to be sure the KmlLayer is deployed before I change any map options. i was thinking of using the following code : google.maps.event.addListener(ctaLayerMetro, "myevent", function() { mapMetropolitaine.setZoom(6); }); but I have no idea of the event to call. Best Regards. -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-maps-js-api-v3/-/0bN1ztFcfi4J. 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.