Select to view content in your preferred language

Rotate arrow symbol based on the direction of location point

1833
1
Jump to solution
08-23-2014 11:47 PM
JulieBiju
Deactivated User

I can Rotated an arrow with the code I mentioned below. Is it possible to rotate a car icon with the same code? I need to rotate the DefaultCArSymbol based on direction  instead of MyRotatingMarkerSymbol. For that How can I write the code?Pls HELP ME

  esri:PictureMarkerSymbol x:Key="DefaultCArSymbol" OffsetX="8" OffsetY="8" Source="/ESRI-V-10-SIL4;component/Images/car-red-16x16.png" />

            <esri:MarkerSymbol x:Name="MyRotatingMarkerSymbol" OffsetX="6" OffsetY="3">

                <esri:MarkerSymbol.ControlTemplate>

                    <ControlTemplate>

                        <Grid x:Name="ArrowGrid" RenderTransformOrigin="0.5,0.5" Background="Transparent" Width="6" Height="12">

                            <Path Data="M2.625,11.5 L0.5,9.375 L1.88125,9.375 L1.88125,0.5 L3.3687501,0.5 L3.3687501,9.375 L4.75,9.375 z"

                                  Fill="#FFF4F4F5" Margin="0.625,0.25,0.625,0.625" Stretch="Fill" Stroke="Black" UseLayoutRounding="False"/>

                            <Grid.RenderTransform>

                                <CompositeTransform Rotation="{Binding Attributes[WIND_DIRECT]}" ScaleX="2" ScaleY="2" />

                            </Grid.RenderTransform>

                        </Grid>

                    </ControlTemplate>

                </esri:MarkerSymbol.ControlTemplate>

            </esri:MarkerSymbol

0 Kudos
1 Solution

Accepted Solutions
AsserSwelam1
Deactivated User

Hi Julie,

You can use the Angle property of the PictureMarkerSymbol.

Thanks,

Asser

View solution in original post

0 Kudos
1 Reply
AsserSwelam1
Deactivated User

Hi Julie,

You can use the Angle property of the PictureMarkerSymbol.

Thanks,

Asser

0 Kudos