We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to show a map of Switzerland. I assume the used abbrevation in the library is swz.
swz
With the datamaps.swz.min.js approach, I get a blank page. But works with usa.
datamaps.swz.min.js
usa
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min.js"></script> <!-- with scope usa: shows usa --> <!--<script src="lib/datamaps.usa.min.js"></script>--> <!-- with scope swz: shows nothing --> <script src="lib/datamaps.swz.min.js"></script> <div id="container" style="position: relative; width: 500px; height: 300px;"></div> <script> var map = new Datamap({ element: document.getElementById('container'), // scope: 'usa' // works with "datamaps.usa.min.js" scope: 'swz' // blank page with "datamaps.swz.min.js" }); </script>
With the datamaps.all.min.js approach, I get an error Uncaught TypeError: Cannot read properties of undefined (reading 'swz'). But works with usa.
datamaps.all.min.js
Uncaught TypeError: Cannot read properties of undefined (reading 'swz')
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.3/d3.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/topojson/1.6.9/topojson.min.js"></script> <script src="lib/datamaps.all.min.js"></script> <div id="container" style="width: 500px; height: 300px;"></div> <script> var map = new Datamap({ element: document.getElementById('container'), scope: 'usa', // scope: 'swz', // not working, getting error "Uncaught TypeError: Cannot read properties of undefined (reading 'swz')" }); </script>
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I want to show a map of Switzerland. I assume the used abbrevation in the library is
swz
.With the
datamaps.swz.min.js
approach, I get a blank page. But works withusa
.With the
datamaps.all.min.js
approach, I get an errorUncaught TypeError: Cannot read properties of undefined (reading 'swz')
. But works withusa
.The text was updated successfully, but these errors were encountered: