Sign in to follow this  
prashant66

Click on a state in a map and call an ajax method

Recommended Posts

Hi Team,

 

I would like to know if there is any way to have an ajax call on click of a state in the map.

 

Please help me out and let me know if  you need any further details.

 

Thank You.

 

Regards,

Prashant.

 

Share this post


Link to post
Share on other sites
Guest Sashibhusan

Hi Prashant,

 

You could provide your custom JavaScript function call, on click of each "entity" in FusionMaps XT by using the "link" attribute as below:

 

Ref. XML Code:

<map>
 <data>
  <entity id='NA' value='515' link="JavaScript:myJS('NA, 515');"/>
  ...
 </data>
</map>

So, in your custom JavaScript function definition, you could implement your requirement.

 

For more information on "Using JavaScript Functions as links", please follow the link below:

http://docs.fusioncharts.com/maps/Contents/?DrillDown/JavaScript.html

 

Hope this helps!

Share this post


Link to post
Share on other sites

Hi Team,

 

I am using a USA.swf file for Maps. Could you please tell me how can i do that for a swf files.

 

Thank You.

 

Regards,

Prashant.

Hi,

 

Please note that you would need provide the "link" attribute in the specific <entity> element which you want to make clickable.

 

For USA map, the map specification sheet can be obtained from the following link.

Ref.- http://docs.fusioncharts.com/maps/Contents/?MapSS/USA.html

 

Ref. XML:

<map ... >
    <data>
        <entity id='02'  link='JavaScript:myJS('NA, 515');'/>
        <entity id='04'  />
        <entity id='05'  />
        <entity id='01'  />
        <entity id='03'  />
    </data>
</map>

Hope this helps. :)

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