一、以下四种方式均可以
importantProvinceLayer.on("click", DoIdentify);
dojo.connect(importantProvinceLayer, "onClick", DoIdentify);
on(importantProvinceLayer, "click", DoIdentify);
connect.connect(importantProvinceLayer, "onClick", DoIdentify);
 
二、引入的包
require(["dojo/dom", "dojo/dom-construct",
"esri/map", "esri/layers/FeatureLayer",
"esri/symbols/SimpleFillSymbol", "esri/symbols/SimpleLineSymbol",
"esri/renderers/SimpleRenderer", "esri/graphic", "esri/lang", "myModules/InfoWindow", "esri/InfoTemplate",
"esri/Color", "dojo/number", "dojo/dom-style",
"esri/layers/ImageParameters",
"esri/dijit/Bookmarks", "esri/tasks/GeometryService", "esri/tasks/LengthsParameters", "esri/tasks/AreasAndLengthsParameters",
"esri/dijit/HomeButton",
"esri/layers/FeatureLayer", "esri/layers/GraphicsLayer", "esri/InfoTemplate", "esri/Graphic",
"esri/symbols/SimpleFillSymbol", "esri/symbols/SimpleLineSymbol", "esri/symbols/SimpleMarkerSymbol", "esri/symbols/SimpleLineSymbol",
"esri/renderers/SimpleRenderer", "esri/graphic", "esri/lang",
"esri/Color", "esri/tasks/Query", "esri/tasks/QueryTask", "esri/SpatialReference",
"esri/geometry/Point", "esri/geometry/Polyline", "esri/geometry/Polygon",
"esri/dijit/Scalebar",
"esri/tasks/FindTask",
"esri/tasks/FindParameters",
"esri/tasks/Identify",
"esri/tasks/IdentifyTask",
"esri/tasks/IdentifyParameters",
"dojo/number",
"dijit/layout/BorderContainer", "dijit/layout/ContentPane", "dijit/TitlePane",
"dijit/TooltipDialog",
"esri/dijit/OverviewMap",
"esri/dijit/BasemapToggle", "esri/basemaps",
"dojo/parser",
"esri/dijit/BasemapGallery", "esri/arcgis/utils",
"esri/dijit/Popup", "esri/dijit/PopupTemplate",
"dojo/_base/connect", "dijit/registry",
"esri/toolbars/draw",
"esri/toolbars/navigation",
"dojo/dom", "dojo/dom-style", "dojo/on",
"dijit/TooltipDialog", "dijit/popup", "dojo/domReady!"
], function (dom, domConstruct,
Map, FeatureLayer,
SimpleFillSymbol, SimpleLineSymbol,
SimpleRenderer, Graphic, esriLang, InfoWindow, InfoTemplate,
Color, number, domStyle,
ImageParameters,
Bookmarks,
GeometryService,
LengthsParameters,
AreasAndLengthsParameters,
HomeButton,
FeatureLayer,
GraphicsLayer,
InfoTemplate,
Graphic,
SimpleFillSymbol,
SimpleLineSymbol,
SimpleMarkerSymbol,
SimpleLineSymbol,
SimpleRenderer,
Graphic,
esriLang,
Color,
Query,
QueryTask,
SpatialReference,
Point,
Polyline,
Polygon,
Scalebar,
FindTask,
FindParameters,
Identify,
IdentifyTask,
IdentifyParameters,
number,
BorderContainer,
ContentPane,
TitlePane,
TooltipDialog,
OverviewMap,
BasemapToggle,
esriBasemaps, parser, BasemapGallery, arcgisUtils, Popup, PopupTemplate, connect, registry, Draw, Navigation, dom, domStyle, on,
TooltipDialog, dijitPopup
) {
 
//todo
 
});

