zoukankan      html  css  js  c++  java
  • 使用ArcGIS Engine来实现地图的点击查询并闪烁 (C#)未完成

    ArcGIS Engine没有提供在MapControl中点击查询的命令,只是提供了ReaderControl中的使用的点击查询的命令,下面的代码就是实现点击查询并闪烁的代码。
    过程描述
    Private Sub MapControl1_OnMouseDown(ByVal button As Long, ByVal shift As Long, ByVal x As Long, ByVal y As Long, ByVal mapX As Double, ByVal mapY As Double)
    Dim pMap As IMap

    Dim i As Integer
    Dim pPoint As IPoint
    Set pMap = MapControl1.Map
    Set pPoint = MapControl1.ActiveView.ScreenDisplay.DisplayTransformation.ToMapPoint(x, y)

    Dim pIdentify As IIdentify

    Dim pIDArray As IArray
    Dim pFeatIdObj As IFeatureIdentifyObj
    Dim pIdObj As IIdentifyObj
    Set pIdentify = pMap.Layer(1)

    Dim pEnv As IEnvelope
    Set pEnv = New Envelope
    Set pEnv = MapControl1.ActiveView.Extent
    pEnv.Height = 100
    pEnv.Width = 100
    pEnv.CenterAt pPoint

    Set pIDArray = pIdentify.Identify(pEnv)

    If Not pIDArray Is Nothing Then
    Set pFeatIdObj = pIDArray.Element(0)
    Set pIdObj = pFeatIdObj
    pIdObj.Flash MapControl1.ActiveView.ScreenDisplay
    '消息显示查询目标的信息
    MsgBox "Layer:" & pIdObj.Layer.Name & vbNewLine & "Feature:" & pIdObj.Name
    Else
    MsgBox "No feature identified."
    End If
    End Sub

  • 相关阅读:
    sqlsever2008及以上各个安装包的说明
    解决 windows2012 下无法安装 sql2008R2
    dapper extensions (predicates)
    Dapper full example
    Dapper.ColumnMapper 的使用
    wms
    大端格式 与 小端格式
    mysql数据库引擎
    事务
    MySQL索引底层实现
  • 原文地址:https://www.cnblogs.com/hl3292/p/1965570.html
Copyright © 2011-2022 走看看