Imports ThinkGeo.MapSuite.Core Imports ThinkGeo.MapSuite.DesktopEdition Imports System.Collections.ObjectModel Imports System.Globalization Imports System.ComponentModel Imports System.Drawing.Printing Imports System.Drawing Imports System.IO Public Class Form1 Dim oNewFeatrueList As New clsNewFeatureList Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load initMap() End Sub Private Sub initMap() Try AddHandler map.TrackOverlay.VertexAdded, AddressOf map_TrackOverlayVertexAdded map.MapUnit = GeographyUnit.Meter map.MinimumScale = 1 map.MaximumScale = 3000000 map.ZoomLevelSnapping = ZoomLevelSnappingMode.None map.Refresh() Catch ex As Exception MsgBox(ex.ToString) End Try End Sub Private Sub map_TrackOverlayVertexAdded(ByVal sender As Object, ByVal e As VertexAddedTrackInteractiveOverlayEventArgs) Dim oNewFeature As New clsNewFeature oNewFeature.FatureId = 1 oNewFeature.VertexId = 1 oNewFeature.X = e.AddedVertex.X oNewFeature.Y = e.AddedVertex.Y oNewFeatrueList.Add(oNewFeature) dgvNewFeature.DataSource = oNewFeatrueList dgvNewFeature.DataSource = Nothing dgvNewFeature.DataSource = oNewFeatrueList End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click map.TrackOverlay.TrackMode = TrackMode.None End Sub Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click map.TrackOverlay.TrackMode = TrackMode.Polygon End Sub Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click map.TrackOverlay.TrackMode = TrackMode.Line End Sub End Class