Hi All
I m getting null exception error in this following code
Private Sub QueryTaskZoomSearch_ExecuteCompleted(ByVal sender As Object, ByVal args As ESRI.ArcGIS.Client.Tasks.QueryEventArgs)
Dim featureSet1 As FeatureSet = args.FeatureSet
Dim graphicsLayer As GraphicsLayer = TryCast(MyMap.Layers("MyGraphicsLayer"), GraphicsLayer)
graphicsLayer.ClearGraphics()
If featureSet1 IsNot Nothing AndAlso featureSet1.Features.Count > 0 Then
Dim selectedFeature As Graphic = New Graphic
selectedFeature = featureSet1.Features(1)
Select Case featureSet1.GeometryType
Case GeometryType.Point : selectedFeature.Symbol = DefaultMarkerSymbol
Case GeometryType.Polygon : selectedFeature.Symbol = DefaultFillSymbol
Case GeometryType.Polyline : selectedFeature.Symbol = DefaultLineSymbol
Case GeometryType.Envelope : selectedFeature.Symbol = DefaultMarkerSymbol // here it shows nothing in envelope
End Select
'selectedFeature.Symbol = DefaultFillSymbol
graphicsLayer.Graphics.Add(selectedFeature)
' Zoom to selected feature (define expand percentage)
Dim selectedFeatureExtent As ESRI.ArcGIS.Client.Geometry.Envelope = selectedFeature.Geometry.Extent
getting error in underline text .... object refernce is not set to an instance of an object
plz help