This python script can sort GoogleMyMaps's placemark by Latitude and Longitude
Google My Maps is a very useful service to sharing your place point to other. But when there are too many placemarks in one map, it is wasting time to move from layer to layer. The first thought is to sort placemark coordinate by Latitude and Longitude
(The second thought is grouping/clusting)
python 3.2+ (due to using iter() in ElementTree)
- Export GoogleMyMaps data to KML (not KMZ)
- Change KML file name as "input.kml" (There is an example file)
- Execute "sortGoogleMyMapsKml.py"
- It should generate "output.kml"
- Import "output.kml" into GoogleMyMaps
-
Now it can handle layer(folder)
-
If you want to change the sorting order or reversing Latitude, you can edit function "sortPlaceByLatAndLong"
-
Besides place point, now it can handle polygon object But it only considers the first point(x,y) of polygon as its coordinate