dojo

arcgis_api_js

 ̄綄美尐妖づ 提交于 2020-01-20 04:42:33
 1arcmap和arcatalog将离线地图发布并切片 2将api放到tomcat里启动并修改init 和 dojo 【hostname】相关文件 3在前端代码中调出发布的地图服务相关代码simple的 用于html 目前还没有进行jsp的测试 <!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title>TEST</title> <link rel="stylesheet" type="text/css" href="http://192.168.2.135:8080/MyMapTest/arcgis_js_api/3.9/js/dojo/dijit/themes/tundra/tundra.css" /> <link rel="stylesheet" type="text/css" href="http://192.168.2.135:8080/MyMapTest/arcgis_js_api/3.9/js/esri/css/esri.css" /> <script type="text/javascript" src="http://192.168.2.135:8080//MyMapTest/arcgis_js_api/3.9

How to copy a DOM node with event listeners?

自作多情 提交于 2020-01-18 16:01:48
问题 I tried node.cloneNode(true); // deep copy It doesn't seem to copy the event listeners that I added using node.addEventListener("click", someFunc); . We use the Dojo library. 回答1: cloneNode() does not copy event listeners. In fact, there's no way of getting hold of event listeners via the DOM once they've been attached, so your options are: Add all the event listeners manually to your cloned node Refactor your code to use event delegation so that all event handlers are attached to a node that

How to copy a DOM node with event listeners?

烂漫一生 提交于 2020-01-18 16:01:47
问题 I tried node.cloneNode(true); // deep copy It doesn't seem to copy the event listeners that I added using node.addEventListener("click", someFunc); . We use the Dojo library. 回答1: cloneNode() does not copy event listeners. In fact, there's no way of getting hold of event listeners via the DOM once they've been attached, so your options are: Add all the event listeners manually to your cloned node Refactor your code to use event delegation so that all event handlers are attached to a node that

How to copy a DOM node with event listeners?

喜你入骨 提交于 2020-01-18 16:00:02
问题 I tried node.cloneNode(true); // deep copy It doesn't seem to copy the event listeners that I added using node.addEventListener("click", someFunc); . We use the Dojo library. 回答1: cloneNode() does not copy event listeners. In fact, there's no way of getting hold of event listeners via the DOM once they've been attached, so your options are: Add all the event listeners manually to your cloned node Refactor your code to use event delegation so that all event handlers are attached to a node that

How can I return the value of a deferred method in javascript

◇◆丶佛笑我妖孽 提交于 2020-01-17 05:09:08
问题 I am trying to write a module which projects coordinates into a new Spatial Reference, but the javascript syntax has beaten me once again. This is how the module currently looks like: define(["esri/geometry/Point", ...], function(Point, SpatialReference, ...){ var gmsvc = new GeometryService("http://server/maps/rest/services/Utilities/Geometry/GeometryServer"); /*...*/ return { /*...*/ //transforms the current point on the map to the new wkid transformCoordinates: function(point, newWkId) {

dojo: Show or hide divs based on selection in a list

故事扮演 提交于 2020-01-17 03:16:05
问题 Is there a simple way to accomplish this using dojo (jQuery would be easier for me but I have to use dojo): I have a simple unordered list. I don't want dojo to style the list (as it might if I used some widget). When I click a link on the list I want to show a div associated with the link. Then if I click another link in the list the first div hides and that one shows. <div id="content"> <h2>Header</h2> <ul> <li><a href="#sub_content1">Link 1</a></li> <li><a href="#sub_content2">Link 2</a><

Dojo Name Picker - People by last name and groups

核能气质少年 提交于 2020-01-16 19:18:14
问题 I'm using a name picker in my XPages to allow an easy selection of people and groups. Here's my code: <xe:namePicker id="namePicker1" for="Receiver"> <xe:this.dataProvider> <xe:dominoNABNamePicker groups="true" nameList="peopleAndGroups" people="true"></xe:dominoNABNamePicker> </xe:this.dataProvider> <xe:this.rendered><![CDATA[#{javascript:docApplication.getItemValueString("ZwfStepNumber") == 1}]]></xe:this.rendered></xe:namePicker> If I use "peopleAndGroups" as nameList property, all names

Dojo Name Picker - People by last name and groups

二次信任 提交于 2020-01-16 19:17:52
问题 I'm using a name picker in my XPages to allow an easy selection of people and groups. Here's my code: <xe:namePicker id="namePicker1" for="Receiver"> <xe:this.dataProvider> <xe:dominoNABNamePicker groups="true" nameList="peopleAndGroups" people="true"></xe:dominoNABNamePicker> </xe:this.dataProvider> <xe:this.rendered><![CDATA[#{javascript:docApplication.getItemValueString("ZwfStepNumber") == 1}]]></xe:this.rendered></xe:namePicker> If I use "peopleAndGroups" as nameList property, all names

Dojo dijit.layout.TabContainer - how to add class to tab?

给你一囗甜甜゛ 提交于 2020-01-15 09:33:07
问题 Ho to add class to the tab in TabContainer? Only thing I've found is set iconClass. However I need to add class to the parent div in tab. Not to some nested divs inside it. 回答1: Not a simple way, but I got access to the tab button in the tabcontainer object. var tabContainer = ...; dojo.addClass(tabContainer.tablist.pane2button["123"].domNode, "myTabClass"); http://jsfiddle.net/cswing/N2hsG/ 回答2: Building on Craig's suggestion, here's the modern way of doing it: // assuming there is only one

dojo select set maximum width

风流意气都作罢 提交于 2020-01-15 03:51:15
问题 i have a problem with the width of my dojo select. The option of the select widget are filled by an ajax call. A few of the labels are very long and the width of the select widget grows with the large of the label. Is there a way to set the maximum width of the select widget? So that the width don't grow over 180px? PS: I implement the widget by programmatically way like new Select({ name: "select2" }).placeAt(win.body()) Edit: Here for example http://jsfiddle.net/5r3gR/3/ when i select the