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

简介: 原文:ArcGIS API for Silverlight 地图元素点闪烁,线流动显示的处理方式 ...
原文: 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
                 };


目录
相关文章
|
人工智能 数据可视化 API
ArcGIS API for Python
ArcGIS API for Python
64 0
|
JavaScript 前端开发 应用服务中间件
Arcgis api for javascript 详细部署
Arcgis api for javascript 详细部署
|
人工智能 数据可视化 数据管理
ArcGIS API for Python
ArcGIS API for Python
107 0
|
JavaScript 前端开发 定位技术
ArcGIS API For JavaScript官方文档(六)之设置范围
ArcGIS API For JavaScript官方文档(六)之设置范围
|
存储 JSON 前端开发
ArcGIS API For JavaScript官方文档(一)之默认API配置
ArcGIS API For JavaScript官方文档(一)之默认API配置
|
2月前
|
机器人 API Python
智能对话机器人(通义版)会话接口API使用Quick Start
本文主要演示了如何使用python脚本快速调用智能对话机器人API接口,在参数获取的部分给出了具体的获取位置截图,这部分容易出错,第一次使用务必仔细参考接入参数获取的位置。
173 1
|
2天前
|
编解码 监控 API
直播源怎么调用api接口
调用直播源的API接口涉及开通服务、添加域名、获取API密钥、调用API接口、生成推流和拉流地址、配置直播源、开始直播、监控管理及停止直播等步骤。不同云服务平台的具体操作略有差异,但整体流程简单易懂。
|
15天前
|
人工智能 自然语言处理 PyTorch
Text2Video Huggingface Pipeline 文生视频接口和文生视频论文API
文生视频是AI领域热点,很多文生视频的大模型都是基于 Huggingface的 diffusers的text to video的pipeline来开发。国内外也有非常多的优秀产品如Runway AI、Pika AI 、可灵King AI、通义千问、智谱的文生视频模型等等。为了方便调用,这篇博客也尝试了使用 PyPI的text2video的python库的Wrapper类进行调用,下面会给大家介绍一下Huggingface Text to Video Pipeline的调用方式以及使用通用的text2video的python库调用方式。
|
14天前
|
JSON JavaScript API
(API接口系列)商品详情数据封装接口json数据格式分析
在成长的路上,我们都是同行者。这篇关于商品详情API接口的文章,希望能帮助到您。期待与您继续分享更多API接口的知识,请记得关注Anzexi58哦!
|
1月前
|
安全 API 开发者
Web 开发新风尚!Python RESTful API 设计与实现,让你的接口更懂开发者心!
在当前的Web开发中,Python因能构建高效简洁的RESTful API而备受青睐,大大提升了开发效率和用户体验。本文将介绍RESTful API的基本原则及其在Python中的实现方法。以Flask为例,演示了如何通过不同的HTTP方法(如GET、POST、PUT、DELETE)来创建、读取、更新和删除用户信息。此示例还包括了基本的路由设置及操作,为开发者提供了清晰的API交互指南。
95 6