svgMap icon indicating copy to clipboard operation
svgMap copied to clipboard

Add missing countries

Open StephanWagner opened this issue 5 years ago • 13 comments

With v1.4.0, I fixed the asset that creates the map paths object out of the SVG image. There is a list of countries that are still missing:

  • [ ] AX | Åland Islands
  • [ ] AS | American Samoa
  • [ ] AQ | Antarctica
  • [ ] IO | British Indian Ocean Territory
  • [ ] BQ | Caribbean Netherlands
  • [ ] CX | Christmas Island
  • [ ] CC | Cocos Islands
  • [ ] CK | Cook Islands
  • [ ] FM | Federated States of Micronesia
  • [ ] TF | French Southern Territories
  • [ ] GI | Gibraltar
  • [ ] GU | Guam
  • [ ] IM | Isle of Man
  • [ ] JE | Jersey
  • [ ] KI | Kiribati
  • [ ] XK | Kosovo
  • [ ] MO | Macau
  • [ ] MH | Marshall Islands
  • [ ] NU | Niue
  • [ ] NF | Norfolk Island
  • [ ] MP | Northern Mariana Islands
  • [ ] PW | Palau
  • [ ] SH | Saint Helena
  • [ ] PM | Saint Pierre and Miquelon
  • [ ] WS | Samoa
  • [ ] GS | South Georgia and the South Sandwich Islands
  • [ ] SJ | Svalbard and Jan Mayen
  • [ ] TK | Tokelau
  • [ ] TV | Tuvalu
  • [ ] UM | United States Minor Outlying Islands
  • [ ] WF | Wallis and Futuna

StephanWagner avatar Mar 26 '20 17:03 StephanWagner

https://www.google.com/maps/place/Westsahara/@26.3945182,-13.2948146,6z/data=!4m5!3m4!1s0xc22482523302153:0xb7a6f81873dfd75a!8m2!3d24.215527!4d-12.885834

westsahara is missing too,

are the countries comming soon ?

ma-gu-16 avatar May 27 '20 12:05 ma-gu-16

Western Sahara should be there. It has different borders than Google Maps shows though. With Western Sahara it is a bit difficult as it is not recognized as a country by all authorities. See here: https://en.wikipedia.org/wiki/Western_Sahara

Western Sahara ... is a disputed territory on the northwest coast ...

There is also an option to toggle Western Sahara:

// Country specific options
countries: {
  // Western Sahara: Set to false to combine Morocco (MA) and Western Sahara (EH)
  EH: true
}

I'm pretty swamped with work at the moment, but I hope I'll get to add more missing countries soon.

StephanWagner avatar May 27 '20 16:05 StephanWagner

Hello, how could someone help on this issue? This is by far the easiest "interactive world map" library to understand and setup that I found for the project I'm currently working on, so I'd like to help if possible. I never worked with SVGs before but I'm willing to learn and dedicate some of my spare time to add the missing countries...

byteshaman avatar Jul 14 '21 12:07 byteshaman

Thats actually quite tricky if you haven't worked with SVG before.

If you open the file ./assets/create-map-paths.html in the browser (in Version 2.2.2, I just fixed that file) you can see what countries are missing SVG paths.

To add new countries or to adjust data, you would have to open the file ./assets/map-optimized.svg in an SVG editor tool. I usually use Adobe Illustrator. Then add the countries and save the file as SVG with precision 3 preferably. The path needs to ave the 2 letter country unicode as ID (uppercase).

Then you need to add all the country paths from that file into the create-map-paths.html file. When you reload that page in the browser it will create all the paths which then need to be added to the file ./src/js/svgMap.js around line 950.

Then npm run build to compile and the new date should be applied.

I know that that could have been made much easier, but as of now thats how I edit country data.

StephanWagner avatar Jul 17 '21 21:07 StephanWagner

Has anyone managed to do this yet? I see U.K. shows part of Ireland, where it should show as England and Northern Island.

Any reason why?

charnary avatar Dec 07 '21 15:12 charnary

United Kindom countries are not separated, you would have to split them manually.

I have planned a much more detailed map, but I'm pretty swamped with work atm, hopefully I get around to work on v3 early 2022.

StephanWagner avatar Dec 08 '21 09:12 StephanWagner

United Kindom countries are not separated, you would have to split them manually.

I have planned a much more detailed map, but I'm pretty swamped with work atm, hopefully I get around to work on v3 early 2022.

I’d be happy to donate a bit, if you could do it! I’m looking to utilise in a project :)

charnary avatar Dec 08 '21 09:12 charnary

@StephanWagner are you still planning on updating the countries?

arelidev avatar Aug 28 '22 16:08 arelidev

yes, but this will come with version 3, with will be much more detailed with many more features

StephanWagner avatar Aug 28 '22 16:08 StephanWagner

Awesome! I'm using this for an educational exhibit for immigrant populations from the US to other countries of origin, and it works great; just missing a few countries. It'd also be great to have dynamic data. Right now, I'm reinitializing the component on data change.

On Sun, Aug 28, 2022 at 12:27 PM 'Stephan Wagner' via Webmaster < @.***> wrote:

yes, but this will come with version 2, with will be much more detailed with many more features

— Reply to this email directly, view it on GitHub https://github.com/StephanWagner/svgMap/issues/13#issuecomment-1229500929, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADKDRR2VKEZ4MDPOCSZVSK3V3OHQRANCNFSM4LUNCYAQ . You are receiving this because you commented.Message ID: @.***>

-- Keith Petrillo

Senior Developer

Areli (855) 902-7354 @.*** areli.com

arelidev avatar Aug 28 '22 16:08 arelidev

While I don't think they're large enough to matter too much, and most are technically territories, some with no permanent residents, aren't the following ISO defined country codes also missing:

  • https://en.wikipedia.org/wiki/ISO_3166-2:BL
  • https://en.wikipedia.org/wiki/ISO_3166-2:BV
  • https://en.wikipedia.org/wiki/ISO_3166-2:GG
  • https://en.wikipedia.org/wiki/ISO_3166-2:HM
  • https://en.wikipedia.org/wiki/ISO_3166-2:MF
  • https://en.wikipedia.org/wiki/ISO_3166-2:NU

danielhjacobs avatar Oct 21 '22 14:10 danielhjacobs

Yes, they are all missing, some are not actually countries though, at least not recognised by UN. I'm working on a much more detailed version with includes countries, territories and autonomous regions. It'll probably be out early 2023.

StephanWagner avatar Oct 21 '22 17:10 StephanWagner

First of all, I want to thank you for the library, it is very useful. Is there any news when the missing countries will be added? (WS, PV, TW, MH, KI, FM)

MogilevichDmitry avatar Mar 15 '23 18:03 MogilevichDmitry