一、以下四种方式均可以
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. C/C++数组名与指针区别深入探索(转载)

    转载自: C/C++数组名与指针区别深入探索 引言 指针是C/C++语言的特色,而数组名与指针有太多的相似,甚至很多时候,数组名可以作为指针使用.于是乎,很多程序设计者就被搞糊涂了.而许多的大学老师, ...

  2. tomcat 启动自动加载外部项目

    conf/server.xml 配置 <!--<Context path="/upload" docBase="E://upload" />- ...

  3. mysql data_add data_sub

    DATE_SUB() 函数从日期减去指定的时间间隔. 语法 DATE_SUB(date,INTERVAL expr type) date 参数是合法的日期表达式.expr 参数是您希望添加的时间间隔. ...

  4. 判断Service是否在运行

    private boolean isServiceRunning() { ActivityManager manager = (ActivityManager) getSystemService(AC ...

  5. JavaScript(js)文件路径字符串中丢失"\"斜线的解决方法

    在刚刚的开发过程中,遇到一个JavaScript 文件路径字符串中丢失"\"的问题,解决过程如下: 背景:cs文件中获取一段包含有路径信息的字符串,将此字符串做为参数传递给前台as ...

  6. Unity3D中的序列化测试

    Unity3D中序列化字段常使用[SerializeField],序列化类常采用[System.Serializable],非序列化采用[System.NonSerialized]. 序列化类使用时发 ...

  7. PHP 之超级全局变量

    参考菜鸟教程,并经过自己亲手实验,记录PHP的几个超级全局变量 所谓超级全局变量 ,你可以理解为在一个脚本里面的全部代码里面都可以使用的变量. $GLOBALS $GLOBALS 是 php 的一个超 ...

  8. am335x PDK3.0 设置为单网口配置记录

    原来的配置是双网口的,现在要配置为单网口. 一直以为这个配置是在 make menuconfig 里面, 没想到是在设备树里面. 修改设备树 // vim arch/arm/boot/dts/am33 ...

  9. LUA中获得服务器IP

    local t = {} -- 引入相关包local socket = require("socket") function t.main() local a,b=pcall(t. ...

  10. 在使用R做数据挖掘时,最常用的数据结构莫过于dataframe了,下面列出几种常见的dataframe的操作方法

    原网址 http://blog.sina.com.cn/s/blog_6bb07f83010152z0.html 在使用R做数据挖掘时,最常用的数据结构莫过于dataframe了,下面列出几种常见的d ...