Problem in loading maps and charts via AJAX and PHP
FusionCharts Forum
Home       Members    Calendar    Who's On
Welcome Guest ( Login | Register )
        



Problem in loading maps and charts via AJAX... Expand / Collapse
Author
Message
Posted 9/13/2007 12:24:20 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: Forum Members
Last Login: 9/13/2007 12:24:20 PM
Posts: 1, Visits: 2
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

Post #2387
Posted 9/14/2007 2:56:56 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Today @ 5:05:35 AM
Posts: 870, Visits: 1,383
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.




Regards,

Sudipto Choudhury
FusionCharts Team
Post #2396
Posted 9/14/2007 3:04:47 AM
Supreme Being

Supreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme BeingSupreme Being

Group: Moderators
Last Login: Today @ 5:05:35 AM
Posts: 870, Visits: 1,383
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.


Regards,

Sudipto Choudhury
FusionCharts Team
Post #2397
« Prev Topic | Next Topic »


Permissions Expand / Collapse

All times are GMT -7:00, Time now is 6:01am


Execution: 0.141.