Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I am currently using the google maps api v3 to load kml files into my web application. The file I am having trouble with is a KML which is 274 KB big. It will not load (uncompressed the file is about 8mb). If I take out elements from the file to shrink it, then i does load in my web app.

But when i use *http://maps.google.com/?q=http://myapp/kml/mykml.kmz, then the KML loads perfectly. If someone can shed some light on this it will be greatly appreciated

share|improve this question
1  
All KML/KMZ are passed through Google Servers - Maximum fetched file size (raw KML, raw GeoRSS, or compressed KMZ) is only 3MB. code.google.com/apis/kml/documentation/mapsSupport.html –  Mapperz Sep 2 '11 at 13:54
    
ok so fetched file size would mean my kmz (274 kb) is within the limit? (not the 8mb kml i had before zip) –  Wilhelm Erxleben Sep 4 '11 at 8:22
    
I have been having problem with the zooming on security code from my yahoo signing in. What can I do to minimize the zoom or remove the zoom in other for me to login to my yahoo email account through my blackberry phone –  user22010 Sep 15 '13 at 15:09
add comment

3 Answers 3

Im not so sure on the restrictions in the API but I would imagine a file that size would render extremely slow. An option could be to import your KML file into google fusion tables and then query it using the GM API. The filesize limit is 100mb though, when importing to google fusion tables.

share|improve this answer
1  
workaround, you can have multiple fusion tables linked to one map. –  Mapperz Sep 2 '11 at 13:55
    
thanks for the quick response,I have in fact considered fusion tables, my concern was that i dont want to make the kml/kmz publicly accessable, would i be able to control who has access to this data? –  Wilhelm Erxleben Sep 4 '11 at 8:44
add comment

274 Kb for a KMZ should not be a problem. However Google caches your kml file. So if it was not correctly placed or corrupted it will not show. A handy trick to get Google to refresh your file is to change the url in a way that it points to the same file but looks like a new one to Google.

try:

http://your_url/your_path/your_filename.kmz?123

This is especially handy if you want a new kml to refresh immediately on your site. Of course you have to change the argument ?123 in some other number to refresh again.

share|improve this answer
    
Hi, thanks for the quick response ive done the refresh and its still not showing in my web app. but when i downloaded the kml through the url it diplays 100% in google earth –  Wilhelm Erxleben Sep 4 '11 at 8:31
add comment

If your server takes a while to respond (more than a few seconds), Google will abort fetching. You could check that. I don't know if that would affect the KML search on maps.google.com.

share|improve this answer
    
Hi, thanks for the quick response, this might very well be my problem, could you please let me know how i could test this, ive tested the code from running it locally on my computer as well as published to my iis server(where the kmz file is also located) and both ways failed to load the kmz –  Wilhelm Erxleben Sep 4 '11 at 8:35
    
If you open up Firebug in Firefox, or Developer Tools in Chrome, and go to the network panel (net panel in Firebug), you'll see a 500 Internal Server Error on for a request to maps.googleapis.com/maps/api/js/… url]&callback=[whatever]&token=[whatever]. There's more on this issue at code.google.com/apis/maps/documentation/javascript/… . –  mattwigway Sep 4 '11 at 22:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.