Fuck you to whomever makes mymaps such a klunky piece of shit. I fucking hate using it. And all the people commenting useless bullshit in help forums on this topic can also eat shit.
-
I've struggled for years with having "too many layers" in mymaps. When I originally created.. ahem ..MY mymap, I decided organization via layers was the way to go. Unfortunately, I soon hit the layer ceiling (which I believe is 10). Which means when I find new maps of interesting things online, I can't just import them to my master map. Undoing this mistake has been a mindblowingly frustrating experience. In order to reduce layers and consume/assimilate all the maps and points of interests I can find on the internet, I've wasted hours of my life trying to merge the layers using a variety of methods.
Maybe I'm just an idiot, considering that I just realized today how easy it is to do it manually.
THE PROBLEM:
When I tried to move the placemarks from one layer to another from within mymaps itself, I get about 5-10 moved before mymaps crashes. EVERY FUCKING TIME on EVERY COMPUTER. So I then hit the error message > Reload link it generates and find that most of the ones I moved didn't get saved. FfffFFFffuuuuckkk. It's the most klunky fucking thing ever. It takes forever and crashes and loses all your work. Fuck you, google.
Googling solutions for this problem results in unnecessarily convoluted bullshit like this which doesn't work:
https://gis.stackexchange.com/questions ... oogle-maps
I wasted a bunch of time with online tools that automatically merge kml's for you. But they seem to lose the icon styles/colors and default everything to blue. It'd take a LONG fucking time to redo all the individual placemark icons. Fuck that.
https://kmlmerger.com/
-
I've tried digging into this off and on for years, usually giving up out of frustration. Again, maybe I'm just stupid. At any rate, finally today I was stuck in a day-long work class and decided I would tackle this problem again.
THE SOLUTION:
What I discovered/realized is that KML files are just XML files. And each layer is simply a "folder". Which means...
All you have to do is modify the code to remove the separate folders and thus contain all the placemarks within WHATEVER FUCKING LAYER(\FOLDER) YOU WANT THEM IN. VOILA. Depending on your ability to CTRL+F and search through XML code, this takes mere SECONDS.
It's EASY AS FUCK.
So here's what you do:
Download your KML file. Make a copy of it because you're a dumbass who will probably overwrite the original and then reupload it or something stupid. Change the file extension to XML. Open it with Notepad++
The top part of the XML file contains a bunch of (apparently useless) information. The important stuff starts with the first <Folder> tag. In my case, this is generally around line # 3593. Simply CTRL+F and search for <Folder>. That's your first layer. It should be just below the </StyleMap> tag. Just look at the tag above it and verify it's just below the </StyleMap> tag.
Now if you're trying to merge X number of layers into one, then consider the first layer to be your main layer going forward. So what you'll want to do is find the end of this layer(/folder). This is simple. Search for the </Folder> end tag. This is the end of your first layer(/folder). Here's an example snippet of code.
All you gotta do is DELETE the tags between the placemarks at every layer(/folder) that you're wanting to remove in your code like so. The objective is making all your placemarks exist in the same folder. Each placemark is, obviosuly, a location on your map. So the above code snippet should look like this:
</Placemark>
</Folder>
<Folder>
<name>Layer 2</name>
<Placemark>
The very end of your code should look like something like this. Simply note that there's very little code here. There's the end of your last placemark, the </Folder> end tag and the document and kml closing tags. If you have only one <Folder> start tag at the top (directly under </StyleMap> tag) and one </Folder> end tag at the bottom like this, then you have one layer in your map. Success.
</Placemark>
<Placemark>
</Placemark>
</Folder>
</Document>
</kml>
When you're done, just change the extension back to KML and upload. Create a new mymap to test/verify.
If you're merging X number of layers into one, then you should only have ONE <Folder> start tag at the top and one </Folder> end tag at the bottom and that's it. If you want more layers, just make sure you have both start and end folder tags to contain them. All you gotta do is realize that the <Folder> tags designate your layers start point and </Folder> designates your layer end point.
By doing this, you also RETAIN ALL of your icons/colors/etc.
I have NO FUCKING IDEA why this information isn't posted elsewhere on the internet, or why all the online mergers/etc that I've tried totally erase all the icon/color settings when it's this EASY to do it correctly and RETAIN ALL OF THAT SHIT.
I've tested this on various map KML files of mine and I've found that the (apparently useless) header information makes literally no impact on any of my maps. Cutting and pasting the content of the <Folder></Folder> tags (and all placemarks contained therein) WORKS FINE across any of my maps. I can cut and paste all my maps together however the fuck I want. It works.