Sign in to follow this  
FusionCharts Support

Problem in loading maps and charts via AJAX and PHP

Recommended Posts

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this