ArcGIS API for Silverlight 地图元素点闪烁,线流动显示的处理方式

简介: ...
<Grid x:Name="LayoutRoot" Background="White">
        <!--地图资源样式模版-->

        <Grid.Resources>

            <!--预警闪烁标记符号-->
            <esri:MarkerSymbol x:Name="DefaultMarkerSymbol">
                <esri:MarkerSymbol.ControlTemplate>
                    <ControlTemplate>
                        <Canvas>
                            <vsm:VisualStateManager.VisualStateGroups>
                                <vsm:VisualStateGroup x:Name="CommonStates">
                                    <vsm:VisualState x:Name="Normal">
                                        <Storyboard RepeatBehavior="Forever">
                                            <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleX)" From="1" To="5" Duration="00:00:02" />
                                            <DoubleAnimation BeginTime="0:0:0" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.RenderTransform).(ScaleTransform.ScaleY)" From="1" To="5" Duration="00:00:02" />
                                            <DoubleAnimation BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.Opacity)" From="1" To="0" Duration="00:00:02" />
                                        </Storyboard>
                                    </vsm:VisualState>
                                </vsm:VisualStateGroup>
                            </vsm:VisualStateManager.VisualStateGroups>
                            <Ellipse Height="25" Width="25" Canvas.Left="0" Canvas.Top="0" RenderTransformOrigin="0.5,0.5" x:Name="ellipse" IsHitTestVisible="False">
                                <Ellipse.RenderTransform>
                                    <ScaleTransform />
                                </Ellipse.RenderTransform>
                                <Ellipse.Fill>
                                    <RadialGradientBrush>
                                        <GradientStop Color="#00FF0000" />
                                        <GradientStop Color="#FFFF0000" Offset="0.25" />
                                        <GradientStop Color="#00FF0000" Offset="0.5" />
                                        <GradientStop Color="#FFFF0000" Offset="0.75" />
                                        <GradientStop Color="#00FFFFFF" Offset="1" />
                                    </RadialGradientBrush>
                                </Ellipse.Fill>
                            </Ellipse>
                            <Ellipse Height="20" Width="20" Canvas.Left="0" Canvas.Top="0" Fill="#FFFFFFFF" x:Name="ellipse1" />
                        </Canvas>
                    </ControlTemplate>
                </esri:MarkerSymbol.ControlTemplate>
            </esri:MarkerSymbol>

           <!--线层流动显示-->
            <esri:LineSymbol x:Key="CustomAnimatedRedLineSymbol">
                <esri:LineSymbol.ControlTemplate>
                    <ControlTemplate >
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">
                                    <VisualState x:Name="Normal">
                                        <Storyboard RepeatBehavior="Forever">
                                            <DoubleAnimation BeginTime="0:0:0" Storyboard.TargetName="Element" Storyboard.TargetProperty="StrokeDashOffset" To="1000" Duration="0:3:0" />
                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Path x:Name="Element" StrokeDashArray="2,1" StrokeDashOffset="0" Stroke="Blue" StrokeThickness="2" />
                        </Grid>
                    </ControlTemplate>
                </esri:LineSymbol.ControlTemplate>
            </esri:LineSymbol>

     </Grid.Resources>

</Grid>

                 //点闪烁

                Graphic g = new Graphic()
                {
                    Geometry = mercator.FromGeographic(new MapPoint(double.Parse(findResult.Latitute.ToString().Trim()), double.Parse(findResult.Longitute.ToString().Trim()))),
                    Symbol = LayoutRoot.Resources["DefaultMarkerSymbol"] as Symbol
                };

                 //线流动显示

                Graphic g = new Graphic()
                 {
                             Geometry = mp,
                             Symbol = LayoutRoot.Resources["RedMarkerSymbol"] as Symbol
                 };


相关文章
|
人工智能 NoSQL 定位技术
标准地图的矢量模板,ArcGIS可打开
标准地图的矢量模板,ArcGIS可打开
153 0
|
定位技术
ArcGIS:地图单位和视图单位(显示单位)的区别?
ArcGIS:地图单位和视图单位(显示单位)的区别?
166 0
|
6月前
|
人工智能 编解码 定位技术
ArcGIS导出AI或EPS格式的地图图片并在Adobe Illustrator中继续编辑
ArcGIS导出AI或EPS格式的地图图片并在Adobe Illustrator中继续编辑
302 1
|
6月前
|
存储 定位技术
ArcGIS中ArcMap导入mxd地图文档文件出现红色感叹号、地图空白的解决
ArcGIS中ArcMap导入mxd地图文档文件出现红色感叹号、地图空白的解决
170 1
|
6月前
|
编解码 定位技术 Python
Python中ArcPy实现ArcGIS自动批量制图与地图要素批量设置
Python中ArcPy实现ArcGIS自动批量制图与地图要素批量设置
171 1
|
人工智能 数据可视化 API
ArcGIS API for Python
ArcGIS API for Python
65 0
|
JavaScript 前端开发 应用服务中间件
Arcgis api for javascript 详细部署
Arcgis api for javascript 详细部署
|
人工智能 数据可视化 数据管理
ArcGIS API for Python
ArcGIS API for Python
111 0