From 7fa4df6ac22a36a4bc7c726a83d75df4b7223670 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Fri, 16 Nov 2012 11:51:38 +0000 Subject: [PATCH] Add power and placenames. --- placenames.mss | 290 +++++++++++++++++++++++++------------------------ power.mss | 74 ++++++------- project.mml | 10 +- 3 files changed, 184 insertions(+), 190 deletions(-) diff --git a/placenames.mss b/placenames.mss index 386382221b..2beb2e2cce 100644 --- a/placenames.mss +++ b/placenames.mss @@ -1,146 +1,148 @@ -/* - - - - - - - - - +#continent { + [place = 'continent'][zoom >= 1][zoom < 3] { + text-name: "[name]"; + text-size: 10; + text-fill: #9d6c9d; + text-face-name: @book-fonts; + text-halo-radius: 1; + text-wrap-width: 20; + } +} +.country { + [place = 'country'][zoom >= 2][zoom < 6] { + text-name: "[name]"; + text-size: 8; + text-fill: #9d6c9d; + text-face-name: @book-fonts; + text-halo-radius: 1; + text-wrap-width: 20; + [zoom >= 4] { + text-size: 10; + } + } +} -*/ +.state { + [place = 'state'][zoom >= 4][zoom < 9] { + text-name: "[ref]"; + text-size: 8; + text-fill: #9d6c9d; + text-face-name: @oblique-fonts; + text-halo-radius: 1; + text-wrap-width: 0; + [zoom >= 5] { + text-name: "[name]"; + } + [zoom >= 7] { + text-size: 11; + } + } +} + +#placenames-capital { + [zoom >= 5][zoom < 15] { + text-name: "[name]"; + text-size: 9; + text-fill: #000; + text-face-name: @book-fonts; + text-halo-radius: 1; + [zoom >= 6] { + text-size: 11; + } + [zoom >= 11] { + text-size: 14; + } + } +} + +.city { + [place = 'city'], + [place = 'metropolis'] { + [zoom >= 6][zoom < 15] { + text-name: "[name]"; + text-size: 8; + text-fill: #000; + text-face-name: @book-fonts; + text-halo-radius: 1; + [zoom >= 9] { + text-size: 11; + } + [zoom >= 11] { + text-size: 14; + } + } + } +} + +.town { + [place = 'town'], + [place = 'large_town'], + [place = 'small_town'] { + [zoom >= 9] { + text-name: "[name]"; + text-size: 8; + text-fill: #000; + text-face-name: @book-fonts; + text-halo-radius: 1; + text-wrap-width: 20; + } + [zoom >= 11] { + text-size: 10; + } + [zoom >= 14] { + text-size: 14; + text-fill: #777777; + } + } +} + +.suburb { + [place = 'suburb'][zoom >= 12] { + text-name: "[name]"; + text-size: 10; + text-fill: #000; + text-face-name: @book-fonts; + text-halo-radius: 1; + [zoom >= 14] { + text-size: 13; + text-fill: #777777; + } + } +} + +.village { + [place = 'village'], + [place = 'large_village'] { + [zoom >=12] { + text-name: "[name]"; + text-size: 9; + text-fill: #000; + text-face-name: @book-fonts; + text-halo-radius: 1; + [zoom >= 15] { + text-size: 12; + text-fill: #777777; + } + } + } +} + +.hamlet { + [place = 'hamlet'], + [place = 'locality'], + [place = 'isolated_dwelling'], + [place = 'farm'] { + [zoom >= 14] { + text-name: "[name]"; + text-size: 8; + text-fill: #000; + text-face-name: @book-fonts; + text-halo-radius: 1; + } + [zoom >= 16] { + text-size: 11; + text-fill: #777777; + } + } +} diff --git a/power.mss b/power.mss index 7bb7110ea4..e402c0dcb5 100644 --- a/power.mss +++ b/power.mss @@ -1,42 +1,34 @@ -/* - - - - +#power-line { + [zoom >= 14] { + line-width: 1; + line-color: #777; + } + [zoom >= 16] { + line-width: 1.5; + } +} -*/ \ No newline at end of file +#power-minorline { + [zoom >= 16] { + line-width: 0.5; + line-color: #777; + } +} + +#power-towers { + [zoom >= 14] { + point-file: url('symbols/power_tower_3x3.png'); + } + [zoom >= 15] { + point-file: url('symbols/power_tower_5x5.png'); + } + [zoom >= 17] { + point-file: url('symbols/power_tower.png'); + } +} + +#power-poles { + [zoom >= 16] { + point-file: url('symbols/power_pole.png'); + } +} diff --git a/project.mml b/project.mml index 7f7881097e..b5e96466b5 100644 --- a/project.mml +++ b/project.mml @@ -1346,7 +1346,7 @@ "dbname": "gis" }, "id": "placenames-large", - "class": "", + "class": "country state", "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": {}, @@ -1368,12 +1368,12 @@ "geometry_field": "way", "dbname": "gis" }, - "id": "placename-capital", + "id": "placenames-capital", "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": "placename-capital" + "name": "placenames-capital" }, { "geometry": "point", @@ -1392,7 +1392,7 @@ "dbname": "gis" }, "id": "placenames-medium", - "class": "", + "class": "city town", "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": {}, @@ -1415,7 +1415,7 @@ "dbname": "gis" }, "id": "placenames-small", - "class": "", + "class": "suburb village hamlet", "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": {},