Finally, we hit the attributes for the feature and use it to redraw our tower ranges based on the tower attribute value range. We will apply the code that we wrote in the previous section, on all the towers. However, instead of using the hardcoded value of 100 meters, we will use the actual tower range.
We will use the range attribute to draw the signal buffer for one tower. Follow these steps:
Open your TelZaViBa project from
C:\ArcGISByExample\telzaviba\code\
.Change the following code in the
onClick
event forbtnShowTowerRange.vb
:… Dim pDocument As IMxDocument = My.ArcMap.Application.Document Dim pTowerLayer As IFeatureLayer = pDocument.FocusMap.Layer(0) Dim pFeature As IFeature = pTowerLayer.FeatureClass.GetFeature(1) Dim pTopo As ITopologicalOperator = pFeature.Shape Dim range As Double = pFeature.Value(pFeature.Fields.FindField("TOWER_RANGE_METERS")) Dim pTowerRange As IGeometry = pTopo.Buffer(range) Dim...