Skip to content

Commit

Permalink
bigger text size, no capitals at z3, fewer capitals on z4, be more st…
Browse files Browse the repository at this point in the history
…rict with capitals, no dots at z8, only N and S placement
  • Loading branch information
nebulon42 committed Aug 30, 2016
1 parent 1403cf9 commit 0e954bd
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 55 deletions.
80 changes: 28 additions & 52 deletions placenames.mss
Original file line number Diff line number Diff line change
Expand Up @@ -53,43 +53,39 @@
}

#capital-names {
[zoom = 3][population > 600000],
[zoom >= 4][zoom < 9] {
[zoom >= 4][zoom < 8][population > 600000],
[zoom >= 5][zoom < 8] {
shield-file: url('symbols/place/place-capital-6.svg');
shield-text-dy: 4;
shield-text-dx: 4;
shield-text-dy: 6;
shield-name: '[name]';
shield-face-name: @book-fonts;
shield-fill: @placenames;
shield-size: 9;
shield-size: 11;
shield-min-distance: 10;
shield-wrap-width: 30;
shield-halo-fill: rgba(255,255,255,0.6);
shield-halo-radius: 1.5;
shield-placement-type: simple;
shield-placements: 'NE,SE,NW,NE';
shield-placements: 'S,N';
shield-unlock-image: true;

[zoom >= 5] {
shield-size: 10;
shield-wrap-width: 45;
}
[zoom >= 6] {
shield-size: 11;
shield-size: 12;
shield-wrap-width: 60;
}
[zoom >= 7] {
shield-size: 12;
shield-file: url('symbols/place/place-capital-8.svg');
shield-text-dy: 5;
shield-text-dx: 5;
shield-text-dy: 7;
}
}
[zoom >= 9] {
[zoom >= 8] {
text-name: '[name]';
text-face-name: @book-fonts;
text-fill: @placenames;
text-size: 12;
text-size: 13;
text-min-distance: 10;
text-wrap-width: 60;
text-halo-fill: rgba(255,255,255,0.6);
Expand All @@ -104,43 +100,37 @@

#placenames-medium::high-importance {
[category = 1][zoom < 14][score >= 400000] {
[zoom >= 5][zoom < 9] {
[zoom >= 5][zoom < 8] {
shield-file: url('symbols/place/place-4.svg');
shield-text-dy: 3;
shield-text-dx: 3;
shield-text-dy: 4;
shield-name: '[name]';
shield-face-name: @book-fonts;
shield-fill: @placenames;
shield-size: 9;
shield-size: 11;
shield-min-distance: 10;
shield-wrap-width: 30;
shield-halo-fill: rgba(255,255,255,0.6);
shield-halo-radius: 1.5;
shield-placement-type: simple;
shield-placements: 'NE,SE,NW,NE';
shield-placements: 'S,N';
shield-unlock-image: true;

[zoom >= 5] {
shield-size: 10;
shield-wrap-width: 45;
}
[zoom >= 6] {
shield-size: 11;
shield-size: 12;
shield-wrap-width: 60;

shield-file: url('symbols/place/place-6.svg');
shield-text-dy: 4;
shield-text-dx: 4;
}
[zoom >= 8] {
shield-size: 12;
shield-text-dy: 5;
}
}
[zoom >= 9] {
[zoom >= 8] {
text-name: '[name]';
text-face-name: @book-fonts;
text-fill: @placenames;
text-size: 12;
text-size: 13;
text-min-distance: 10;
text-wrap-width: 60;
text-halo-fill: rgba(255,255,255,0.6);
Expand All @@ -156,49 +146,35 @@

#placenames-medium::medium-importance {
[category = 1][score < 400000][zoom < 15] {
[zoom >= 6][zoom < 9][score >= 70000],
[zoom >= 7][zoom < 9] {
[zoom >= 6][zoom < 8][score >= 70000],
[zoom >= 7][zoom < 8] {
shield-file: url('symbols/place/place-4.svg');
shield-text-dy: 3;
shield-text-dx: 3;
shield-text-dy: 4;
shield-name: "[name]";
shield-size: 9;
shield-size: 10;
shield-fill: @placenames;
shield-face-name: @book-fonts;
shield-halo-radius: 1.5;
shield-halo-fill: rgba(255,255,255,0.6);
shield-wrap-width: 30;
shield-min-distance: 10;
shield-placement-type: simple;
shield-placements: 'NE,SE,NW,NE';
shield-placements: 'S,N';
shield-unlock-image: true;

[zoom >= 8] {
shield-size: 10;
}
[zoom >= 9] {
shield-size: 11;
shield-wrap-width: 60;
}
[zoom >= 11] {
shield-size: 14;
shield-wrap-width: 70;
}
[zoom >= 14] {
shield-size: 15;
shield-wrap-width: 75;
}
}
[zoom >= 9] {
[zoom >= 7] {
text-name: "[name]";
text-size: 11;
text-size: 10;
text-fill: @placenames;
text-face-name: @book-fonts;
text-halo-radius: 1.5;
text-halo-fill: rgba(255,255,255,0.6);
text-wrap-width: 60;
text-min-distance: 10;

[zoom >= 9] {
text-size: 12;
text-wrap-width: 60;
}
[zoom >= 11] {
text-size: 14;
text-wrap-width: 70;
Expand Down
2 changes: 1 addition & 1 deletion project.mml
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,7 @@
"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",
"Datasource": {
"extent": "-20037508,-20037508,20037508,20037508",
"table": "(SELECT\n way,\n name,\n CASE\n WHEN population ~ '^-?\\d+(\\.\\d+)?$' THEN population::NUMERIC ELSE 0\n END as population\n FROM planet_osm_point\n WHERE capital = 'yes'\n AND (admin_level = '2' OR admin_level IS NULL)\n ORDER BY population DESC\n) AS capital_names",
"table": "(SELECT\n way,\n name,\n CASE\n WHEN (population ~ '^[0-9]{1,8}$') THEN population::INTEGER ELSE 0\n END as population\n FROM planet_osm_point\n WHERE capital = 'yes'\n AND admin_level = '2'\n ORDER BY population DESC\n) AS capital_names",
"geometry_field": "way",
"type": "postgis",
"key_field": "",
Expand Down
4 changes: 2 additions & 2 deletions project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1523,11 +1523,11 @@ Layer:
way,
name,
CASE
WHEN population ~ '^-?\d+(\.\d+)?$' THEN population::NUMERIC ELSE 0
WHEN (population ~ '^[0-9]{1,8}$') THEN population::INTEGER ELSE 0
END as population
FROM planet_osm_point
WHERE capital = 'yes'
AND (admin_level = '2' OR admin_level IS NULL)
AND admin_level = '2'
ORDER BY population DESC
) AS capital_names
properties:
Expand Down

0 comments on commit 0e954bd

Please sign in to comment.