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
Is it possible to update the map data and redraw the map after the map has been created? Preferably without resetting zoom/pan.
The text was updated successfully, but these errors were encountered:
Okay, I figured it out. To update the map dynamically, you need to do
// define data const myData = { data: { gdp: { name: 'GDP per capita', format: '{0} USD', thousandSeparator: ',', thresholdMax: 50000, thresholdMin: 1000 }, change: { name: 'Change to year before', format: '{0} %' } }, applyData: 'gdp', values: { AF: { gdp: 587, change: 4.73 }, AL: { gdp: 4583, change: 11.09 }, DZ: { gdp: 4293, change: 10.01 } // ... } } // initialize map const map = new Map({ /* other config here */ data: myData, }); // update data const updatedData = getUpdatedData(); map.options.data = updatedData; // update tooltips map.applyData(updatedData); // update map
Sorry, something went wrong.
No branches or pull requests
Is it possible to update the map data and redraw the map after the map has been created?
Preferably without resetting zoom/pan.
The text was updated successfully, but these errors were encountered: