Select to view content in your preferred language

Selection marker symbols displaced comparing to the source data

1100
1
07-18-2012 06:24 AM
DmitriiIgnatiev
Occasional Contributor
[ATTACH=CONFIG]16192[/ATTACH]

Hello, world!

I encountered a very weird behaviour of selection markers. I defined a custom selection style obeing to visual state transitions in a way corresponding to existing samples:

            <symbols:MarkerSymbol x:Name="SelectPointSymbol">
                <symbols:MarkerSymbol.ControlTemplate>
                    <ControlTemplate>
                        <Ellipse x:Name="Element" Fill="Yellow" Height="7" Width="7">
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="SelectionStates">
                                    <VisualState x:Name="Unselected" >
                                    </VisualState>
                                    <VisualState x:Name="Selected">
                                        <Storyboard>
                                            <ColorAnimation  Storyboard.TargetName="Element" To="Red" Duration="00:00:00.25" Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)"/>
                                            <DoubleAnimation Storyboard.TargetName="Element" To="10"  Duration="00:00:00.25" Storyboard.TargetProperty="(Ellipse.Height)"/>
                                            <DoubleAnimation Storyboard.TargetName="Element" To="10"  Duration="00:00:00.25" Storyboard.TargetProperty="(Ellipse.Width)"/>
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                        </Ellipse>
                    </ControlTemplate>
                </symbols:MarkerSymbol.ControlTemplate>
            </symbols:MarkerSymbol>

After that I got my points to be highlighted according to FeatureDataGrid selection etc. Everything looks to be nice besides the visible displacement of the selection symbols comparing to the source data. You can contemplate that at the picture attached to this posting. The horizontal extent of the picture is ~ 200 kilometers, so the displacement is significant and unacceptable. The data itself is being retrieved via query tasks execution. No additional processing is being applied etc. Furthermore the lines and polygons have similar styles and do not show any displacement that could deserve my attention. Any idea on what is going on would be greatly appreciated!

Thanks in advance, Dmitry.
0 Kudos
1 Reply
DmitriiIgnatiev
Occasional Contributor
Hi!

I found a temporary workaround by setting OffsetX and OffsetY for this MarkerSymbol wich made it like sane but still not so accurate as I could expect. By the way I made a test using a real SimpleMarkerSymbol. To my astonishment it behaves as desired by unhappy me. So, this is a kind of feature of that advanced symbolization. Definitely not a bug. But still if you will find something about my XAML or will have any other idea about how to overcome that behaviour please-please-please let me know about.

Thanks and regards, Dmitry.
0 Kudos