一、以下四种方式均可以
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. LeetCode: Longest Valid Parentheses 解题报告

    Longest Valid Parentheses Given a string containing just the characters '(' and ')', find the length ...

  2. win8 X64 未在本地计算机上注册“Microsoft.ACE.OLEDB.12.0”提供程序

    操作系统是Windows 8 64位,安装了Microsoft Office 2013,从SQL Server 2008中导入Excel文件时出现提示: 未在本地计算机上注册“Microsoft.AC ...

  3. java web hello world(一)

    首先在eclipse 里面创建一个java 动态项目, 记住路径,这里是直接通过根目录直接访问的webContent目录下面 的文件, 创建好后 ,在本地配置Tomcat服务器, 将server加入到 ...

  4. Windows C++ 非递归式(stack)深度优先遍历目录

    #include <Windows.h> #include <cstdio> #include <cstring> #include <string> ...

  5. Shell脚本编程入门到放弃

    1 区分大小写 UNIX是区分大小写的,因此shell脚本也是区分大小写的 2 特殊字符 UNIX的某些字符都有特殊的意义或功能,如果它们不以其特殊的意义使用必须要进行转义(escaped). 为了转 ...

  6. 无法识别的属性 configProtectionProvider的解决方案

    用RsaProtectedConfigurationProvider加密数据库连接字符串时,只要App.config有任何改动,都会提示无法识别的属性 configProtectionProvider ...

  7. Java实现的各种排序算法(包括冒泡,快排等)

    //堆排序 不稳定 import java.util.Arrays; public class HeapSort { public static void main(String[] args) { ...

  8. HTML5之IndexedDB使用详解

    随着firefox4正式版的推出,IndexedDB正式进入我们的视线.IndexedDB是HTML5-WebStorage的重要一环,是一种轻量级NOSQL数据库.相较之下,WebDataBase标 ...

  9. 用CSS创建打印页面

    用CSS创建打印页面,不必为打印而专门建立一个HTML文件,可以节省一些体力,其前提是按“WEB标准”用CSS+DIV布局HTML页面. 第一.在HTML页面加入为打印机设置的CSS文件 <li ...

  10. Storm快速理解

    转自:http://blog.csdn.net/colorant/article/details/8256039 更多云计算相关项目快速理解文档  http://blog.csdn.net/color ...