Sign in to follow this  
uienvy

Render Maps And Charts On Event

Recommended Posts

Hi FusionCharts!

 

I am having trouble rendering a FusionMap (or FusionChart) on a click event using JavaScript. Here is my example code:

 


       function smartSearchMap(){

           var map = new FusionMaps('/FusionMaps/FCMap_USA.swf', 'smartSearchMap', '100%', '100%');
               map.setDataXML('/data/FusionMap.xml');

           map.render('smartSearchMap');

       };

       $('#my_button').click(function(){
           smartSearchMap();
       });

 

 

Can someone please help me on this one? I am stuck...didn't think this would be too difficult!

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

I am afraid, FusionCharts does not support handling click event, as of now.

 

You would need to write your own code in order to suffice your requirement.

 

Hope this helps.

Share this post


Link to post
Share on other sites

Hi,

 

Welcome to FusionCharts Forum! smile.gif

 

I am afraid, FusionCharts does not support handling click event, as of now.

 

You would need to write your own code in order to suffice your requirement.

 

Hope this helps.

 

Hi Angshu,

Actually I figured out the problem. This does work but not with percentage values for the height and width of the FusionMap. Using this code:

 



    function smartSearchMap(){

           var map = new FusionMaps('/FusionMaps/FCMap_USA.swf', 'smartSearchMap', '500', '400');
           map.setDataURL('/data/fusionMap.xml');
           map.render('smartSearchMap');

       };

$('#my_button').click(function(){
	smartSearchMap();
});

 

 

This works great! Do you know when the next version of FusionMaps supporting HTML5 and JS would be available?

 

Thank you for your help!

Share this post


Link to post
Share on other sites
Guest Angshu

Hi,

 

Glad to know that you have managed to resolve your problem.

 

We are unable to commit any exact timeline regarding the release of FusionMaps which would support JS rendering, but we would definitely get back to you once there is any news from our end.

 

Thank you very much for your continued patience and patronage.

 

Hope you have a great day!

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