Modify

Opened 9 years ago

Closed 9 years ago

#11592 closed enhancement (worksforme)

MapCSS function to show sequence number of member of relation. No idea if it would make sense for nodes of ways too.

Reported by: Polyglot Owned by: team
Priority: normal Milestone:
Component: Core mappaint Version:
Keywords: MapCSS Member index function Cc:

Description

Public transport route relations contain stops in the correct order (ideally). Since JOSM started to sort them to the beginning and I've now started to follow suit (before I put the ways first, then the nodes, since that is how JOSM sorted them originally, and also because it's the ways I need to work on), it would be interesting if it were possible to have the ability to show a number using MapCSS representing the order they appear in the route relation.

Creating route relations seems more and more like a game of connect the dots, so being able to see which stop is the next in the sequence without having to scroll through the relation editor would enhance the workflow.

IndexInRelation(), or something of the kind?

Jo

Attachments (0)

Change History (5)

comment:1 by Klumbumbus, 9 years ago

Component: Internal mappaint styleCore mappaint

What if a stop node is part of several route relations? It would display several numbers!?

comment:2 by Polyglot, 9 years ago

True, that's a bit of a problem. What I usually do is mark the route relation I'm working on with an odbl=new tag. Then I use MapCSS to show its stops and its ways in fat purple and red. So I'm only interested in the route relation I'm working on, but I realise that this way of working is not very 'standard'. It does help "productivity" a lot to lift out 1 relation like that though.

It would probably not show several numbers anyway. I'm using MapCSS for the stops and it shows only 1 of the ref numbers if the node is a member of more than 1 relation.

https://josm.openstreetmap.de/ticket/8170

I've been meaning to ask this so many times already, but apparently all those other times I did think it through a bit further and then refrained from asking.

So sorry for the noise.

Jo

Last edited 9 years ago by Polyglot (previous) (diff)

comment:3 by simon04, 9 years ago

Do we need a separate method for that? We already have index()

For instance,

node[public_transport=stop_position] < relation[type=route] {
  text: index(); /* the index in/of the matched parent/child object */
}

comment:4 by simon04, 9 years ago

In 8774/josm:

see #11592 - Add test case for MapCSS index() function

comment:5 by simon04, 9 years ago

Resolution: worksforme
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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