2 Replies Latest reply on Jan 21, 2011 3:49 AM by Kukaac

    Coloring part of an Image

    Kukaac

      Hi,

       

      I'm writing a Flex application. I have a map and i'm planning to color countries on the map. The color is going to change based on a input number for each contry (Like changeing color based on population). My question would be, how to change the color of a part of an image? I'm planning to use image croping, but I'm not sure, if I can use other forms then rectangle. I'm planning to use one of these maps :

      http://commons.wikimedia.org/wiki/Category:Blank_SVG_maps_of_the_world

       

      and planning to do something like this :

       

      http://www.tarasnovak.com/lab/DegrafaGlobe/DegrafaGlobe.html (The 2D part, but not with mouseover)

       

      So any suggestions would be great how to start it.

       

      Thank you,

      Kukac

        • 2. Re: Coloring part of an Image
          Kukaac Level 1

          One more question about liberty gis. Is is possible to retrive a list of MapItems from the DataLayer class.

           

          I'm trying something like this:

           

           

          shapeFile.source = new shapeFileAsset() as ByteArray;

           

          DBFFile.source = new DBFFileAsset() as ByteArray;
                    
          dataLayer = new DataLayer(shapeFile, DBFFile, false, true);

           

          map.addLayer(dataLayer );           
                         
          map.refreshMap();


          for each (component in dataLayer.components)
          {    
               if (component is MapItem){

                    ....

               }
          }

           

          however the dataLayer.components is an empty Vector. (It shouldn't be empty since I managed to display the map)