Doomhammer

Members
  • Content count

    1
  • Joined

  • Last visited

Posts posted by Doomhammer


  1. 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.