here are the relavent routines.
This creates the Icons which are located in a sub directory
Public Sub createicons()
Dim rdgicon As PointStyle
Dim icopath As String = Application.StartupPath & "\ICONS"
OILSStyle.ColumnName = “OIL”
rdgicon = New PointStyle(New GeoImage(icopath & “ur_ly_c.ico”))
rdgicon.PointType = PointType.Bitmap
OILSStyle.ValueItems.Add(New ValueItem(“ur_lyc”, rdgicon)) ’ Creates the new style.
rdgicon = New PointStyle(New GeoImage(icopath & “ur_lg_c.ico”))
OILSStyle.ValueItems.Add(New ValueItem(“ur_lgc”, rdgicon)) ’ Creates the new style.
rdgicon = New PointStyle(New GeoImage(icopath & “ug_lg_c.ico”))
OILSStyle.ValueItems.Add(New ValueItem(“ug_lgc”, rdgicon)) ’ Creates the new style.
rdgicon = New PointStyle(New GeoImage(icopath & “ur_lr_c.ico”))
OILSStyle.ValueItems.Add(New ValueItem(“ur_lrc”, rdgicon)) ’ Creates the new style.
rdgicon = New PointStyle(New GeoImage(icopath & “uy_lg_c.ico”))
OILSStyle.ValueItems.Add(New ValueItem(“uy_lgc”, rdgicon)) ’ Creates the new style.
pointLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(OILSStyle)
pointLayer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
pointLayer.Open()
pointLayer.Columns.Add(New FeatureSourceColumn(“OIL”))
pointLayer.Columns.Add(New FeatureSourceColumn(“BOXID”))
pointLayer.Columns.Add(New FeatureSourceColumn(“Lat”))
pointLayer.Columns.Add(New FeatureSourceColumn(“Lon”))
pointLayer.Columns.Add(New FeatureSourceColumn(“Time”))
pointLayer.Columns.Add(New FeatureSourceColumn(“Rdg”))
pointLayer.Columns.Add(New FeatureSourceColumn(“Rtyp”))
pointLayer.Columns.Add(New FeatureSourceColumn(“Units”))
pointLayer.Close()
pointOverlay.Layers.Add(“rdgLayer”, pointLayer)
Form1.WinformsMap1.Overlays.Add(“PointOverlay”, pointOverlay)
Form1.WinformsMap1.Refresh()
End Sub
This is the routine I call to add the icon to the map.
Public Sub addIcon(ByVal BOXID As String, ByVal lat As Double, ByVal lon As Double, ByVal Tim As DateTime, ByVal icon As String, ByVal val As Double, ByVal rtyp As String, ByVal units As String)
'Creates the feature with the Longitude and Latitude values and ICON.
Dim rdgFeature As Feature = New Feature(New PointShape(lon, lat)) ’ ths creates the actual reading
rdgFeature.ColumnValues(“OIL”) = icon
rdgFeature.ColumnValues(“BOXID”) = BOXID
rdgFeature.ColumnValues(“Lat”) = lat
rdgFeature.ColumnValues(“Lon”) = lon
rdgFeature.ColumnValues(“Time”) = Tim
rdgFeature.ColumnValues(“Rdg”) = val
rdgFeature.ColumnValues(“Rtyp”) = rtyp
rdgFeature.ColumnValues(“Units”) = units
pointLayer.InternalFeatures.Add(rdgFeature) ’ add it to the points layer
Form1.WinformsMap1.Refresh()
End Sub
As for the Dot Density. The points will be coming from may places at once. If a vehice is moving slowly then the icons will definitely overlay. Or event be in the same location. The application is time sensitive as well. one location could have many readings over time.