HI there
gis.thinkgeo.com/Support/Dis....aspx#7211
I tried this link to solve my problem but i am getting ERROR "The FeatureSource is not open. Please call the Open method before calling this method". I am sending my code kindly help me what i am missing.
WinformsMap1.MapUnit = GeographyUnit.DecimalDegree
WinformsMap1.CurrentExtent = New RectangleShape(46.38, 30.1, 48.5, 28.5)
WinformsMap1.BackgroundOverlay.BackgroundBrush = New GeoSolidBrush(GeoColor.GeographicColors.ShallowOcean)
Dim worldMapKitDesktopOverlay As WorldMapKitWmsDesktopOverlay = New WorldMapKitWmsDesktopOverlay()
WinformsMap1.Overlays.Add(worldMapKitDesktopOverlay)
Dim worldLayer As New ShapeFileFeatureLayer("..\..\SampleData\Data\Countries02.shp")
Dim staticoverlayer As New LayerOverlay()
staticoverlayer.Layers.Add("Area", worldLayer)
WinformsMap1.Overlays.Add(staticoverlayer)
Dim inMemoryLayer As New InMemoryFeatureLayer()
inMemoryLayer.Columns.Add(New FeatureSourceColumn ("Label1"))
Dim testFeature As New Feature(New PointShape(47.3082, 29.1187))
testFeature.ColumnValues.Add("Label1", "TEST LABEL")
inMemoryLayer.InternalFeatures.Add(testFeature)
inMemoryLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.City1("Label1")
inMemoryLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
Dim labelOverlay As New LayerOverlay()
labelOverlay.Layers.Add("Label", inMemoryLayer)
WinformsMap1.Overlays.Add(labelOverlay)
WinformsMap1.Refresh()