Modify

Opened 2 years ago

Last modified 2 years ago

#22301 new enhancement

Variable circle degree possibly with different colors

Reported by: Hanikatu Owned by: team
Priority: normal Milestone:
Component: Core mappaint Version:
Keywords: mapcss Cc:

Description (last modified by Hanikatu)

Is it possible to display different circle degrees in MapCSS?

E.g.: 0°-30° = green; 60°-90° = white; 100°-140° = red


If not, would it be possible to implement?
I would need it for multiple light directions.
Floodlights or lighthouses

Attachments (1)

light directions.png (1.4 KB ) - added by Hanikatu 2 years ago.

Download all attachments as: .zip

Change History (5)

by Hanikatu, 2 years ago

Attachment: light directions.png added

comment:1 by Hanikatu, 2 years ago

Description: modified (diff)

comment:2 by taylor.smock, 2 years ago

We'd probably have to change a fair amount of code for this. I can see the usage, I just don't know how needed it is, especially with respect to our current backlog.

Code changes:

  1. Symbols would need to accept ranges for where they show up
  2. The ranges would need to be able to accept additional information]
  3. We may have to use slower code paths than we currently are

Possible mapcss:

symbol-shape: circle;
symbol-customization: { // We need to have something to indicate that this is a "block". I don't think we want to have the customization on the same "root" level as the `symbol-shape` either.
    // start-degree: { customization options, preferably the same as those already present for the symbol }
    0: {
        symbol-color: green; // Set the color of this arc to "green"
    };
    30: {
        symbol-color: none; // Set the color of this arc to "none" (maybe null would be better?)
    };
    60: { symbol-color: white; };
    90: { symbol-color: none; };
    100: { symbol-color: red; };
    140: { symbol-color: none; };
}
symbol-shape: square; // How do we handle multiple shapes? Do we just require users to put them on separate layers?

I'm going to want other people's opinion, since this is something that external users will be using. Specifically, those using JOSM stylesheets downstream, and other people who might be using this feature.

Last edited 2 years ago by taylor.smock (previous) (diff)

comment:3 by Klumbumbus, 2 years ago

One internal usecase would be to render the direction key for viewpoints (see also #14989). But I also see this rather low priority.

comment:4 by skyper, 2 years ago

Component: Core validatorCore mappaint

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to Hanikatu.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.