From f41bb055f263f8de17fc8a5290ff06f17c0eef18 Mon Sep 17 00:00:00 2001 From: RudyTheDev Date: Sun, 18 Nov 2018 20:41:58 +0200 Subject: [PATCH 1/4] Add fill patterns for cemetery most common religions --- css/25_areas.css | 4 ++++ dist/img/pattern/cemetery_buddhist.png | Bin 0 -> 490 bytes dist/img/pattern/cemetery_christian.png | Bin 0 -> 170 bytes dist/img/pattern/cemetery_jewish.png | Bin 0 -> 416 bytes dist/img/pattern/cemetery_muslim.png | Bin 0 -> 341 bytes modules/svg/areas.js | 18 ++++++++++++------ modules/svg/defs.js | 4 ++++ 7 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 dist/img/pattern/cemetery_buddhist.png create mode 100644 dist/img/pattern/cemetery_christian.png create mode 100644 dist/img/pattern/cemetery_jewish.png create mode 100644 dist/img/pattern/cemetery_muslim.png diff --git a/css/25_areas.css b/css/25_areas.css index 85f886bef..39c2cdb50 100644 --- a/css/25_areas.css +++ b/css/25_areas.css @@ -216,6 +216,10 @@ path.stroke.tag-natural-wetland { /* Light Green things */ .pattern-color-cemetery, +.pattern-color-cemetery_christian, +.pattern-color-cemetery_buddhist, +.pattern-color-cemetery_muslim, +.pattern-color-cemetery_jewish, .pattern-color-orchard, .pattern-color-meadow, .pattern-color-farm, diff --git a/dist/img/pattern/cemetery_buddhist.png b/dist/img/pattern/cemetery_buddhist.png new file mode 100644 index 0000000000000000000000000000000000000000..7ea4e0483fe3f35e7638070ef8626e5b14a80a23 GIT binary patch literal 490 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dymjZl3T>t<7FDS+WL3~2Ya5kI) zRLCy^5{JkNh=LUJ@H27pF!2g91GzwPei0UNDSikWq5!ByK!llJ7-St26N7*V3y=*l zQ$Umzs8LZ-5hw)&LZVze0?a@J)CjbQ38VvRqkt&L1faNp2s_k3uuFJ>iba@tLH06p z^D{w=1(HCEfF#G0i6KBE+)9G{f`OKE`7%ng2nw;D@bmci+WY#r`g)3Z`g-`tI=d^oh}qgRd)WC}dy5LlIdZPKmNXk^Vxy;vV@O3@ z@&fsUM@dH(JG2Ei#Jf!B?B|@WWLq0onJA{JC>p~R;(GLms>;$Og)hodMrc=X3m&3GddzF@^O*M^4_(w-2Ho- wmGxNPoOyFjZ`~T1GZrEj#CtwGF`Q+?Aof~#cU8`%o1h@_boFyt=akR{05$n%tpET3 literal 0 HcmV?d00001 diff --git a/dist/img/pattern/cemetery_christian.png b/dist/img/pattern/cemetery_christian.png new file mode 100644 index 0000000000000000000000000000000000000000..7e022113fe1f787a87ab508b7e16f03ed61eff3d GIT binary patch literal 170 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfvp#Yx{S3xnB|NsBT$HzN3H~__f zfR%HmERbR=3GxeOVBnN-_Px5=_z6(N(bL5-q$2L@Swlev0}hshE{D7iFiG*T|F}L$ zN-Ax|r>A1y-E+McG(HsVxT4D-+Tu1NZ|V64wzhDEO^iIfycwMQ6S&oRzkR!~2xN_? LtDnm{r-UW|*Jv?6 literal 0 HcmV?d00001 diff --git a/dist/img/pattern/cemetery_jewish.png b/dist/img/pattern/cemetery_jewish.png new file mode 100644 index 0000000000000000000000000000000000000000..3bb9bf9dcb0a92f8b3396421bcda1923325a86ca GIT binary patch literal 416 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyT>(BJt~~tA|Ns97lE}!x!2!rs zP*6}(mRHwMlvk3Fk{0LWVdCavmRFP%72{`SX5ipv;^Jinig5EW@$fP83NUl?GPANV z0vT)^AeBG`K$1s*nUkB5iwCF}svc-ENE}Flv@=1tKwYyQ)V~C}O0OiyFPMRWk%@(k zos*A`Pg+JnQCUSzL(9y{-oeGy-QB~()6>(-8w7lSz}MF|u;+OuQ0H_{7srr_xT}}8 z^Br;!akDA@4uB#K{nJ=FfDrM+-lSf zV}q&jIpx!fnf@M5Yly4q6P1`}dqFo(neoT5ra{%3gY3`9&|62e9zAG@d5GW2W^GLA^lR|Gnd!PC{xWt~$(6970SYS;h( literal 0 HcmV?d00001 diff --git a/dist/img/pattern/cemetery_muslim.png b/dist/img/pattern/cemetery_muslim.png new file mode 100644 index 0000000000000000000000000000000000000000..13b1d70f7adc19441f4bc7ddb161088faa2f0077 GIT binary patch literal 341 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dybpbvhuK)l42QqifLx$@pe#@%K0Y4EfFrPO zs0nbkf`S5&ogKO|9!P1G1o;IsIQs&b9!x53T&$M->~5UScGf=D))I2|UaU;w&ieL_ zZh|)ULOdMYM}7sF0F}mgx;TbZ#3e5fPe>7YGUZA7G2Qb=4j(;t?rcwV+{EcK{aqRQ znfTZg69oee?{FQFRJn0u$&!yV6qL2q*B@w#Zk%Mqt*yFH)ynJ)qsN@=1_=_Z f&Wg1?%lH{m`q_iUBc7}Q+QZ=K>gTe~DWM4fPL@S? literal 0 HcmV?d00001 diff --git a/modules/svg/areas.js b/modules/svg/areas.js index bc4968a50..78bee3bce 100644 --- a/modules/svg/areas.js +++ b/modules/svg/areas.js @@ -19,7 +19,13 @@ export function svgAreas(projection, context) { grave_yard: 'cemetery' }, landuse: { - cemetery: 'cemetery', + cemetery: [ + { religion: 'christian', pattern: 'cemetery_christian' }, + { religion: 'buddhist', pattern: 'cemetery_buddhist' }, + { religion: 'muslim', pattern: 'cemetery_muslim' }, + { religion: 'jewish', pattern: 'cemetery_jewish' }, + { pattern: 'cemetery' } + ], construction: 'construction', farm: 'farmland', farmland: 'farmland', @@ -56,16 +62,16 @@ export function svgAreas(projection, context) { } }; - function setPattern(d) { + function setPattern(entity) { // Skip pattern filling if this is a building (buildings don't get patterns applied) - if (d.tags.building && d.tags.building !== 'no') { + if (entity.tags.building && entity.tags.building !== 'no') { this.style.fill = this.style.stroke = ''; return; } for (var tag in patterns) { if (patterns.hasOwnProperty(tag)) { - var entityValue = d.tags[tag]; + var entityValue = entity.tags[tag]; if (entityValue) { var values = patterns[tag]; @@ -84,7 +90,7 @@ export function svgAreas(projection, context) { for (var criterion in rule) { if (criterion !== 'pattern') { // reserved for pattern name // The only rule is a required tag-value pair - var v = d.tags[criterion]; + var v = entity.tags[criterion]; if (!v || v !== rule[criterion]) { pass = false; break; @@ -261,7 +267,7 @@ export function svgAreas(projection, context) { if (layer === 'fill') { this.setAttribute('clip-path', 'url(#' + entity.id + '-clippath)'); - setPattern.apply(this, arguments); + setPattern.call(this, entity); } }) .call(svgTagClasses()) diff --git a/modules/svg/defs.js b/modules/svg/defs.js index f8a3b1e98..73cb4c121 100644 --- a/modules/svg/defs.js +++ b/modules/svg/defs.js @@ -80,6 +80,10 @@ export function svgDefs(context) { ['scrub', 'bushes'], ['construction', 'construction'], ['cemetery', 'cemetery'], + ['cemetery_christian', 'cemetery_christian'], + ['cemetery_buddhist', 'cemetery_buddhist'], + ['cemetery_muslim', 'cemetery_muslim'], + ['cemetery_jewish', 'cemetery_jewish'], ['orchard', 'orchard'], ['farmland', 'farmland'], ['beach', 'dots'], From 46f762c0a66920d26cd1f5ba23dc2302afdaa3e1 Mon Sep 17 00:00:00 2001 From: RudyTheDev Date: Sun, 18 Nov 2018 20:52:33 +0200 Subject: [PATCH 2/4] Add quarry fill pattern --- css/25_areas.css | 4 ++++ dist/img/pattern/quarry.png | Bin 0 -> 265 bytes modules/svg/areas.js | 3 ++- modules/svg/defs.js | 3 ++- 4 files changed, 8 insertions(+), 2 deletions(-) create mode 100644 dist/img/pattern/quarry.png diff --git a/css/25_areas.css b/css/25_areas.css index 39c2cdb50..9ad600961 100644 --- a/css/25_areas.css +++ b/css/25_areas.css @@ -284,6 +284,10 @@ path.fill.tag-landuse-quarry { border-color: rgb(170, 170, 170); background-color: rgba(140, 140, 140, 0.5); } +.pattern-color-quarry +{ + fill: rgba(140, 140, 140, 0.5); +} /* Light gray overrides */ path.stroke.tag-natural-cave_entrance, diff --git a/dist/img/pattern/quarry.png b/dist/img/pattern/quarry.png new file mode 100644 index 0000000000000000000000000000000000000000..bba944e5ade55592aef3987344b8bef860450ac5 GIT binary patch literal 265 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfv^#Gp`S0MfW|9>EfAMD9FIvuEj zwFVdQ&MBb@02V7yL;wH) literal 0 HcmV?d00001 diff --git a/modules/svg/areas.js b/modules/svg/areas.js index 78bee3bce..20a66830f 100644 --- a/modules/svg/areas.js +++ b/modules/svg/areas.js @@ -39,7 +39,8 @@ export function svgAreas(projection, context) { grass: 'grass', meadow: 'meadow', military: 'construction', - orchard: 'orchard' + orchard: 'orchard', + quarry: 'quarry' }, natural: { beach: 'beach', diff --git a/modules/svg/defs.js b/modules/svg/defs.js index 73cb4c121..9c6104125 100644 --- a/modules/svg/defs.js +++ b/modules/svg/defs.js @@ -92,7 +92,8 @@ export function svgDefs(context) { ['forest', 'forest'], ['forest_broadleaved', 'forest_broadleaved'], ['forest_needleleaved', 'forest_needleleaved'], - ['forest_leafless', 'forest_leafless'] + ['forest_leafless', 'forest_leafless'], + ['quarry', 'quarry'] ]) .enter() .append('pattern') From b18dfb40301c60317e20539fcf06ef6ecb3363f6 Mon Sep 17 00:00:00 2001 From: RudyTheDev Date: Sun, 18 Nov 2018 21:39:09 +0200 Subject: [PATCH 3/4] Add landfill fill pattern, farmyard pattern (and remove farm pattern), implement vineyard fill pattern --- css/25_areas.css | 14 +++++++++++--- dist/img/pattern/farmyard.png | Bin 0 -> 340 bytes dist/img/pattern/landfill.png | Bin 0 -> 479 bytes modules/svg/areas.js | 6 ++++-- modules/svg/defs.js | 25 ++++++++++++++----------- 5 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 dist/img/pattern/farmyard.png create mode 100644 dist/img/pattern/landfill.png diff --git a/css/25_areas.css b/css/25_areas.css index 9ad600961..fe8413940 100644 --- a/css/25_areas.css +++ b/css/25_areas.css @@ -181,6 +181,11 @@ path.fill.tag-landuse-military { border-color: rgb(214, 136, 26); background-color: rgba(214, 136, 26, 0.3); } +.pattern-color-landfill +{ + fill: rgba(214, 136, 26, 0.3); +} + /* Pink things */ path.stroke.tag-landuse-industrial, @@ -221,22 +226,22 @@ path.stroke.tag-natural-wetland { .pattern-color-cemetery_muslim, .pattern-color-cemetery_jewish, .pattern-color-orchard, +.pattern-color-vineyard, .pattern-color-meadow, -.pattern-color-farm, .pattern-color-farmland { fill: rgba(191, 232, 63, 0.2); } path.stroke.tag-landuse-cemetery, path.stroke.tag-landuse-orchard, +path.stroke.tag-landuse-vineyard, path.stroke.tag-landuse-meadow, -path.stroke.tag-landuse-farm, path.stroke.tag-landuse-farmland { stroke: rgb(191, 232, 63); } .preset-icon-fill-area.tag-landuse-cemetery, .preset-icon-fill-area.tag-landuse-orchard, +.preset-icon-fill-area.tag-landuse-vineyard, .preset-icon-fill-area.tag-landuse-meadow, -.preset-icon-fill-area.tag-landuse-farm, .preset-icon-fill-area.tag-landuse-farmland { background-color: rgba(191, 232, 63, 0.2); } @@ -253,6 +258,9 @@ path.fill.tag-landuse-farmyard { border-color: rgb(226, 177, 111); background: rgba(245, 220, 186, 0.3); } +.pattern-color-farmyard { + fill: rgba(245, 220, 186, 0.3); +} /* Dark Gray things */ path.stroke.tag-amenity-parking, diff --git a/dist/img/pattern/farmyard.png b/dist/img/pattern/farmyard.png new file mode 100644 index 0000000000000000000000000000000000000000..88bee9a07b72dbe865c44d927272a30fa9b64483 GIT binary patch literal 340 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dy9sxcfu0Z<#|NlUeLXgS-uoY;8 zL`jfeFarZ46Eh1d8#@Ol7dOADxrLRrjjf%%!|rJ*n}KQ;d%8G=RK)GQyqmAtK)~f< zqCCqdKDP7!|7W(uxLnioI(}vOhHs}N{=KnT(3-MWf%QPcp;}Yc-|KQ_7cyvFR|`_m zdcEk$qcxfa*C##={BkzZXhE9t>+D+|-io!oRc)I$ztaD0e0s!SIXygC@ literal 0 HcmV?d00001 diff --git a/dist/img/pattern/landfill.png b/dist/img/pattern/landfill.png new file mode 100644 index 0000000000000000000000000000000000000000..84b86279d0385f7c1073074d9f5d7727e1138b86 GIT binary patch literal 479 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dyjR8I(u0Z<#|NlU8pn$<~bzPv{ z+9g4L!3+$HOw25-Z0sDIT--c-{DMLv5>m4A8oGLB7M9jFwssDVPR_1wo?bq_$tRRP z0JS~xba4!+h+BH;blxEYf!2qIdGea>vT1BlUDy~WJmY))0WW{tNTIXG@>{kS^egS3I_8opljK}PU41C51 zgjn|c Date: Sun, 18 Nov 2018 22:12:40 +0200 Subject: [PATCH 4/4] Add water waves fill pattern and pond-specific pattern --- css/25_areas.css | 4 ++++ dist/img/pattern/pond.png | Bin 0 -> 401 bytes dist/img/pattern/waves.png | Bin 0 -> 190 bytes modules/svg/areas.js | 4 ++++ modules/svg/defs.js | 2 ++ 5 files changed, 10 insertions(+) create mode 100644 dist/img/pattern/pond.png create mode 100644 dist/img/pattern/waves.png diff --git a/css/25_areas.css b/css/25_areas.css index fe8413940..2d160d5fe 100644 --- a/css/25_areas.css +++ b/css/25_areas.css @@ -94,6 +94,10 @@ path.fill.tag-natural-water { border-color: rgb(119, 211, 222); background-color: rgba(119, 211, 222, 0.3); } +.pattern-color-waves, +.pattern-color-pond { + fill: rgba(119, 211, 222, 0.3); +} /* Yellow things */ .pattern-color-beach, diff --git a/dist/img/pattern/pond.png b/dist/img/pattern/pond.png new file mode 100644 index 0000000000000000000000000000000000000000..880857d5df15de29a14308bb4c8e83d77780fe93 GIT binary patch literal 401 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnE3?yBabR7dynE^f_u0Z<#|NlUe)@beFH;92{MgPTj_KNc4g!yxcZt9c!!Q-?>?#gP0_sV(v zt_B%u9;pF$xA1i{z6fdEVR*oA&(T-)2g;on2c~S$vDcR_aF>1Y{(-(??Uqi9sY+p6 zGQ;jf)gQPX!0;rqF+E@STi>$9JSLUrvUm$h-+xxW`wwqj2=A09pdj^h^>bP0l+XkKZRBmF literal 0 HcmV?d00001 diff --git a/dist/img/pattern/waves.png b/dist/img/pattern/waves.png new file mode 100644 index 0000000000000000000000000000000000000000..97136705501c1aa43930f92ab762bd9b064aba1c GIT binary patch literal 190 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnH3?%tPCZz)@&H$efS0MfW|9>D^e5|<;NHLcL z`2{mD7`rZ8dIHEz^mK6ysff!xr^v@($iW&I_9bpc)foxD_M6puy!I<^u8(sQ;CXv! zZPtgBSw|U5YR~fei7qJI)^g8v>I6*(pSwpw!vD5D+hy{fhvEIJZD#W{@6?wifBDV- iLVksi(c*=i9~cA83=7Xq`|ks^jKR~@&t;ucLK6UI8$xve literal 0 HcmV?d00001 diff --git a/modules/svg/areas.js b/modules/svg/areas.js index d9423e4e3..ca8041923 100644 --- a/modules/svg/areas.js +++ b/modules/svg/areas.js @@ -49,6 +49,10 @@ export function svgAreas(projection, context) { grassland: 'grass', sand: 'beach', scrub: 'scrub', + water: [ + { water: 'pond', pattern: 'pond' }, + { pattern: 'waves' } + ], wetland: [ { wetland: 'marsh', pattern: 'wetland_marsh' }, { wetland: 'swamp', pattern: 'wetland_swamp' }, diff --git a/modules/svg/defs.js b/modules/svg/defs.js index a37037a43..52ec2f8c8 100644 --- a/modules/svg/defs.js +++ b/modules/svg/defs.js @@ -89,9 +89,11 @@ export function svgDefs(context) { ['landfill', 'landfill'], ['meadow', 'grass'], ['orchard', 'orchard'], + ['pond', 'pond'], ['quarry', 'quarry'], ['scrub', 'bushes'], ['vineyard', 'vineyard'], + ['waves', 'waves'], ['wetland', 'wetland'], ['wetland_marsh', 'wetland_marsh'], ['wetland_swamp', 'wetland_swamp'],