The kml file in question can be found at 
http://heinztrucking.com/files/gps/expr.kml

I have a google-maps mashup to display track logs for bicyclists. It
worked fairly well with "small" test files - every file I generated,
even for a 60 mile trip, was less than 16k.

Then, yesterday, a user sent me a KML file they were having problems
with - it's over 360k in size and it uploads okay to the mash-up when
I call GGeoXML(), but no map appears and the error "Script error.
(main.js,0)" appears in the browser's log.

This happens both in my own application and if I try to feed the kml
file to Google's "Code Playground" - but the file loads fine in Google
Earth. If I re-save the file from Google Earth into kmz format, that
also works - but since the file is no longer XML, I lose some of the
"added value" features of my mashup.

I've scanned the Google documentation, but I seem to be well below the
estimated 3 megabyte size limit mentioned in this group.

Any suggestions?

Here's a code fragment that causes the problem in the Code Playground:

var map;
function zoomToGeoXML(geoXml) {
    var center = geoXml.getDefaultCenter();
    var span = geoXml.getDefaultSpan();
    var sw = new GLatLng(center.lat() - span.lat() / 2,
                    center.lng() - span.lng() / 2);
    var ne = new GLatLng(center.lat() + span.lat() / 2,
                    center.lng() + span.lng() / 2);
    var bounds = new GLatLngBounds(sw, ne);
    map.setCenter(center);
    map.setZoom(map.getBoundsZoomLevel(bounds));
}

function initialize() {
  if (GBrowserIsCompatible()) {
    map = new GMap2(document.getElementById("map_canvas"));
    var geoXml = new GGeoXml("http://heinztrucking.com/files/gps/
expr.kml",
                function() { zoomToGeoXML(geoXml); });
    map.addOverlay(geoXml);
  }
}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to