Skip to content

Commit 47622ab

Browse files
authored
Merge pull request #621 from DFID/aunindadf-patch-2-sm
Aunindadf patch 2 sm
2 parents d27ed3c + 746e570 commit 47622ab

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

public/javascripts/countrypagemap_new.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ $(document).ready(function () {
8787
"coordinates": window.coordinates
8888
}
8989
};
90-
countryList.push(mapBorder);
90+
if(window.countryCode != 'SO') {
91+
countryList.push(mapBorder);
92+
}
9193
}
9294
else if (mapType == 'location') {
9395
map = new L.Map('countryMap', {
@@ -96,6 +98,13 @@ $(document).ready(function () {
9698
layers: [layer]
9799
});
98100
$.each(countryMapData, function (i, v) {
101+
var calculatedOpacity = calculateOpacity(v.extra.budget, maxBudget);
102+
var fOpacity = 0.8;
103+
if (v.extra.id == 'SO') {
104+
calculatedOpacity = 0;
105+
fOpacity = 0;
106+
}
107+
99108
var tempMapBorder = {
100109
"type": "Feature",
101110
"properties": {
@@ -104,9 +113,9 @@ $(document).ready(function () {
104113
stroke: true,
105114
weight: 1,
106115
color: "white",
107-
opacity: calculateOpacity(v.extra.budget, maxBudget),
116+
opacity: calculatedOpacity,
108117
fillColor: calculateBrightness(v.extra.budget, maxBudget),
109-
fillOpacity: 0.8
118+
fillOpacity: fOpacity
110119
}
111120
},
112121
"geometry": {
@@ -249,4 +258,4 @@ $(document).ready(function () {
249258
markers.addLayer(tempMarker);
250259
});
251260
map.addLayer(markers);
252-
});
261+
});

0 commit comments

Comments
 (0)