StephanWagner / svgMap

svgMap is a JavaScript library that lets you easily create an interactable world map comparing customizable data for each country.
MIT License
251 stars 43 forks source link

Add missing countries #13

Open StephanWagner opened 4 years ago

StephanWagner commented 4 years ago

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:

ma-gu-16 commented 4 years ago

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 ?

StephanWagner commented 4 years ago

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.

byteshaman commented 3 years ago

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...

StephanWagner commented 3 years ago

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.

heychazza commented 2 years ago

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?

StephanWagner commented 2 years ago

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.

heychazza commented 2 years ago

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 :)

arelidev commented 2 years ago

@StephanWagner are you still planning on updating the countries?

StephanWagner commented 2 years ago

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

arelidev commented 2 years ago

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

danielhjacobs commented 1 year ago

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:

StephanWagner commented 1 year ago

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.

MogilevichDmitry commented 1 year ago

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)