Protected
Sub Map1_TrackShapeFinished(ByVal sender As Object, ByVal e As System.EventArgs) Handles Map1.TrackShapeFinishedDim dynamicOverlay As LayerOverlay = DirectCast(Map1.CustomOverlays("DynamicOverlay"), LayerOverlay)Dim shapeLayer As InMemoryFeatureLayer = DirectCast(dynamicOverlay.Layers("shapeLayer"), InMemoryFeatureLayer)Dim markerOverlay As InMemoryMarkerOverlay = DirectCast(Map1.CustomOverlays("MarkerOverlay"), InMemoryMarkerOverlay)Dim MarkeID As String = "'"
'Dim Analyte As String = ddAnalyte.SelectedValue.ToString
'Dim cOperator As String = ddOperator.SelectedValue.ToString
'Dim cVal As String = txtValue.Text
For Each feature As Feature In Map1.EditOverlay.FeaturesDim returnMarkers As New Collection(Of Marker)Dim zoomLevel As MarkerZoomLevel = markerOverlay.ZoomLevelSet.GetZoomLevelForDrawing(GetZoomFromScale(Map1.CurrentScale, Map1.ZoomLevelSet))If Not (IsDBNull(zoomLevel)) Then
markerOverlay.FeatureSource.Open()
'returnMarkers include all markers contained within that shape
returnMarkers = zoomLevel.GetMarkers(markerOverlay.FeatureSource.GetFeaturesInsideBoundingBox(feature.GetShape().GetBoundingBox(),
markerOverlay.FeatureSource.Close()
MarkeID = MarkeID + Marker.Id +
ReturningColumnsType.AllColumns))For Each Marker As Marker In returnMarkers"','"
Next
End If
shapeLayer.InternalFeatures.Add(feature.Id, feature)
Next
End Sub