You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to dynamically import second argument in registerMap() function?
import json_data from "@/assets/json/map1.json";
...
registerMap("map", json_data);
I've tried many things (ref, computed, props, iife, ...) but when I manage to solve all errors, I cant see the map. I've tried to set a key on VChart component to re-render it when prop is changed, but nothing happens...
If I do a standard "import JSON_DATA from "@/assets/json/map1.json;" everything is working OK.
The idea is to dynamically change MapChart "geojson source" using select input whose option values represent file names (map1, map2, map3, ...).
Thanks in advance!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Is it possible to dynamically import second argument in registerMap() function?
I've tried many things (ref, computed, props, iife, ...) but when I manage to solve all errors, I cant see the map. I've tried to set a key on VChart component to re-render it when prop is changed, but nothing happens...
If I do a standard "import JSON_DATA from "@/assets/json/map1.json;" everything is working OK.
The idea is to dynamically change MapChart "geojson source" using select input whose option values represent file names (map1, map2, map3, ...).
Thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions