Author Topic: A possible bug after custom POIs export  (Read 361 times)

Offline Sersus2

  • More than Newbie
  • *
  • Posts: 13
    • View Profile
  • Device: Xiaomi Mi9T
A possible bug after custom POIs export
« 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>
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11776
  • Thanked: 409 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: A possible bug after custom POIs export
« Reply #1 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.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline Sersus2

  • More than Newbie
  • *
  • Posts: 13
    • View Profile
  • Device: Xiaomi Mi9T
Re: A possible bug after custom POIs export
« Reply #2 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.
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11776
  • Thanked: 409 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: A possible bug after custom POIs export
« Reply #3 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.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline poutnikl

  • Master of Locus
  • ****
  • Posts: 607
  • Thanked: 63 times
    • View Profile
    • My Brouter Profiles
  • Device: Xiaomi MI A2 (6G/128G) / A10 / LM3 Pro + LM4 alpha
Re: A possible bug after custom POIs export
« Reply #4 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
« Last Edit: May 11, 2020, 09:07:15 by poutnikl »
https://github.com/poutnikl/Brouter-profiles/wiki
When a user digs profiles up from the GitHub repositories,
they will be hopefully wrapped in some wiki knowledge....  :-)
Try also https://github.com/poutnikl/Brouter-profiles/wiki/Determining-optimal-bicycle-profile
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11776
  • Thanked: 409 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: A possible bug after custom POIs export
« Reply #5 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.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline poutnikl

  • Master of Locus
  • ****
  • Posts: 607
  • Thanked: 63 times
    • View Profile
    • My Brouter Profiles
  • Device: Xiaomi MI A2 (6G/128G) / A10 / LM3 Pro + LM4 alpha
Re: A possible bug after custom POIs export
« Reply #6 on: May 11, 2020, 09:29:43 »
I see. Sorry for the naive question. :-) It just looked strange.
https://github.com/poutnikl/Brouter-profiles/wiki
When a user digs profiles up from the GitHub repositories,
they will be hopefully wrapped in some wiki knowledge....  :-)
Try also https://github.com/poutnikl/Brouter-profiles/wiki/Determining-optimal-bicycle-profile
 

Offline menion

  • Administrator
  • Professor of Locus
  • *****
  • Posts: 11776
  • Thanked: 409 times
    • View Profile
    • http://www.asamm.com
  • Device: SGS7
Re: A possible bug after custom POIs export
« Reply #7 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.
Ideas, wishes, problems
Advanced topics, public discussion, sharing of knowledges, testing beta versions: you're here!
 

Offline Sersus2

  • More than Newbie
  • *
  • Posts: 13
    • View Profile
  • Device: Xiaomi Mi9T
Re: A possible bug after custom POIs export
« Reply #8 on: May 17, 2020, 12:35:16 »
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.  :-[