Hi,
I am looking for someone to help me in two tasks.
Part 1:
Below is the sample json with properties ‘color_Val’. I am trying to display a multilinestring and color the string depending on the value in color_Val property. Please let me know where am i going wrong.
Sample Json:
{
"geometry":{
"coordinates":[
[
[
-67.129402160644531,
18.569900512695312
],
[
-67.126701354980469,
18.569900512695312
],
[
-67.1239013671875,
18.569799423217773
]
]
],
"type":"MultiLineString"
},
"properties":{
"color_Val":"1"
},
"type":"Feature"
},
Sample code:
Dim valStyle As ValueStyle = Nothing
valStyle.ColumnName = “color_Val”
valStyle.ValueItems.Add(New ValueItem(“1”,(LineStyles.CreateSimpleLineStyle(GeoColor.StandardColors.YellowGreen,
2, LineDashStyle.Dash, True))))
shapeLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(valStyle)
Part 2:
Below is the sample json with properties ‘color_Val’ and ‘text_Val’. I am trying to display a value from ‘text_Val’ and color the string depending on the value in color_Val property. Please let me know where am i going wrong.
{
“geometry”:{
“coordinates”:[
-69.2144,
18.6233
],
“type”:“Point”
},
“properties”:{
“text_Val”:"+",
“color_Val”:“1”
},
“type”:“Feature”
},
Sample Code:
Dim valStyle As ValueStyle = Nothing
valStyle.ColumnName = “color_Val”
valStyle.ValueItems.Add(New ValueItem(“1”, (TextStyles.CreateSimpleTextStyle(“text_Val”, “geographic”, 7,
DrawingFontStyles.Regular, New GeoColor(255, 0, 0)))))
shapeLayer.ZoomLevelSet.ZoomLevel01.CustomStyles.Add(valStyle)
shapeLayer.ZoomLevelSet.ZoomLevel01.DefaultTextStyle = TextStyles.CreateSimpleTextStyle(“text_Val”,
“geographic”, 7, DrawingFontStyles.Regular, GeoColor.StandardColors.White)
Please let me know how to get it working.