You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed your library uses the opposite definition. When I look at it logically, I'd also take your approach. But JOSM approach already has many styles that use it (and already exists 3 years https://josm.openstreetmap.de/changeset/4316/josm).
I'd like to use your code in overpass-turbo (see tyrasd/overpass-turbo#117) to interpret MapCSS. The side of the offset is not a big problem (just add a '-' on the parsing side). But code is always cleaner without unnecessary negations (and the difference may lead to more problems outside this MapCSS library).
So I wonder if you're planning to change the offset side, or if your side is permanant, and we should adapt it in the MapCSS parsing. (In the latter case, it might be worth to document the difference clearly.)
Regards,
Sander
The text was updated successfully, but these errors were encountered:
Sorry, I don't intend to change the offset side. As I built this plug-in from scratch, I decided to go the "Leaflet way": the most intuitive and simple.
Like you, I find the side of MapCSS quite counter-intuitive, and I don't think it's an established-enough format (outside of JOSM) that should absolutely be followed. Actually, looking for similar implementations, I've seen both ways. For example in the Mapserver doc:
A positive x shifts the line to the right when seen along the direction of the line. A negative x shifts the line to the left when seen along the direction of the line.
I hope it's not too cumbersome for your own project. And you're right, I will make it clearer in the readme which side the sign of the value means.
I noticed that the JOSM MapCSS implementation uses positive=left and negative=right offset (see https://josm.openstreetmap.de/wiki/Help/Styles/MapCSSImplementation#Linestyles)
I noticed your library uses the opposite definition. When I look at it logically, I'd also take your approach. But JOSM approach already has many styles that use it (and already exists 3 years https://josm.openstreetmap.de/changeset/4316/josm).
I'd like to use your code in overpass-turbo (see tyrasd/overpass-turbo#117) to interpret MapCSS. The side of the offset is not a big problem (just add a '-' on the parsing side). But code is always cleaner without unnecessary negations (and the difference may lead to more problems outside this MapCSS library).
So I wonder if you're planning to change the offset side, or if your side is permanant, and we should adapt it in the MapCSS parsing. (In the latter case, it might be worth to document the difference clearly.)
Regards,
Sander
The text was updated successfully, but these errors were encountered: