A possible bug after custom POIs export

Started by Sersus2, April 28, 2020, 15:55:31

0 Members and 2 Guests are viewing this topic.

Sersus2

After exporting custom POIs in a .kmz file the "doc.kml" containing  some corrupted values. Because I don't  know are they really important for an internal usage in Locus app and whether they will affect the further application behavior after being imported back, but in any case...

A piece of xml code with possible corrupted hrefs in bold:

<?xml version="1.0" encoding="utf-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
   <name>POI_Locus17.04.2020</name>
   <atom:author><atom:name>Locus (Android)</atom:name></atom:author>
   <Style id="file:///sdcard/Locus/cache/images/1571471453728">
      <IconStyle>
         <Icon><href>files/file-sdcardLocuscacheimages1571471453728.png</href></Icon>
         <hotSpot x="0.5" y="0.0" xunits="fraction" yunits="fraction" />
      </IconStyle>
   </Style>
   <Style id="file:///sdcard/Locus/cache/images/1571474934715">
      <IconStyle>
         <Icon><href>files/file-sdcardLocuscacheimages1571474934715.png</href></Icon>
         <hotSpot x="0.5" y="0.0" xunits="fraction" yunits="fraction" />
      </IconStyle>
   </Style>
   <Style id="file:///sdcard/Locus/cache/images/1570260612568">
      <IconStyle>
         <Icon><href>files/file-sdcardLocuscacheimages1570260612568.png</href></Icon>
         <hotSpot x="0.5" y="0.0" xunits="fraction" yunits="fraction" />
      </IconStyle>
  •  

Menion

Hello Serus2
quite interesting export result. Are you able to give me exact steps on how to simulate the same problem? Steps from creating a new point up to this export. Thanks.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Sersus2

From the Main screen: Data -> POINTS -> "MyFavorites"...-> Export with "Share exported data" and "Incl. description & attachements".
An export path is default: "/sdcard/Locus/export"
The resulting filename could be in rus locale, if it matters.
  •  

Menion

Hi, I'm finally looking on this "problem".
What exactly is wrong here? Did you try this file in any Google Earth or similar app and icons does not work? Re-import back to Locus Map does not work? Because I agree that names and "href" are little longer, but seem to be perfectly valid.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

poutnikl

#4
Hmm, how should the XML parser decide, where the slashes separating folder names in the 2nd URL belong to ?

file:///sdcard/Locus/cache/images/1571471453728
versus
files/file-sdcardLocuscacheimages1571471453728.png

Menion

And why should parser decide? There is no need to separate path to folders. It is a relative path within the packed KMZ file.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

poutnikl

I see. Sorry for the naive question. :-) It just looked strange.

Menion

No need to sorry, I had to look into code to understand it as well  ;D

It is weird because it is some kind of private icon created probably by the previous import of any kml file, do not know for sure.
- Official help (ideas, questions, problems): help.locusmap.eu
- Advanced topics, sharing of knowledges: you're here!
- LM 4 Beta download, LM 4 Release download
  •  

Sersus2

Quote from: menion on May 11, 2020, 09:25:37
And why should parser decide? There is no need to separate path to folders. It is a relative path within the packed KMZ file.
Oh yes, now I see! After looking through thousands lines of my own code my eyes haven't recognized the first slash within such a deceptive name so I decided it is a bug there.  :-[
  •