Dim vl = MapReader.LoadKmlFile("WorldMap.kmz", Function(vector, data)
Dim name = TryCast(data("name"), String)
vector.Tag = name
' customizing the vector data
Dim fillColor = TryCast(data(KmlReader.StyleFillColor), String)
If fillColor IsNot Nothing Then
vector.Style.BackColor = MapReader.GetKmlStyleColor(fillColor)
End If
Dim placemark = TryCast(vector, C1.Win.Map.VectorPlacemark)
If placemark IsNot Nothing Then
placemark.Marker.Caption = name
placemark.Lod = New LOD(0, 0, 2, 20)
End If
End Function)
vl.LabelVisibility = LabelVisibility.AutoHide
' can set default style for vectors and labels, instead of set the style through each vector
vl.Style.Stroke.Color = Color.Blue
vl.Style.Stroke.Width = 1
vl.LabelStyle.ForeColor = Color.Green
c1Map1.Layers.Add(vl)