I have a series of lat/long markers that correspond to road segments within a route from city to city. Routes can fit into two categories - Vertical routes that go North/South, and Horizontal routes that go East/West.

I run into trouble when I want to display the route on the map. I use Line marks, and if i don't sort the Path shelf properly, the line zigzags at random to different points along the route rather than following spacial order. I have two different dimensions that I use to sort the path. One dimension works for vertical routes, and the other dimension works for horizontal routes. Different routes are selected via a quick filter on the name of the route. Is there any way that I can change the sorting method based on the route name selection in the quick filter, like some sort of lookup table that assigns a different sorting dimension? I basically need to sort horizontal routes by one dimension, and vertical routes by a different dimension. I have attached a TWBX with 4 sheets that I believe pretty clearly illustrate the problem.

Hi Michael, interesting map. Where did you get all the routing lat/longs? By hand using Google Maps, or did you find a database? Anyway see attached for a way to get the sorting you're looking for. Here's basically what I did:

Created this calc field and placed it on the level of detail shelf. It will mess up your routes until you change it to an ATTR(). Once you've got it there then open up your TMC9 pill on the path shelf and edit the sort. Use the new calc to sort on:

You can use min or max, it doesn't matter. (But you can't use count.) Now all your routes work, except I noticed an anomaly on the Bal-Phil route:

But the Phil-Bal route is fine.

Not sure your strategy for setting the path is ideal, but then if it works hey go with it! Hope this helps. (And I just saw Tracy beat me to the punch again, but I'll post anyway just in case this happens to be more of what you're looking for.)

I checked the twbx you attached and I like it! It is a bit more manual than I would hope... Perhaps including a column called "IsVertical" filled with boolean values, and follow this approach but based on the boolean state as opposed to a more thought out mapping would make the most sense for larger datasets of more than 6 routes. Thanks a bunch! I will be using this in the interim.