ArcGIS Runtime—点击查询【一】

ArcGIS Runtime中点击查询与ArcGIS silverlight API中点击查询十分相似,主要使用下面的两个接口即可轻松实现。

 

IdentifyTask

 

IdentifyParameters

 

 

 

界面设计XAML代码如下:

 

<Window x:Class=”ArcGISWPFMapAppRuntime.MainWindow

 

     xmlns=”http://schemas.microsoft.com/winfx/2006/xaml/presentation

 

       xmlns:x=”http://schemas.microsoft.com/winfx/2006/xaml

 

       xmlns:esri=”http://schemas.esri.com/arcgis/client/2009

 

       Title=”ArcGIS Runtime Demo-点击查询 Height=”350 Width=”525″>

 

    <Grid x:Name=”LayoutRoot”>

 

       <esri:Map x:Name=”MyMapBackground=”White MouseClick=”MyMap_MouseClick” >

 

           <esri:LocalArcGISDynamicMapServiceLayer ID=”lyr1

 

                          Path=”data/USCitiesStates.mpk”/>

 

           <esri:GraphicsLayer ID=”MousePointGraphicsLayer”/>

 

           <esri:GraphicsLayer ID=”ResultsGraphicsLayer”>

 

                <esri:GraphicsLayer.MapTip>

 

                    <Border BorderBrush=”DarkGray CornerRadius=”13 BorderThickness=”1 Margin=”0,0,15,15″>

 

                        <Border CornerRadius=”1 Background=”BeigeBorderThickness=”3 BorderBrush=”DarkCyan”>

 

                            <StackPanel Orientation=”HorizontalHorizontalAlignment=”Center Margin=”10″>

 

                                <TextBlock Text=”{Binding Path=[maptip]}HorizontalAlignment=”Left VerticalAlignment=”Center” />

 

                            </StackPanel>

 

                        </Border>

 

                    </Border>

 

                </esri:GraphicsLayer.MapTip>

 

           </esri:GraphicsLayer>

 

       </esri:Map>

 

       <Canvas Height=”64 HorizontalAlignment=”Left Margin=”12,12,0,0 Name=”canvas1 VerticalAlignment=”Top Width=”415″ >

 

           <Button Content=点击查询 Name=”button1 Click=”button1_Click Canvas.Left=”6 Canvas.Top=”6 Height=”24 Width=”66″ />

 

           <Button Content=漫游地图 Canvas.Left=”6 Canvas.Top=”35 Height=”23 Name=”button2 Width=”67 Click=”button2_Click” />

 

           <Label Content=选中目标所在图层: Canvas.Left=”78 Canvas.Top=”7 Height=”31 Name=”label1 Width=”314″/>

 

       </Canvas>

 

       <Grid.Resources>

 

           <esri:SimpleMarkerSymbol x:Key=”PointSym Style=”Circle Size=”12 Color=”BlueViolet” />

 

           <esri:SimpleLineSymbol x:Key=”LineSym Style=”Dash Width=”5 Color=”Green”/>

 

           <esri:SimpleFillSymbol x:Key=”PolySymBorderBrush=”Red BorderThickness=”2 Fill=”LightBlue”/>

 

       </Grid.Resources>

 

    </Grid>

 

</Window>

 

 

 

 

 

未完,请见ArcGIS Runtime—点击查询【二】

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值