Search code examples
anychart

How to change the value of AnyMap dynamically?



I have created a map of my country Tunisia .
I need to set the value of each governorate dynamically using javascript.
The problem is that the code for manipulating the map works only once (anychart.onDocumentReady()) !

please help me


Solution

  • After thinking some days i realised that i can create an update by myself. after all an update=delete+recreate;
    so if i want to change the data:
    1) i delete all the map (simply change the innerHTML of the container to"")
    2) i change the data (table of data so i can change the value of a field)
    3) i recreate the map.

    hope that will help anyone who want to use AnyMap framework dynamically.