Locus Map - forum

Support => Troubles & Questions => Topic started by: Sersus2 on April 28, 2020, 15:55:31

Title: A possible bug after custom POIs export
Post by: Sersus2 on April 28, 2020, 15:55:31
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>
Title: Re: A possible bug after custom POIs export
Post by: Menion on April 29, 2020, 21:54:30
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.
Title: Re: A possible bug after custom POIs export
Post by: Sersus2 on May 05, 2020, 17:58:31
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.
Title: Re: A possible bug after custom POIs export
Post by: Menion on May 11, 2020, 07:14:57
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.
Title: Re: A possible bug after custom POIs export
Post by: poutnikl on May 11, 2020, 09:02:46
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
Title: Re: A possible bug after custom POIs export
Post by: 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.
Title: Re: A possible bug after custom POIs export
Post by: poutnikl on May 11, 2020, 09:29:43
I see. Sorry for the naive question. :-) It just looked strange.
Title: Re: A possible bug after custom POIs export
Post by: Menion on May 11, 2020, 09:45:43
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.
Title: Re: A possible bug after custom POIs export
Post by: Sersus2 on May 17, 2020, 12:35:16
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.  :-[