# Cannot get selected countries highlighted in world map

**URL:** <https://talk.observablehq.com/t/cannot-get-selected-countries-highlighted-in-world-map/4947>\
**Category:** Help\
**Created:** [April 20, 2021, 2:44pm UTC](https://talk.observablehq.com/t/cannot-get-selected-countries-highlighted-in-world-map/4947 "2021-04-20T14:44:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Heli](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/heli/32/3847_2.png) [@Heli](https://talk.observablehq.com/u/Heli)\
**Post date:** [April 20, 2021, 2:44pm UTC](https://talk.observablehq.com/t/cannot-get-selected-countries-highlighted-in-world-map/4947/1 "2021-04-20T14:44:42Z")

</div>

Dear all, I’m trying to highlight the selected country in green, but it didn’t work, I cannot find the bug currently. I think the error may occurs in the line 'if (label.includes(d.properties.name)) '? Thank you for your time!

The notebook is linked: [https://observablehq.com/d/12f4a12c1c67daf7](https://observablehq.com/d/12f4a12c1c67daf7)

---

<div class="post-metadata">

**Author:** ![mbrickmaps](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mbrickmaps/32/4870_2.png) [@mbrickmaps](https://talk.observablehq.com/u/mbrickmaps)\
**Post date:** [April 21, 2021, 4:30pm UTC](https://talk.observablehq.com/t/cannot-get-selected-countries-highlighted-in-world-map/4947/2 "2021-04-21T16:30:12Z")

</div>

> [@Heli](#):
>
> d.properties

Your d.properties.name does not contain any names

 ![Screen Shot 2021-04-21 at 12.28.19 PM](https://canada1.discourse-cdn.com/flex030/uploads/observablehq/original/2X/2/258eb29044e42c0658117e3758f937706ad703bf.png)

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [April 21, 2021, 8:36pm UTC](https://talk.observablehq.com/t/cannot-get-selected-countries-highlighted-in-world-map/4947/3 "2021-04-21T20:36:59Z")

</div>

I’ve sent you a suggestion to join countries with the data from “[https://unpkg.com/world-atlas@1/world/50m.json](https://unpkg.com/world-atlas@1/world/50m.json)”

---

<div class="post-metadata">

**Author:** ![Fil](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/fil/32/207_2.png) [@Fil](https://talk.observablehq.com/u/Fil)\
**Post date:** [April 21, 2021, 8:37pm UTC](https://talk.observablehq.com/t/cannot-get-selected-countries-highlighted-in-world-map/4947/4 "2021-04-21T20:37:59Z")

</div>

duplicate of [Cannot hightlight the regions in a simple map code](https://talk.observablehq.com/t/cannot-hightlight-the-regions-in-a-simple-map-code/4952)
