DataMaps library (multiple scripts / maps) -- conflict -
while figured out workaround this, seems i'm not doing right.
i load required datamaps files
i can draw china map -- works
new datamap({ element: document.getelementbyid('theworldid'), scope:'chn',
if go page, , try draw world map, fails
new datamap({ element: document.getelementbyid("theid"), scope: 'world',
this appears because both 'datamaps.chn.js' , 'datamaps.all.js' scripts define 'new datamap' public function, , overwrite each other?
i figured out workaround refreshing window once (which unloads previous script), , reloading script want (datamaps.all.js if world map, datamaps.chn.js if it's china map), figure there must better / more appropriate way of doing this. / advice appreciated.
Comments
Post a Comment