Skip to content

Commit

Permalink
Merge pull request #91 from jameel-institute/color-disputed-lands-sma…
Browse files Browse the repository at this point in the history
…rtly

JIDEA-193: Globe: Color disputed lands according to neighboring countries' color
  • Loading branch information
david-mears-2 authored Nov 15, 2024
2 parents dafd493 + 429a813 commit e49cc65
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions components/Globe.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,12 @@ const disputedLands: Record<string, {
disputers: string[]
mapSeries: am5map.MapPolygonSeries | null
displayed: boolean
colorAsSelectable: boolean
}> = {
"Western Sahara": { disputers: ["ESH", "MAR"], mapSeries: null, displayed: false },
"Abyei": { disputers: ["SSD", "SDN"], mapSeries: null, displayed: false },
"Aksai Chin": { disputers: ["CHN", "IND"], mapSeries: null, displayed: false },
"Jammu and Kashmir": { disputers: ["IND", "PAK", "CHN"], mapSeries: null, displayed: false },
"Western Sahara": { disputers: ["ESH", "MAR"], mapSeries: null, displayed: false, colorAsSelectable: false },
"Abyei": { disputers: ["SSD", "SDN"], mapSeries: null, displayed: false, colorAsSelectable: false },
"Aksai Chin": { disputers: ["CHN", "IND"], mapSeries: null, displayed: false, colorAsSelectable: true },
"Jammu and Kashmir": { disputers: ["IND", "PAK", "CHN"], mapSeries: null, displayed: false, colorAsSelectable: true },
};
const chartDefaultSettings: am5map.IMapChartSettings = {
panX: "rotateX",
Expand Down Expand Up @@ -106,7 +107,6 @@ const disputedAreaSeriesSettings: am5map.IMapPolygonSeriesSettings = {
// Settings for disputed *land* areas - see 'Customization' in shapefiles.md
const disputedLandSeriesSettings: am5map.IMapPolygonSeriesSettings = {
...disputedAreaSeriesSettings,
fill: defaultLandColour,
layer: maxZindex - 1, // Make sure disputed areas are always painted on top of country areas
};
// Settings for disputed *water* areas - see 'Customization' in shapefiles.md
Expand Down Expand Up @@ -237,6 +237,7 @@ const setUpDisputedAreasSeries = () => {
...disputedLandSeriesSettings,
reverseGeodata: true,
include: [disputedArea],
fill: disputedLands[disputedArea].colorAsSelectable ? defaultLandColour : unselectableLandColor,
});
});
Expand Down

0 comments on commit e49cc65

Please sign in to comment.