This project is read-only.

Different colors for the polygon

Sep 15, 2008 at 3:55 AM

I am creating polygons using the polygon class. The points, fill color for the polygons come from an xml file. Each polygon has different colors. I am assigning the colors to SessionVariables. The first time when the page is loads, i am able to get each polygon with their color. But when i zoomin and then zoomout. All the polygons are filled with the color of the last polygon that was filled.

How do i retain the polygon colors? Is there a way to do this?

Sep 15, 2008 at 4:24 AM
there is a class for your PushPin called "PushPin.cs" in the downloaded project

this has a methods called, "CreateElement" & "UpdateElement"

the UpdateElement method fires everytime you zoom the map,

I would look at these methods
Sep 15, 2008 at 9:13 PM

I am not using XML to load my polygons, instead I am using web services returning polygon coordinates.  I set the fill color dynamically as I loop through polygons and can draw polygons with different colors - no issues when zooming.  I added the following to the polygon shape class, (though don't know if you are using that class):



Color setFillColor







pFill =





to the polygon shape class.