Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changing appearance Waypoints - cannot be persisted #19892

Open
GuentherGredy opened this issue May 17, 2024 · 6 comments
Open

Changing appearance Waypoints - cannot be persisted #19892

GuentherGredy opened this issue May 17, 2024 · 6 comments
Assignees
Milestone

Comments

@GuentherGredy
Copy link

Description

For my use cases I plan routes, tracks and POIs in Garmin's BaseCamp. Then I copy them to a folder on my mobile (Android 14) and import them from there to OsmAnd (4.7.10); folder "...\Interner Speicher\Android\data\net.osmand.plus\files\tracks\ActualTour".
In former versions of OsmAnd I could change properties of POIs (color, icon) and persist the changes. In the newest version this is not possible any more.

Steps to reproduce

Menu: Meine Orte
Tab: Tracks
Selection: folder "ActualTour"
Menu: Import
Selection: POI on map
Press "Aktionen"
Press "GPX-Wegpunkt bearbeiten"
Select icon and color
Press "Speichern"

Actual result

POI remains unchanged

Expected result

POI gets the edited properties

Your Environment (required)

WARNING Crash-Logs MAY contain information you deem sensitive.
Review this CAREFULLY before posting your issue!

OsmAnd Version: 4.7.10
Android/iOS version: 14
Device model: Samsung Galaxy A54
Crash-Logs: ?
@vshcherb vshcherb added the Observed Needs more clarification, feedback, or research label May 17, 2024
@yuriiurshuliak
Copy link

yuriiurshuliak commented May 28, 2024

@GuentherGredy Could you provide the tracks where you can't change the POI properties, so we can test it on our end?

@yuriiurshuliak
Copy link

The bug could not be reproduced. To reproduce the issue, import your waypoints into the tracks folder. Then, view them on the map, click on the icon, and try to edit the GPX. Change the icon and color, and observe if the changes are successfully saved and reflected on the map.

OsmAnd~ 4.8.0#2416m, released: 2024-05-30

video_2024-05-30_18-34-37.mp4

@sonora
Copy link
Member

sonora commented May 31, 2024

@yuriiurshuliak Now restart the app and check.To my experience the appearance change is lost after the next app start.

Some things to fix:

  • (1) Using Track context>Points>3-dots>Change default appearence unnecessarily adds these lines to every wpt section, significantly inflating the file, and incorrect color value #00000000
    <extensions>
      <osmand:color>#00000000</osmand:color>
    </extensions>
  • (2) It adds this general appearance extension (probably all that's needed) to the end of the file behind the last </wpt>, but OsmAnd ignores it after the next app start, instead shows all waypoints in some app default appearance instead:
  <extensions>
    <osmand:points_groups>
      <group name="Group 1" color="#0000ff" icon="special_star" background="circle" />
      <group name="Group 2" color="#0000ff" icon="special_star" background="circle" />
    </osmand:points_groups>
  </extensions>
  • (3) The issue is not limited to gpx handling in our tracks folder, the favorites display seems similarly affected.
  • (4) The issue exists even if you manually edit gpx files to just include the osmand:points_groups in the end, but it is even more convoluted if the user uses an import function.
  • (5) There is also a related issue that if you manually place a file which has 2 point groups and a valid appearance extension for them in the favorites folder, when the favorites mechanism splits it for the 2 groups, it does not correctly take over the osmand:points_groups extension (I think at least the color tag is missing).

@vshcherb
Copy link
Member

vshcherb commented Jun 4, 2024

To do:

  • (1) Using Track context>Points>3-dots>Change default appearence unnecessarily adds these lines to every wpt section, significantly inflating the file, and incorrect color value #00000000
    <extensions>
      <osmand:color>#00000000</osmand:color>
    </extensions>
  • Reset should delete osmand:points_groups
  • Waypoint appearance should only change osmand:points_groups

@vshcherb vshcherb added this to the 4.8-android milestone Jun 4, 2024
@vshcherb vshcherb added and-gpx-track and removed Observed Needs more clarification, feedback, or research labels Jun 4, 2024
@vshcherb vshcherb changed the title Changes to imported objects cannot be persisted Changing appearance Waypoints - cannot be persisted Jun 12, 2024
@sonora
Copy link
Member

sonora commented Jun 12, 2024

@vshcherb Upon re-reading the todo's, I am a little unclear if/when we actually transfer appearance changes to the gpx files, vs. only note that in the gpx database? What's our strategy here, does e.g. "Reset should delete osmand:points_groups" mean we modify the file itself?

@vshcherb
Copy link
Member

Yes, we don't store point appearance in DB cause it's too much to handle for now, so we will modify file but only a specific section for waypoint appearance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants