mr_waqas Report post Posted September 13, 2007 Hi, I am facing a problem in loading Fusion maps by using AJAX with PHP. I need to display the map same as that is shown on the Drill Down Demo of US Map. I have tried it by using two techniques but unfortunatley fails to implement it. Technique # 1 Demo has been implemented via Javascript. All the code has been written in "FusionMapsUSDemo.js" file. In this file all map's list has has been defined in an array and then all data is generated by using Random() function of javascript. This is ok when the data is Static. But I am looking to make it dynamic. Can you provide me an example with AJAX and PHP implementation. I could not be able to list down the maps from my database into this javascript Array. I tried to write this Javascrip dynamically but unfortunately couldnt do that. I am stcuked in "this.entities". Where it comes from ? God knows please help me out Technique # 2 I have also try to implement the AJAX on the drill down example that has been provided with the Fusion Maps but that requires the Page Submit and I do not need that. Given example draw the maps using XML and submit the page by giving a query string in "Link" attribute. But when I tried to do it via AJAX. everything run fine but for the execution of XML response browser need to be refresh. Due to which browser in not displaying the map / chart. Please help me out in this regards as soon as possible. Waqas Shahid Share this post Link to post Share on other sites
FusionCharts Support Report post Posted September 14, 2007 this.entities is an array that stores all the entity ids and names of the loaded map. we extract this array calling a fucntion of the map movie itself. this is alias of the class. search and find this.entities in others parts of the javascript and somewhere you will find how its extracting the entities. Share this post Link to post Share on other sites
FusionCharts Support Report post Posted September 14, 2007 AJAX does not need page refresh. All you need to change in the whole code (FusionMapsUSDemo.js) is the getData() function. Put your AJAX codes frm here and build your XML here only. The other things will remain same. Share this post Link to post Share on other sites