Opened 4 months ago

Last modified 4 months ago

#21933 new enhancement

Customization of GPS drawing options

Reported by: Bjoeni Owned by: team
Priority: normal Milestone:
Component: Core Version: tested
Keywords: gpx, color, mapcss Cc:


Followup of #20600 (and #13484, #20601, #21810, #21928)

GPS drawing options are currently quite limited and hardcoded. They should be customizable. This could be done a couple of different ways:

  • Making currently hardcoded colors customizable as NamedColorProperties
  • Allowing plugins to easily extend the existing functionality
  • Implementing MapCSS for GPX layers?
  • Implementing something else allowing the user to customize track colors for certain values

Replying to stoecker:

I wonder if GPX layers should support MapCSS as well, so they can be styled directly instead of implementing all variants in JOSM core.

Attachments (0)

Change History (1)

comment:1 Changed 4 months ago by taylor.smock

  • Implementing MapCSS for GPX layers?

This should be fairly easy to do -- we just need to have GpxData implement OsmData, and then we can essentially reuse the draw code in OsmDataLayer (MapRendererFactor.getInstance.createActiveRenderer(...)).

Honestly, the sticking point might be figuring out how to implement INode, IWay, and IRelation for GPX datasets. Especially since they are (technically) for OSM nodes/ways/relations.

Possible mapping:
INode -> WayPoint
IWay -> IGpxTrackSegment
IRelation -> IGpxTrack/IGpxRoute -- this will probably need a "parent", i.e. IGpxTrack extends IGpxRelation and IGpxRoute extends IGpxRelation.

Modify Ticket

Change Properties
Set your email in Preferences
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to Bjoeni
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.