Skip to content

Commit

Permalink
Update leafletLayer.js
Browse files Browse the repository at this point in the history
added code to determine color of social vulnerability polygons
  • Loading branch information
DavidArmahJr authored Apr 22, 2024
1 parent 6af37a4 commit 2aaea67
Showing 1 changed file with 23 additions and 1 deletion.
24 changes: 23 additions & 1 deletion omf/static/geoJsonMap/v3/leafletLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,31 @@ class LeafletLayer { // implements ObserverInterface
}
}
} else {
if (this.#observable.hasProperty('SOVI_RATNG', 'meta') && this.#observable.getProperty('SOVI_RATNG', 'meta') === 'Very High') {
return {
color: 'blue'
}
} else if (this.#observable.hasProperty('SOVI_RATNG', 'meta') && this.#observable.getProperty('SOVI_RATNG', 'meta') === 'Relatively High') {
return {
color: 'lightblue'
}
}else if (this.#observable.hasProperty('SOVI_RATNG', 'meta') && this.#observable.getProperty('SOVI_RATNG', 'meta') === 'Relatively Moderate') {
return {
color: 'lightgreen'
}
} else if (this.#observable.hasProperty('SOVI_RATNG', 'meta') && this.#observable.getProperty('SOVI_RATNG', 'meta') === 'Relatively Low') {
return {
color: 'yellow'
}
} else if (this.#observable.hasProperty('SOVI_RATNG', 'meta') && this.#observable.getProperty('SOVI_RATNG', 'meta') === 'Very Low') {
return {
color: 'grey'
}
}else {
return {
color: 'blue'
}
}
}
}
}
}

0 comments on commit 2aaea67

Please sign in to comment.