Import KMZ into existing folder messes up icons.

Chris Zee shared this problem 7 years ago
In Progress

When importing a KMZ into an empty folder, everything works. However, if I import a kmz into a folder that *already* has points (imported from an older version of the kmz), the icons are messed up! This doesn't happen everytime, but frequently enough to be annoying. It seems that Locus gets confused and assigns wrong icons to the points.


This happens even if I select "Empty Selected Folder" option during the import. The only way to avoid this is to manually delete all points from the folder before importing the kmz.


I'm using Locus Pro 3.18.9 on Android 5.0.2.

Replies (12)

photo
1

Good day Chris,

thank you for a report. Is it possible to share some smaller KMZ file with me (just rename to "zip" to attach it here), so I may test it? I'm asking because I have no such experience and maybe your file is somehow special, thank you.

photo
1

hi Menion


here's the KMZ file. And screenshots of the same KMZ file, one with the messed up icons(Screenshot_2016-09-26-12-31-07_menion.android.locus.pro) and the other with the icons as they should be. The KMZ is of course exported from Google My Maps.

photo
1

Good day Chris,

thank you for a file. It looks like file is completely fine. It is possible to you have discovered one limitation of cache system of Locus. Is it possible that you have imported two different files with exactly SAME name into Locus? Because wrong icons on screenshot have to come from some of your file, not from Locus itself.


If you file is named 1.MY.kmz, then try to delete directory Locus/data/import/1mykmz and try to import this file again. It should then work correctly.


Sorry for a troubles and thanks for pointing on this weak place. Let me know if it works for you.

photo
1

Hi Menion


Thanks for looking into this. The files are generated by Google My Maps. I update the map in My Maps, then export it as KMZ, and import it into Locus. A few days later, I might update the map in My Maps, and again export it into a KMZ and again import them into Locus. I don't know if you consider these to be different files or different versions of the same file.


I think you may be right about the problem with the cache. Today, to take the screenshots earlier, I deleted all points in a folder and imported a KMZ. I noticed that the icons was fine after I did an import, and I took the screenshot. But in the evening, the icons were was messed up again!


I deleted the files you suggested in the import directory, and have re-import the same file. It looks fine. I'll try it over the next few days to see if the problem goes away.

photo
1

Well, no sooner had I posted the earlier comment, and now the icons that were correctly imported just a moment again, are now messed up again.

I noticed something strange. I have 2 kmz files. Call them A.kmz and B.kmz. Both are generated from different Google My Maps.

1. I import A.kmz into folder A, and the icons are fine.

2. I import B.kmz into B folder, and the icons in A folder are now messed up.

3. I re-import A.kmz into A folder. Now the icons in B folder are messed up.

The 2 kmz files contain similar icons. But why would that affect each other? I forgot to mention that both folders are in the same group. Would that matter?

photo
1

Hi Menion


I think I know what is happening. Whenever I import a KMZ, Locus somehow updates the icons of the existing folder with icons of the SAME NAME in the KMZ file. Eg, say in A.KMZ, I have an icon named icon-1.png, which is, say a red icon. I import A.KMZ into folder A.


Now, I have B.KMZ, in which icon-1.png is a GREEN icon. I import B.KMZ into folder B. Locus now updates the icons in folder A such that all icon-1.png in folder A are now green instead of the original red.

photo
1

Hello Chris,

yes, this is what I expected. You may check how these icons change in mentioned cache folder /import/akmz etc.

May you please share with me these two files that overwrite each other? Because if they have different names, this should not happen. Thank you and sorry for a complications!

photo
1

Hi Menion


Sure, attached is a zip of the 2 kmz files (with their original names).

photo
1

Good day Chris,

thank you for a files. I'm sorry to say it, but this seems to be more complicated as I'm still unable to simulate a problem.


Small explanation how it works and how I test it.

- I have renamed directory Locus/data/import into Locus/data/import_old so no cached images will be used

- I have imported file 1.MY.Food and Places exclude other maps (8).kmz into folder "test1" with option to clear content before import

- result of first import is 522 points in folder test1 and directory Locus/import/1MYFood_and_Places_exclude_other_maps_8kmz with 8 images inside

- then I have imported file 1.Sg.Food (8).kmz into folder test2

- result of this second import is 358 points in folder test2 and directory 1SgFood_8kmz with 12 images


Display of all these points works fine. Don't you have any idea, what you do different compare to me, that may cause these problems? Thank you and sorry for a complications.

photo
1

I imported the files by launching them from Google Drive instead of hitting the import button in Locus, but I don't think that would make any difference.

When the files are imported, did you check the icons are correct? What I mean is, are the correct icons assigned to each data point? For example, the file 1.MY.Food and Places exclude other maps (8).kmz should, after import, contain mostly purple icons instead of green ones (as shown in the attached screenshots).

photo
1

Hi Menion


Can you confirm that if you import file1, then file2, file 1's folder remains OK? Assuming File 1 is 1.MY.Food and Places exclude other maps (8).kmz , are the icons mostly purple icons ( with fork and knife) or green icons (of a waiter)?

photo
photo
1

Good day Chris,

sorry for a delay. Unfortunately I'm still unable to simulate your problem. I've modified your files so now every file contains just one type of icon, so it easier to check if all is correct.

I've removed whole directory "Locus/data/import" just to be sure and then imported both files into same folder. All looks correct. After close/open of Locus, still correct icons are attached.

I would really like to solve this issue, but unfortunately I'm unable to simulate it. Any ideas what you did differently?


Attached modified files

photo
1

Hi Menion


Why did you import the 2 files into the same folder? I imported them into different folders, and imported the files by launching the kmz files from Google Drive. Is there any difference between importing files this way vs importing from the within Locus Pro?

photo
1

Hello Chris,

sorry, I'm trying many options and one try was also to same folder. Anyway no difference no matter what I do. I'm sorry, but I'm still unable to simulate this problem on own device. There has to be something more you do, that cause these troubles.

I can imagine that only problem may happen, when you import file with different icons but exactly same name. So like a different file also named "1.MY.Food and Places exclude other maps (8).kmz" with different icons. Then Locus extract icons from this file to same directory which may cause such troubles.

I can only ask you to try this with method I wrote here , so mainly with empty "import" directory. Most import for me is to repeatedly simulate the problem. Thanks for understanding and sorry for a complications.

Leave a Comment
 
Attach a file