DataMaps library (multiple scripts / maps) -- conflict -


while figured out workaround this, seems i'm not doing right.

  1. i load required datamaps files

  2. i can draw china map -- works

      new datamap({     element: document.getelementbyid('theworldid'),      scope:'chn', 
  3. 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

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -