`
sherrysky
  • 浏览: 87301 次
  • 性别: Icon_minigender_2
  • 来自: 北京
社区版块
存档分类
最新评论

Task--Identity task

阅读更多
IdentifyTask
是一个可以识别要素的任务.

我们设想的功能大概是这样的:先在地图上画一个多边形,然后识别多边形内的所有要素,最后在图上标注出来。让我们看一下这个功能在Flex中是如何通过Task执行完成的:
首先是绘图,我首先需要在地图上画一个多边形,在ArcGIS API for Flex中有一个提供绘图的工具条com.esri.ags.toolbars.Draw,通过它我们可以很轻松地实现绘图功能:
如上所示,IdentifySample在Draw对象上添加一个事件监听器,当绘图完成时,执行drawEndHandler()方法,在这个方法中,我们将继续绘图以后的工作。
在已经绘制了一个多边形以后,我们就需要执行IdentifyTask来进行要素识别了。先看一下代码:
private function drawEndHandler(event:DrawEvent):void
{
var geometry : Geometry = event.geometry;
var identifyParams : IdentifyParameters = new IdentifyParameters();
identifyParams.returnGeometry = true;
identifyParams.tolerance = 3;
identifyParams.width = 600;
identifyParams.height = 550;
identifyParams.geometry = geometry;
switch (layerOption.value)
{
case "top":
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_TOP;
break;
case "visible":
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_VISIBLE;
break;
case "all":
identifyParams.layerOption = IdentifyParameters.LAYER_OPTION_ALL;
break;
}
identifyParams.mapExtent = map.extent;
identifyTask.execute( identifyParams );
}
在 DrawEvent对象中,我们可以获取刚才绘图的Geometry对象,这个Geometry对象用于Identify的参数设置中,如果你做过 ArcEngine开发,你可以对比一下SpatialFilter。好,再设置了一下需要搜索的图层和范围以后,你就可以执行这个 IdentifyTask了,看到execute是不是很兴奋?
然后呢?我们回头看看这个IdentifyTask的定义,其中注册了当Task完成时候执行的方法:identifyCompleteHandler()。
private function identifyCompleteHandler(event:IdentifyEvent):void
{
for each (var result:IdentifyResult in event.identifyResults)
{
myGraphicsLayer.add(result.feature);
}
}
这个方法就是在GraphicLayer上把这个Task的结果画出来。
分享到:
评论

相关推荐

    Secure Task Allocation Based on Anonymous Identity in Mobile Crowdsourcing

    移动众包中基于假名的任务安全分发机制,贺玥,黄勤龙,移动众包作为一种新技术日益受到关注,它通过组织一组拥有移动设备的任务执行者,共同完成任务发布者的任务。但是,由于移动众包处于

    Activiti数据表结构

    * ACT_RU_TASK:运行时任务 * ACT_RU_VARIABLE:运行时变量表 每个表中都有多个字段,用于存储不同的数据。例如,ACT_GE_BYTEARRAY表中有ID、REV、NAME、DEPLOYMENT_ID、BYTES、GENERATED等字段,用于存储流程定义...

    ICCV2013-Hybrid Deep Learning for Face Verification

    which indicate identity similarities, from raw pixels of face pairs with a hybrid deep network. The deep ConvNets in our model mimic the primary visual cortex to jointly extract local relational ...

    bloomer:用Go语言编写的类似于pssh的工具

    盛开 ``` bloom bloom is a command-line tool for executing tasks on groups of servers. ... -i --identity IDENTITY Path to identity file. -h --help Show this screen. --version Show version. ```

    SIP - Understanding the Session Initiation Protocol, 2nd Ed - 1459

    1.2 The Internet Engineering Task Force 2 1.3 A Brief History of SIP 3 1.4 Internet Multimedia Protocol Stack 4 1.4.1 Physical Layer 4 1.4.2 Internet Layer 4 1.4.3 Transport Layer 5 1.4.4 Application ...

    disco GAN论文

    the task of discovering cross-domain relations given unpaired data. We propose a method based on generative adversarial networks that learns to discover relations between different domains (DiscoGAN)....

    Pro Oracle Fusion Applications(Apress,2015)

    Provisioning an Oracle Fusion Applications infrastructure is a daunting task. You'll have to plan a suitable topology and install the required database, an enterprise-wide identity management solution...

    i-vector的工具箱

    MSR Identity Toolbox: A Matlab Toolbox for Speaker Recognition Research Version 1.0 Seyed Omid Sadjadi, Malcolm Slaney, and Larry Heck Microsoft Research, Conversational Systems Research Center (CSRC...

    boot-cljs-test:启动任务以运行ClojureScript测试

    开机cljs测试 引导任务,使ClojureScript测试变得快速,轻松并且与测试Clojure一致。 [crisptrutski/boot-cljs-test " 0.3.5-... :source-paths #{"test"}) identity) 运行boot testing test-cljs ;; Testing you

    ActivitiDemo_LFP_HelloWorld实现

    做一个最简单的HellWorld流程用代码的方式...act_hi_identitylink 历史流程实例参数者的表加了一条数据; act_hi_actinst 历史活动节点表加了三条流程活动节点信息的数据(每个流程实例具体的执行活动节点的信息);

    Activiti6.0教程例子下载

    5. IdentityService: Activiti中内置了用户以及组管理的功能,必须使用这些用户和组的信息才能获取到相应的Task。IdentityService提供了对Activiti 系统中的用户和组的管理功能。 6. ManagementService: Management...

    JBPM帮助文档供大家学习

    org.jbpm.api.identity User and Group interfaces related to the IdentityService org.jbpm.api.job Job, Message and Timer interfaces related to the ManagementService org.jbpm.api.jpdl specific jPDL ...

    动手学深度学习Pytorch版本学习笔记 Task3

    1.过拟合、欠拟合及其解决方案 过拟合:模型无法得到较低的训练误差,我们将这一现象称作欠拟合(underfitting);...为了便于讨论,不考虑偏差参数,且设所有隐藏层的激活函数为恒等映射(identity

    Task03 梯度消失、梯度爆炸、Kaggle房价预测

    为了便于讨论,不考虑偏差参数,且设所有隐藏层的激活函数为恒等映射(identity mapping) ϕ(x)=x 。给定输入 X ,多层感知机的第 l 层的输出 H(l)=XW(1)W(2)…W(l) 。此时,如果层数 l 较大, H(l) 的计算可能会...

    Examining Cloud Computing Technologies Through the IoT-IGI 2018

    In the world of big data, it’s a herculean task to manage inflow, storage and exploration of millions of data files and volume of information coming from multiple systems. The growth of this ...

    Work-related attitudes and job characteristics of expatriates in Saudi Arabia

    This study investigates the influence of job satisfaction, job autonomy, job variety, task identity, feedback, and employee demographics on organizational commitment among self-initiated expatriates ...

    Handbook of Research on Soft Computing and Nature-Inspired Algorithms

    Thistaskisaccomplishedthroughaddressing the design and analysis challenges of some key real-world problems. A detailed definition of the conventionalPSO...

    Activiti工作流数据库表结构

    1.2.1 Activiti数据表清单: 3 1.2.2 表名:ACT_GE_BYTEARRAY (通用的流程定义和流程资源) 3 ...1.2.23 表名:ACT_RU_TASK(运行时任务数据表) 16 1.2.24 表名:ACT_RU_VARIABLE(运行时流程变量数据表) 17

    Activiti5 jbpm 工作流 数据库 表结构.docx

    1 ACTIVITI数据库表结构 2 1.1 数据库表名说明 2 1.2 数据库表结构 3 ...1.2.23 表名:ACT_RU_TASK(运行时任务数据表) 16 1.2.24 表名:ACT_RU_VARIABLE(运行时流程变量数据表) 17 2 ACTIVITI中主要对象的关系 17

    外籍人士在沙特阿拉伯的工作态度和工作特点

    This study investigates the influence of job satisfaction, job autonomy, job variety, task identity, feedback, and employee demographics on organizational commitment among self-initiated expatriates ...

Global site tag (gtag.js) - Google Analytics