Skip to content
New issue

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

Can't load United States map #112

Open
hotlines-studio opened this issue Jan 26, 2023 · 2 comments
Open

Can't load United States map #112

hotlines-studio opened this issue Jan 26, 2023 · 2 comments

Comments

@hotlines-studio
Copy link

Hi there,

I am trying to load a US map, for example the 'us_mill_en' here:
https://jvm-docs.vercel.app/docs/available-maps

I have this js file:
https://raw.githubusercontent.com/themustafaomar/jsvectormap/master/src/maps/us-mill-en.js

var jvm = new jsVectorMap({
  map: "us_mill_en",
  selector: "#map"
})

But this US map won't load. If I change the file from ../us-mill-en.js to ../world-merc.js and change the following map property from us_mill_en to world_merc it works fine:

var jvm = new jsVectorMap({
  map: "world_merc",
  selector: "#map"
})
@hotlines-studio
Copy link
Author

UPDATE: I went ahead and installed vuevectormap locally for a Nuxt / Vue.js project I'm working on.

Looking at the node_modules, the world map is called from:
require("jsvectormap/dist/maps/world")

Looking into this folder, the only two maps included are 'world' and 'world-merc'

If I manually copy the us-mill-en.js file and add this into this dist maps folder, and call us_mill_en it works great!

Guess this issue could be deleted and opened up in the vuevectormap repo, ha.

@themustafaomar
Copy link
Owner

Hi @something-strange

Sorry for the late response, I'd like to point out that jsvectormap is shipped with only two maps just like you said the world and world-merc maps, case if I decided to ship all maps via npm the package will be really heavy, however, you'll need to download your preferred map from available maps page manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants