Greenstand / treetracker-web-map-client

The front end of the treetracker web map app.
http://map.treetracker.org
GNU Affero General Public License v3.0
64 stars 179 forks source link

A suite of flag icons for countries. #298

Closed dadiorchen closed 2 years ago

dadiorchen commented 2 years ago

We are going to show the country with the flag icon, so we need a set of icons for this purpose.

We don't have are a standard way to identify the country, so for a temporarily solution, just use the name of country as the key, below is the list of country name:

(so we can load the flag icon in the probjet like this: )

<img src='xxx/afghanistan.png' />

Please put all these flag icons into the component tool to display them all.

Screen Shot 2021-11-25 at 3 05 51 PM
Afghanistan
Åland Islands
Albania
Algeria
American Samoa
Andorra
Angola
Anguilla
Antigua and Barbuda
Argentina
Armenia
Aruba
Ashmore and Cartier Islands
Australia
Australia
Australia
Australia
Australia
Australia
Australia
Azerbaijan
Bahamas
Bahrain
Bangladesh
Barbados
Belize
Benin
Bermuda
Bhutan
Bolivia
Botswana
Brazil
British Indian Ocean Territory
British Virgin Islands
Brunei Darussalam
Bulgaria
Burkina Faso
Burundi
Cambodia
Cameroon
Canada
Canada
Canada
Canada
Canada
Cayman Islands
Central African Republic
Chad
Chile
China
Colombia
Comoros
Cook Islands
Costa Rica
Côte d'Ivoire
Cuba
Curaçao
Cyprus
Democratic Republic of the Congo
Dem. Rep. Korea
Denmark
Djibouti
Dominica
Dominican Republic
Ecuador
Egypt
El Salvador
Equatorial Guinea
Eritrea
eSwatini
Ethiopia
Faeroe Islands
Falkland Islands
Federated States of Micronesia
Fiji
French Polynesia
French Southern and Antarctic Lands
Gabon
Georgia
Ghana
Greenland
Grenada
Guam
Guatemala
Guernsey
Guinea
Guinea-Bissau
Guyana
Haiti
Heard I. and McDonald Islands
Honduras
Hong Kong
Iceland
India
Indian Ocean Territories
Indonesia
Iran
Iraq
Ireland
Isle of Man
Israel
Jamaica
Japan
Jersey
Jordan
Kazakhstan
Kenya
Kiribati
Kuwait
Kyrgyzstan
Lao PDR
Latvia
Lebanon
Lesotho
Liberia
Libya
Liechtenstein
Macao
Madagascar
Malawi
Malaysia
Maldives
Mali
Malta
Marshall Islands
Mauritania
Mauritius
Mexico
Monaco
Mongolia
Montserrat
Morocco
Mozambique
Myanmar
Namibia
Nauru
Nepal
New Caledonia
New Zealand
Nicaragua
Niger
Nigeria
Niue
Norfolk Island
Northern Cyprus
Northern Mariana Islands
Norway
Oman
Pakistan
Palau
Palestine
Panama
Papua New Guinea
Paraguay
Peru
Philippines
Pitcairn Islands
Portugal
Puerto Rico
Qatar
Republic of Cabo Verde
Republic of Korea
Republic of the Congo
Russian Federation
Rwanda
Saint-Barthélemy
Saint Helena
Saint Kitts and Nevis
Saint Lucia
Saint-Martin
Saint Pierre and Miquelon
Saint Vincent and the Grenadines
Samoa
San Marino
São Tomé and Principe
Saudi Arabia
Senegal
Seychelles
Siachen Glacier
Sierra Leone
Singapore
Sint Maarten
Solomon Islands
Somalia
Somaliland
South Africa
South Georgia and the Islands
South Sudan
Sri Lanka
Sudan
Suriname
Syria
Taiwan
Tajikistan
Tanzania
Thailand
The Gambia
Timor-Leste
Togo
Tonga
Trinidad and Tobago
Tunisia
Turkey
Turkmenistan
Turks and Caicos Islands
Uganda
United Arab Emirates
United Kingdom
United States
United States
United States
United States
United States
United States
United States
United States Virgin Islands
Uruguay
Uzbekistan
Vanuatu
Vatican
Venezuela
Vietnam
Wallis and Futuna Islands
Western Sahara
Yemen
Zambia
Zimbabwe

Some hints:

dadiorchen commented 2 years ago

Some resource I found:

https://en.wikipedia.org/wiki/Gallery_of_sovereign_state_flags

dadiorchen commented 2 years ago

https://flagicons.lipis.dev/

Koda-Pig commented 2 years ago

Hi @dadiorchen, can I work on this?

dadiorchen commented 2 years ago

@Koda-Pig yes, sure, I will assign it to you.

Also, I suggest using the Cypress unit tool for a showcase of all these flag icons, but it is not mandatory.

Koda-Pig commented 2 years ago

Thanks @dadiorchen. Sorry if this is a basic question, but after getting this running, any changes I make to /node_modules/treetracer-web-map-core/src/Map.js has no effect on the front end. For example; as a test to see if I was editing the correct file, I replaced 'K' with 'P' here:

static formatClusterText(count) { if (count > 1000) { return ``${Math.floor(count / 1000)}PK``; } return count + 1000; }

I have checked if there is a .next file in the root folder that was caching, but there was none. I have also tried the command: npm cache clean --force

Which didn't work. I also tried terminating the batch job and restarting it, still no difference.

I think I am missing something here. Any help would be greatly appreciated.

dadiorchen commented 2 years ago

@Koda-Pig are you in our slack channel? if not you can leave your email and I will invite you, that's a better place for coordination and discussion.

So you are run into the import css problem? right? basically, remove .next works for me.

formatClusterText function I'm not sure you can immediately find the changing on the map viewer even you are doing things right, because it just gets invoked when you hover your mouse on the cluster icon, the cluster icon on the map by default is not displayed by Map.js, they are map-tile-layer provided by our another service (they are png picture)

Koda-Pig commented 2 years ago

I'm not in the slack channel, please add me with josh[.]koter@gmail.com.

I ran into the import css problem, but I used the workaround you mentioned here to fix it: https://github.com/Greenstand/treetracker-web-map-core/issues/23

If that's the case, how do I make changes to the actual map component?

dadiorchen commented 2 years ago

If you mean how to change the Map.js, you can fork the treetracker-web-map-core repo and raise PR against this repo, once your PR is accepted, we will raise the version of the core, then all those repos using this core can upgrade the core.

Koda-Pig commented 2 years ago

Please see my pull request here: https://github.com/Greenstand/treetracker-web-map-client/pull/348

dadiorchen commented 2 years ago

I guess @Koda-Pig is unavailable on this now, so if anyone can take over, it would be great, and also, his work is a good reference: https://github.com/Greenstand/treetracker-web-map-client/pull/348

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 1.15.0-beta.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: