Hi community, hope you’re all doing well.
I’m migrating an application that was using DUNDAS to ThinkGEO. So far, so good.
But right now I’m at a dead-end. See the attached image at the bottom of the post.
I need to be able to insert for each region (a region is a country / province / something) what we define as a CUMULATIVE FACTOR. The user will enter values for different cumulative factors for each region, and we need to display it as a SQUARE with a background color and a font color (each factor has it’s own back color and font color). Each region can have 0…* cumulative factors. So, in the image below, we can see that “North-Western” has 3 cumulative factors, with values 22, 14 and 32.
DUNDAS provided the ability to accomplish this by using Symbols. Those symbols had a text, background color, position, and such.
Can you please lead me in the right direction to accomplish this in ThinkGEO?
Code and images are below.
Thanks!
Juan.
Symbol s2 =newSymbol();s2.MarkerStyle = MarkerStyle.Rectangle;
s2.HatchStyle = MapHatchStyle.DarkVertical;s2.X = s.CentralPoint.X;s2.Y = s.CentralPoint.Y;s2.TextAlignment = TextAlignment.Center;s2.TextShadowOffset = 2;//s2.Offset = new Offset() { Y = -40 };s2.Text = sum.ToString("##");if(f.Color.Split(’,’).Length > 1){s2.TextColor = ColorTranslator.FromHtml(f.Color.Split(’,’)[1]);s2.Color = ColorTranslator.FromHtml(f.Color.Split(’,’)[0]);s2.SecondaryColor = ColorTranslator.FromHtml(f.Color.Split(’,’)[0]);}else{s2.TextColor = SystemColors.ControlText;// ColorTranslator.FromHtml(f.Color.Split(’,’)[0]);s2.Color = SystemColors.Control;//ColorTranslator.FromHtml(f.Color.Split(’,’).Length > 1 ? f.Color.Split(’,’)[1] : “#000000”);}s2.Layer =“CumulativeFactor”;s2.ParentShape = s.Name;s2.Height = (int)(30 - (30 * (tbMarkerSize.Value - 5) * 5 / 100));s2.Width = (int)(30 - (30 * (tbMarkerSize.Value - 5) * 5 / 100));s2.Font =newFont(“Trebuchet MS”, (tbMarkerSize.Value > 12 ? 8 : tbMarkerSize.Value > 10 ? 9 : tbMarkerSize.Value > 8 ? 10 : tbMarkerSize.Value > 6 ? 11 : 12), FontStyle.Bold);s2.Tag = imf;mapControl1.Symbols.Add(s2);
