Hi,
I written some codes to generate polygons by looping through an array of different coordinates.
Each item in the array consists of the latitude, longtitude and magnitude.
Based on the magnitude, I would like to show different polygon colors.
Sample coding as below:
PolygonScale=0.5
For i = 0 To arrOrigCoordinate.Count - 1
lon1 = arrLonLatCoordinate(i).Lon - PolygonScale
lat1 = arrLonLatCoordinate(i).Lat + PolygonScale
lon5 = arrLonLatCoordinate(i).Lon - PolygonScale
lat5 = arrLonLatCoordinate(i).Lat + PolygonScale
lon4 = arrLonLatCoordinate(i).Lon - PolygonScale
lat4 = arrLonLatCoordinate(i).Lat - PolygonScale
lon2 = arrLonLatCoordinate(i).Lon + PolygonScale
lat2 = arrLonLatCoordinate(i).Lat + PolygonScale
lon3 = arrLonLatCoordinate(i).Lon + PolygonScale
lat3 = arrLonLatCoordinate(i).Lat - PolygonScale
Dim feature1 As New Feature("POLYGON((" & lon1 & " " & lat1 & ", " & lon2 & " " & lat2 & ", " & lon3 & " " & lat3 & ", " & lon4 & " " & lat4 & ", " & lon5 & " " & lat5 & "))", "Rectangle" & i)
rectangleLayer.InternalFeatures.Add("Rectangle" & i, feature1)
rectangleFeature = rectangleLayer.InternalFeatures("Rectangle" & i)
rectangleLayer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle.FillSolidBrush.Color = GeoColor.FromArgb(100, GeoColor.StandardColors.Blue)
End If
Next
Kindly advice how do i go about doing it.
Thanks!