From f41bb055f263f8de17fc8a5290ff06f17c0eef18 Mon Sep 17 00:00:00 2001 From: RudyTheDev Date: Sun, 18 Nov 2018 20:41:58 +0200 Subject: [PATCH] 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'],