Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
450
Controlling the placement of symbol captions
posted

How can I control the placement of a Symbol's captions?

Currently with a 'bubble' symbol the caption is appearing over the symbol I want it to display above by default.

Further for some of my applications I want to one piece a caption above the symbol and a value below the symbol, is this possible?

 

Parents
No Data
Reply
  • 2505
    Suggested Answer
    Offline posted

    Hi dmurraylaing,
    A sample approach to achieve this, using a picture as a symbol, is the following:
            <igMap:XamMap x:Name="xamMap1">
                <igMap:XamMap.Layers>
                    <igMap:MapLayer x:Name="MapLayer" IsAutoWorldRect="True">
                        <igMap:MapLayer.Reader>
                            <igMap:ShapeFileReader Uri="Shapefiles/world/world" DataMapping="Caption=CNTRY_NAME; Value=POP_CNTRY"/>
                        </igMap:MapLayer.Reader>
                  
                    <igMap:MapLayer.ValueTemplate>
                            <DataTemplate>
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                        <RowDefinition/>
                                    </Grid.RowDefinitions>
                                    <TextBlock Text="{Binding Caption}" Grid.Row="0"/>
                                    <Image Source="Images/pizza.jpg" Height="50" Width="50" Grid.Row="1"/>
                                    <TextBlock Text="{Binding Value}" Grid.Row="2"/>
                                </Grid>
                            </DataTemplate>
                        </igMap:MapLayer.ValueTemplate>
                    </igMap:MapLayer>
                </igMap:XamMap.Layers>
            </igMap:XamMap>
      
    Hope that helps,
    Milana Zhileva

Children