Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add highway=pedestrian area label #375

Closed
wants to merge 3 commits into from

5 participants

@mrwojo

See #355. The styling is copied from highway=pedestrian line label, adjusted for polygons. Note that there are practically no highway=pedestrian nodes (77 instances). JOSM's stylesheet/validator rejects those.

(Also cleans up a confusing comment that I wrote previously.)

@hlaw

Should we also be restoring highway=service + area=yes labels? Both highway=service and pedestrian can be areas as described in the wiki page for highway. Both should be common - from Taginfo, there are 69782 highway=pedestrian areas and 32650 highway=service areas (although labelling for highway=service should be rarer).

@pnorman
Collaborator

32650 highway=service areas (although labelling for highway=service should be rarer).

I'll check how many objects there are with name, highway=service and area=yes.

@matkoniecz
Collaborator

I think that it is not important how many are tagged with name, just show it - why not? It is not some kind of ugly special case.

@pnorman
Collaborator

32650 highway=service areas (although labelling for highway=service should be rarer).
I'll check how many objects there are with name, highway=service and area=yes.

1327

@gravitystorm

Thanks for the PR, and it's certainly something that needs adding. However, I'd prefer if you can doing the following:

  • move the unrelated comment fixups into a separate commit/PR.
  • put the pedestrian labelling CSS into the roads.mss in proximity (e.g. below) the related rules for line labelling. That way if anyone is looking at one set of highway-pedestrian-text rules the other set is close by in the same mss file.
  • You should create a new layer (e.g. '#roads-area-text-name'), rendering immediately before #roads-text-name, so that it's easy for people to turn off all roads labelling (or conversely, all miscellaneous text) without having some highway=pedestrian labels caught up in a different set of labels.

(The choice of 'before' is unusual since they might block more important road labels, but is based on the idea that area labels only get one chance to be placed, whereas linear labels can slide around a bit more).

mrwojo added some commits
@mrwojo mrwojo Revert "Add highway=pedestrian area label"
This reverts commit 61e9104.
6b040e5
@mrwojo mrwojo Add #roads-area-text-name
Labels for highway=pedestrian areas. Could expand to more highway types.
3f54d1f
@mrwojo

Done and tested.

@gravitystorm

Merged as 225b674

@mrwojo mrwojo deleted the mrwojo:pedestrian-area-label branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 2, 2014
  1. @mrwojo
Commits on Mar 11, 2014
  1. @mrwojo

    Revert "Add highway=pedestrian area label"

    mrwojo authored
    This reverts commit 61e9104.
  2. @mrwojo

    Add #roads-area-text-name

    mrwojo authored
    Labels for highway=pedestrian areas. Could expand to more highway types.
This page is out of date. Refresh to see the latest.
Showing with 41 additions and 0 deletions.
  1. +23 −0 project.mml
  2. +18 −0 roads.mss
View
23 project.mml
@@ -1447,6 +1447,29 @@
"name": "roads-text-ref"
},
{
+ "geometry": "polygon",
+ "extent": [
+ -179.99999692067183,
+ -84.96651228427099,
+ 179.99999692067183,
+ 84.96651228427098
+ ],
+ "Datasource": {
+ "type": "postgis",
+ "table": " (select way, highway, name\n from planet_osm_polygon\n where highway='pedestrian'\n and name is not null\n ) as roads_area_text_name",
+ "extent": "-20037508,-19929239,20037508,19929239",
+ "key_field": "",
+ "geometry_field": "way",
+ "dbname": "gis"
+ },
+ "id": "roads-area-text-name",
+ "class": "",
+ "srs-name": "900913",
+ "srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
+ "advanced": {},
+ "name": "roads-area-text-name"
+ },
+ {
"geometry": "linestring",
"extent": [
-179.99999692067183,
View
18 roads.mss
@@ -2795,6 +2795,24 @@
}
}
+#roads-area-text-name {
+ [highway = 'pedestrian'] {
+ [zoom >= 15] {
+ text-name: "[name]";
+ text-size: 8;
+ text-face-name: @book-fonts;
+ text-placement: interior;
+ text-wrap-width: 30;
+ }
+ [zoom >= 16] {
+ text-size: 9;
+ }
+ [zoom >= 17] {
+ text-size: 11;
+ }
+ }
+}
+
#paths-text-name {
[highway = 'track'] {
[zoom >= 15] {
Something went wrong with that request. Please try again.