GIS-ArcGIS JS API FeatureLayer图层绑定事件的几种方式的更多相关文章

  1. JS与JQ绑定事件的几种方式.

    JS与JQ绑定事件的几种方式 JS绑定事件的三种方式 直接在DOM中进行绑定 <button onclick="alert('success')" type="bu ...

  2. 为input标签绑定事件的几种方式

    为input标签绑定事件的几种方式 1.JavaScript原生态的方式,直接复制下面的代码就会有相应的效果 <!DOCTYPE html><html><head> ...

  3. Android_安卓为按钮控件绑定事件的五种方式

    一.写在最前面 本次,来介绍一下安卓中为控件--Button绑定事件的五种方式. 二.具体的实现 第一种:直接绑定在Button控件上: 步骤1.在Button控件上设置android:onClick ...

  4. jQuery绑定事件的四种方式:bind、live、delegate、on

    1.jQuery操作DOM元素的绑定事件的四种方式 jQuery中提供了四种事件监听方式,分别是bind.live.delegate.on,对应的解除监听的函数分别是unbind.die.undele ...

  5. jq绑定事件的4种方式

    jQuery提供了多种绑定事件的方式,每种方式各有其特点,明白了它们之间的异同点,有助于我们在写代码的时候进行正确的选择,从而写出优雅而容易维护的代码.下面我们来看下jQuery中绑定事件的方式都有哪 ...

  6. jQuery绑定事件的四种方式

      jQuery提供了多种绑定事件的方式,每种方式各有其特点,明白了它们之间的异同点,有助于我们在写代码的时候进行正确的选择,从而写出优雅而容易维护的代码.下面我们来看下jQuery中绑定事件的方式都 ...

  7. jQuery绑定事件的四种方式区别

    jQuery中提供了四种事件监听方式,分别是bind.live.delegate.on,对应的解除监听的函数分别是unbind.die.undelegate.off.在开始看他们之前 一:bind(t ...

  8. Javascript绑定事件的两种方式的区别

    命名函数 <input type="button" onclick="check()" id="btn"/> <scrip ...

  9. jQuery绑定事件的四種方式

    这篇文章主要介绍的是jQuery绑定事件的四种方式相关内容,下面我们就与大家一起分享. jQuery绑定事件的四种方式 jQuery提供了多种绑定事件的方式,每种方式各有其特点,明白了它们之间的异同点 ...

随机推荐

  1. css 图标 旋转中

    .person-loading .loading-icon{position: absolute;top: 14px;} i.loading-icon{width: 15px;height: 15px ...

  2. RTX——第11章 临界段,任务锁和中断锁

    以下内容转载自安富莱电子: http://forum.armfly.com/forum.php 临界段代码的临界段也称为临界区,一旦这部分代码开始执行,则不允许任何中断打断.为确保临界段代码的执行不被 ...

  3. mysql海量数据处理步骤

    本文转自https://segmentfault.com/a/1190000006158186 当MySQL单表记录数过大时,增删改查性能都会急剧下降,可以参考以下步骤来优化: 单表优化 除非单表数据 ...

  4. C语言 · 寂寞的数

    算法训练 寂寞的数   时间限制:1.0s   内存限制:256.0MB      问题描述 道德经曰:一生二,二生三,三生万物. 对于任意正整数n,我们定义d(n)的值为为n加上组成n的各个数字的和 ...

  5. Android——滚动视图(ScrollView)图片视图(ImageView)、状态开关按钮(ToggleButton)、时钟

    xml <?xml version="1.0" encoding="utf-8"?> <!--滚动视图--> <ScrollVie ...

  6. mkyaffs2image编译

    http://blog.chinaunix.net/uid-26009923-id-3760474.htmlhttp://blog.csdn.net/xingtian19880101/article/ ...

  7. iOS基础--UIView的常见属性

    UIView的常见属性以及方法 @property(nonatomic,readonly) UIView *superview; // 获得自己的父控件对象 @property(nonatomic,r ...

  8. style="display:none"隐藏html的标签

    隐藏html的标签 <div class="span11 alignment"> <h1>我的虚拟网络</h1> </div> &l ...

  9. PHP7新特性的介绍

    关于PHP 20年的发展历史: 迄今为止最流行的WEB开发语言: 超过82%的网站都会使用PHP作为他们的服务端开发语言: 新特性介绍 PHP NG – Zend Engine 3 抽象语法树 64位 ...

  10. HTTP API 设计指南(结尾)

    前言 这篇指南介绍描述了 HTTP+JSON API 的一种设计模式,最初摘录整理自 Heroku 平台的 API 设计指引 Heroku 平台 API 指引. 这篇指南除了详细介绍现有的 API 外 ...