Giter VIP home page Giter VIP logo

raphaellepuschitz / svg-world-map Goto Github PK

View Code? Open in Web Editor NEW
190.0 10.0 25.0 19.37 MB

🗺 A JavaScript library to easily integrate one or more SVG world maps with all nations (countries) and second-level political subdivisions (countries, provinces, states).

License: MIT License

HTML 2.06% JavaScript 91.56% CSS 2.43% SCSS 3.95%
svg worldmap map maps mapping strategy-game strategy game game-development data-visualization

svg-world-map's People

Contributors

raphaellepuschitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

svg-world-map's Issues

License

Hey, I'd like to use this in a personal project, but can't find license information. Would you mind adding or clarifying that please?

Thanks!

Javascript error when setting bigMap to false

When I set the setting bigMap to false, it generates an error in the sortLabels-function.
Also the showMicroLabels and showMicroStates are set to false.

I've changed the line in the javascript (around linenumber 335/340 as I've made other changes as well)

// Set microstates
if (options.showMicroStates == false) {

to

// Set microstates
 if (options.bigMap == true && options.showMicroStates == false) {

Maybe this is not the right solution, but for now, it works for me.

About SVG

Can you tell me how to draw an SVG map file by yourself?

svg error

thank you for the great resource you've created!!!
I'd appreciate help resolving this error:

in svg-world-map.js

// Wait for asynchronous svg load
svg.addEventListener("load", async () => {
let promise2 = new Promise(resolve2 => {
// Set SVG base node
baseNode = svg.getSVGDocument().children[0];
// Startup SVG path traversing, then country sorting, followed by click handlers, etc.
initMapCountries();

svg-world-map.js:87 Uncaught (in promise) TypeError: Cannot read property 'children' of null
at svg-world-map.js:87
at new Promise ()
at HTMLObjectElement. (svg-world-map.js:85)

Request: assign svg-map to an id

Hi,

Right now, the svg-map is added to the body on initialisation. I would like to assign the map to a div.
I've changed to js-code, but this is not fool-prove.

I suggest the parameter 'containerId'

Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.