From 2aaea6777dc5d229df3fd75f4562c9d2879fdae5 Mon Sep 17 00:00:00 2001 From: DavidArmahJr <111519747+DavidArmahJr@users.noreply.github.com> Date: Mon, 22 Apr 2024 12:24:56 -0400 Subject: [PATCH] Update leafletLayer.js added code to determine color of social vulnerability polygons --- omf/static/geoJsonMap/v3/leafletLayer.js | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/omf/static/geoJsonMap/v3/leafletLayer.js b/omf/static/geoJsonMap/v3/leafletLayer.js index cb6d37c36..9217c3a08 100644 --- a/omf/static/geoJsonMap/v3/leafletLayer.js +++ b/omf/static/geoJsonMap/v3/leafletLayer.js @@ -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' } } + } } -} \ No newline at end of file +}