Hi.
I want to display RF received power to each cell with different color.
So, I have drawed 10*10 cells by shape, and add a field, like below.
sf = new Shapefile();
bool result = sf.CreateNewWithShapeID("", ShpfileType.SHP_POLYGON);
if (!result)
{
MessageBox.Show(sf.ErrorMsg[sf.LastErrorCode]);
}
else
{
int fldArea = sf.EditAddField("received_power", FieldType.DOUBLE_FIELD, 9, 12);
double xint = 1136340 + 90*100;
double yint = 1667610 + 90*160;
double w = 90;
double h = 90;
double x, y;
// Make N*N rectangular
int n = 10;
for (int i = 0; i < n; i++)
{
x = xint + (w * i);
for (int j = 0; j < n; j++)
{
y = yint + (h * j);
// Create new shape
Shape shp = new Shape();
shp.Create(ShpfileType.SHP_POLYGON);
shp.AddPoint(x, y);
shp.AddPoint(x + w, y);
shp.AddPoint(x + w, y + h);
shp.AddPoint(x, y + h);
shp.AddPoint(x, y);
int index = i * 10 + j;
sf.EditInsertShape(shp, ref index);
sf.EditCellValue(fldArea, index, 100);
}
}
sfhandle = axMap1.AddLayer(sf, true);
BtnUnloadStation.Enabled = true;
axMap1.ZoomToLayer(sfhandle);
}
but I don’t know how to fill the cells with color.
Do you know any other way, let me know.
Please help me.
Thank you.