Hi,
I am using a RadMap that depicts a number of physical area around the map that are drawn with MapPolygons. This works great. I am trying to put text inside each corner of each MapPolygon to tell users what area they are viewing. I need the scale of this text to match the map's scale as the user zooms in and out. I have added labels with a number of approaches, but I always find that they don't scale correctly when you zoom in. For example, in the attached file you will see how the text gets very small as you zoom in. In that file you will also see the way I need the text to look.
In this example the following code gets executed for each corner in a given MapPolygon that I am trying to label:
Grid grid = new Grid();
grid.Background = new SolidColorBrush(Colors.White);
TextBlock text = new TextBlock();
text.Foreground = new SolidColorBrush(Colors.Purple);
text.Text = "My Label Data";
grid.Children.Add(text);
Location newLocation = ... (based on MapPolygon corner)
MapLayer.SetLocation(grid, newLocation);
this.informationLayer.Items.Add(grid);
Is there a way to add text to a RadMap and have it keep its location and scale correctly as a user zooms in/out?
Thanks.
I am using a RadMap that depicts a number of physical area around the map that are drawn with MapPolygons. This works great. I am trying to put text inside each corner of each MapPolygon to tell users what area they are viewing. I need the scale of this text to match the map's scale as the user zooms in and out. I have added labels with a number of approaches, but I always find that they don't scale correctly when you zoom in. For example, in the attached file you will see how the text gets very small as you zoom in. In that file you will also see the way I need the text to look.
In this example the following code gets executed for each corner in a given MapPolygon that I am trying to label:
Grid grid = new Grid();
grid.Background = new SolidColorBrush(Colors.White);
TextBlock text = new TextBlock();
text.Foreground = new SolidColorBrush(Colors.Purple);
text.Text = "My Label Data";
grid.Children.Add(text);
Location newLocation = ... (based on MapPolygon corner)
MapLayer.SetLocation(grid, newLocation);
this.informationLayer.Items.Add(grid);
Is there a way to add text to a RadMap and have it keep its location and scale correctly as a user zooms in/out?
Thanks.