Hi
I currently have multiple brands of stores which i have allocated an HTML color to.
I have used a popup marker to show my stores as i require the popup to show information on the stores once the users hover over the marker.
The issue i am having is getting each store brand to show as a different color marker.
This is the code i am using to loop through the data and add the style to the marker for each brand
For Each myStore In myHHStores
If myStore.ColumnValues(“SubBrandid”) = 1 Then
StoresMarkerOverlay.FeatureSource.InternalFeatures.Add(myStore.ColumnValues(“Id”), myStore)
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.Popup.ContentHtml = “[#StoreName#]([#StoreCode#])]”
'StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle =
'StoresLayer.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = PointStyles.CreateSimpleCircleStyle(GeoColor.FromHtml(Color), 10)
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.Popup.HasCloseButton = True
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.Popup.Width = 100
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.Popup.Height = 30
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.Popup.BackgroundColor = GeoColor.StandardColors.Green
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.Popup.BorderColor = GeoColor.StandardColors.Black
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.Popup.BorderWidth = 1
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.WebImage.ImageOffsetX = -10.5F
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.WebImage.ImageOffsetY = -25.0F
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.WebImage.ImageWidth = 21
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.WebImage.ImageHeight = 25
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.WebImage.FontColor = GeoColor.FromHtml("#99FF99")
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.DefaultMarkerStyle.WebImage.TextBackgroundColor = GeoColor.FromHtml("#99FF99")
StoresMarkerOverlay.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20
ElseIf myStore.ColumnValues(“SubBrandid”) = 2 Then
ElseIf myStore.ColumnValues(“SubBrandid”) = 3 Then
ElseIf myStore.ColumnValues(“SubBrandid”) = 4 Then
End If
Next
Please could you assist
How to change the color of Markers
Hi Ismail,
If you want to render marker to different color based on your data value, please try to use ValueMarkerStyle or ClassBreakMarkerStyle.
You can see we have a sample named SetTheZoomLevelsOnAMarker which tells how to use ClassBreakMarkerStyle.
Regards,
Don