0

I need to be able to load some KML and KMZ files into Google Maps. The files that I'm working with display without an issue in Google Earth, but when I try to upload them in Google Maps, the file seemingly uploads but doesn't display anything.

The KMZ files at http://www.ec.gc.ca/inrp-npri/default.asp?lang=en&n=1D892B9F-1 (either the 2010, 2009 or the 1993-2010 files) seem to upload fine, but it doesn't display any points on the map. There should be multicoloured dots all across Canada, but none show up. The files are smaller than 10MB also.

I have tried to paste a public URL into the search box instead of importing, but the same issues arise as when I import the files. What has to be done to allow me to display them in Google Maps?

Thanks

Gavin
  • 141
  • 5
  • 12
  • I have only experienced this issue when my kml/kmz is too large or detailed to be handled in gmaps. Try cutting your kml down to just a couple placemarks to test. If it still doesn't work, there are some other issues with your kml. – BasilV May 28 '12 at 22:52
  • Once converted to KML, they are under the 10MB maximum. How do I find out what the issues are? what could they be possibly? Thank you for your help – Gavin May 28 '12 at 23:03
  • I have just tried a couple files: a 1.7MB kmz (4.4MB kml) works well, however a 3.2MB (8.7MB kml) and any larger do not. When it doesn't work, a notification says ".... too large" in the left pane of the gmaps window where directions normally are. – BasilV May 28 '12 at 23:15
  • Whoops, misread your comment. As long as you are under 3MB kmz and 10MB kml, you should be fine. If that holds and you still see issues, I cannot be of further help without samples. Any syntax errors would be caught when opened in GE. – BasilV May 28 '12 at 23:29

1 Answers1

2

The problem is that in this case, the KMLs use a ListStyle which creates the radio button interface you see in Google Earth. But that's not supported in Google Maps: https://developers.google.com/kml/documentation/kmlelementsinmaps

Mano Marks
  • 8,761
  • 3
  • 27
  • 28
  • Is there a way to change the KML files easily so that they'll display in Google Maps? – Gavin Jun 01 '12 at 18:22
  • Easily? No. You'd have to download the KMZ's, extract the KML files from them. Then find the NetworkLinks and download the KMZ there and extract the KML files and go through all of those and make sure they aren't using elements that aren't supported. – Mano Marks Jun 01 '12 at 18:39
  • @Gavin, download the KMLZ file. Change the file extension to .zip. Extract the KML file inside. Open the KML file in a text editor, it's just XML. Find the elements named NetwokLink. Find the Link/href elements. You'll find a URL, like this: http://www.ec.gc.ca/pdb/websol/data/2010_ONLY_NPRI_Data_PROVINCE_E.kmz Download that file and repeat. – Mano Marks Jun 01 '12 at 18:53
  • Thank you, I am able to view the kml file in an editor. What can I change the ListyStyle to that would allow it to display in Google maps? or can I just remove it all together? – Gavin Jun 01 '12 at 19:28
  • Remove any elements not supported in KML, in the doc I linked to in my answer. – Mano Marks Jun 02 '12 at 20:03