Doomhammer Report post Posted August 27, 2008 Hi. I'm looking for the best way to solve this: I've got a map of europe, and all its countries. I want to click on a country and update the corresponding with a new background color. Is there a good, clean way of doing this? Right now I've had to set the XML of the map to a javascript variable, pass that in, on click use a regular expression to find the entity in the XML and replace the color attribute with a new one, then set the entire XML back to fusionmaps using setDataXML. This is a slow and error prone way of doing it. What I'd so like to see in FusionMaps would be true integration with the data, such as... function entityClickCallback(entity) { if(entity.getAttribute('color') == '#ff00ff') { entity.setAttribute('color', '#bf1942'); } } I don't know if that sort of interaction between javascript and actionscript is possible (entity would have to be an object with functions), but boy would it be awesome. Thanks, Doomhammer. Share this post Link to post Share on other sites
FusionCharts Support Report post Posted August 28, 2008 Hi, I am afraid, this is not possible as of now. Share this post Link to post Share on other sites
CrazyMax Report post Posted April 21, 2011 Hi Doomhammer I recently started working with fusionMaps, would it be possible for you to share your code as an example on how to change the color of a entity. I was able to get a clickEvent by using javaScript. Hi. I'm looking for the best way to solve this: I've got a map of europe, and all its countries. I want to click on a country and update the corresponding with a new background color. Is there a good, clean way of doing this? Right now I've had to set the XML of the map to a javascript variable, pass that in, on click use a regular expression to find the entity in the XML and replace the color attribute with a new one, then set the entire XML back to fusionmaps using setDataXML. This is a slow and error prone way of doing it. What I'd so like to see in FusionMaps would be true integration with the data, such as... function entityClickCallback(entity) { if(entity.getAttribute('color') == '#ff00ff') { entity.setAttribute('color', '#bf1942'); } } I don't know if that sort of interaction between javascript and actionscript is possible (entity would have to be an object with functions), but boy would it be awesome. Thanks, Doomhammer. Share this post Link to post Share on other sites
Guest Angie Report post Posted April 25, 2011 Hi, Welcome to FusionCharts Forum! First of all, we would like to thank you for showing interest in FusionCharts. Please find a sample workaround for your reference. Hope this helps. HighlightEnitityOnClick2.zip Share this post Link to post Share on other sites