On Sat, Sep 11, 2010 at 2:21 PM, Rossko <[email protected]> wrote:
> > Thanks. It got much better since removing the call in the <body> tag. I > > suppose there are still bugs since sometimes the map still won't load. > > The example for common loader with the API uses a slightly different > method to you, see source of > > http://gmaps-samples-v3.googlecode.com/svn/trunk/commonloader/commonloader.html > I think it may be significant that the callback isn't set until after > the desired function has been defined. > Thank you for all the advice. I refactored, it improved. Now I can't reproduce the bug. Here is all the javascript. google.load("maps", "3", {other_params:"sensor=false"}); function initialize() { var latlng = new google.maps.LatLng(google.loader.ClientLocation.latitude, google.loader.ClientLocation.longitude); var myOptions = { zoom: 2, center: latlng, mapTypeId: google.maps.MapTypeId.ROADMAP }; var map = new google.maps.Map(document.getElementById("gmap"), myOptions); var ctaLayer = new google.maps.KmlLayer(' http://www.koolbusiness.com/output.kml'); ctaLayer.setMap(map); } google.setOnLoadCallback(initialize); -- 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.
