Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a bus guideway preset #4709

Merged
merged 3 commits into from
Jan 19, 2018
Merged

Conversation

bencostamagna
Copy link
Contributor

There has been no activity for almost 3 weeks on issue #4638, so I picked it up.

I edited the CSS file to get the guideways to look as similar as possible to the picture posted in the issue.

For reference, here is how it looks now
bus_guideway

I tried to reuse existing CSS as much as possible and I added oneway to the list of tags suggested in the wiki to fit the example given.

@bhousel
Copy link
Member

bhousel commented Jan 19, 2018

Looks great, thank you @bencostamagna .. I will try this out, and will probably change the colors a bit to make it look more like a road and less like a waterway.

@bhousel bhousel merged commit 6c84312 into openstreetmap:master Jan 19, 2018
@bhousel
Copy link
Member

bhousel commented Jan 19, 2018

I merged this! Thanks again @bencostamagna ...
I ended up making it just look like a service road. I think this is more appropriate for iD, even though mapnik renders it as a dashed blue line. I also added an icon for it.

screenshot 2018-01-19 10 41 13

@bhousel
Copy link
Member

bhousel commented Jan 19, 2018

Oh @bencostamagna there was one other thing I needed to change - I'm just letting you know in case you want to add more presets (I appreciate your work and hope you do!)

I needed to split the tags up and match only the highway=bus_guideway in the tags: section, and put all the tags into addTags: and removeTags: sections:

{
    "icon": "highway-bus_guideway",
    "fields": [
        "name",
        "operator",
        "oneway"
    ],
    "geometry": [
        "line"
    ],
    "tags": {
        "highway": "bus_guideway"
    },
    "addTags": {
        "highway": "bus_guideway",
        "access": "no",
        "bus": "designated"
    },
    "removeTags": {
        "highway": "bus_guideway",
        "access": "no",
        "bus": "designated"
    },
    "terms": [],
    "name": "Bus Guideway"
}

This is kind of a weird thing about how tags and OSM work. iD will recognize the preset based on whatever is in "tags", but it will use "addTags" and "removeTags" when it creates or changes the feature.

The actual bus guideway example in #4638 was not getting recognized as such because it doesn't have access=no and bus=designated. These are good tags to add, but iD needs to recognize the feature even if they are not present. Hope this makes sense (please let me know if it doesn't!).

@bencostamagna
Copy link
Contributor Author

It does make sense, thanks for the explanation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants