|
POST
|
In in-panel custom widget onOpen() function, if some critical config aram is empty, I output alert, then I want to close the widget (as if someone clicked the "x" button, or as I have not clicked to open it at all). I wrote: PanelManager.getInstance().closePanel(this.id + '_panel'); but it failed, maybe because I'm "inside" onOpen() ? My questions: 1. How to nicely close in-panel custom widget programatically from within onOpen()? 2. My first lines of onPen() are: if (!this.isOpening) { this.isOpening = true; Do I have to reset this.isOpening to false before I close the widget? 3. The code in WidgetManager.js id: if (widget.state === 'closed') { html.setStyle(widget.domNode, 'display', ''); widget.setState('opened'); try { widget.onOpen(); } catch (err) { console.error('fail to open widget ' + widget.name + '. ' + err.stack); } } Should I exit onOpen() with exception and put the alert inside the Widgetmanager? 4. I wish that the widget will really cose (the icon will go back downwards. 5. I wish that I'll get the alert every time I click on the widget (not only in the first time). Help will be greatly appreciated, Michael
... View more
08-09-2020
09:26 AM
|
0
|
4
|
1656
|
|
POST
|
Dear Majdoleen Awadallah, Please see also my answer to Carlos there.
... View more
08-08-2020
11:44 PM
|
3
|
0
|
6378
|
|
POST
|
Dear Carlos, Thank you! I'm in midst of doing it by another way - using fme cloud server (and workspace buit in fme workbench). I'll update you when I've come to conclusions. Michael
... View more
08-08-2020
11:42 PM
|
6
|
9
|
3894
|
|
POST
|
I need to develop a custom widget to import 2D or 3D KML or shapefile(s) or gdb into the 3D Scene. I'm still a newbie, and in great need of instructions where to look and/or code examples. Help will be appreciated. Michael
... View more
07-30-2020
10:47 PM
|
0
|
2
|
1197
|
|
POST
|
I need to develop a custom widget for Web AppBuilder (developer edition) 2.16 in order to display a DWG file (2d or 3d) in 3D scene. The DWG will always be in ITM coordinates (Israel TM grid, that is EPSG:2039) even if not specified. The DWG contains Lines, Polygons and Points. Most of the time the other layers except lines will be empty. What choice is more preferred/applicable - 1. Convert to 3 shape files (for lines, polygons and points) and display them? 2. Convert to KML and display it (is there a way to display 2d/3d KML?)? 3. Display the DWG directly (is a way to do it?) ? I assume the only applicable way is 1, but I want to know more in order to be sure - - Is conversion from DWG needed at all? - Converting to KML is easy, but maybe KML 2D/3D could not be added to 3D scene? - Or maybe there are more suitable ways to go by? Help will be greatly appreciated. Michael
... View more
07-29-2020
06:03 AM
|
4
|
11
|
5549
|
|
POST
|
I am relatively new to ArcGIS Web AppBuilder (Developer Edition) 2.16 in last 2 months I've written several custom widgets, yet there are 3 areas I feel I have not enough knowledge: 1. When do I need to do this.own and what are the parameters I learned that this.own is used to prevent memory leak, but I don't know when it is needed and when it is not needed, and the meaning of its parameters. 2. When do I need to use dijit/_WidgetsInTemplateMixin and what is the usage function of postMixInProperties: function() {...} I learned that postMixInProperties is called very early, but I don't know exactly why it is needed at all, and if there are cases where dijit/_WidgetsInTemplateMixin is needed but postMixInProperties function is not needed. 3. I'd like to get a little comprehensive explanation about what issues should be handled in each of the functions: postCreate, startup, and onOpen, since when I write new custom widgets, sometimes I am not sure what type of tasks to put in each, e.g. where to put this.sceneView.when(){...} and similar things that refer viewModels, graphics etc.. Help will be greatly appreciated. Michael
... View more
07-16-2020
01:33 PM
|
1
|
1
|
1904
|
|
POST
|
Dear Robert, Thank you! As usual, your help is very effective and helpful - I succeeded to open LayerList widget from within my slice custom widget by learning from WAB example stemapp/widgets/samplewidgets/WidgetCommunication - THANK YOU! note: In order to have LayerList widget work under API 4.16 I had to remove 'dojo/i18n!esri/nls/common' from define and apiNlsBundle from function arguments. It works. I see t's not needed in 4.16, though I'd like to know what it is? and why it's not needed anymore in 4.16 ? Michael
... View more
07-14-2020
08:55 PM
|
0
|
0
|
2551
|
|
POST
|
Dear Robert, I'm debugging my slice custom widget and it works, however I have questions concerning the UI code needed for displaying the LayersList: In esri example BuildingSceneLayer with Slice widget | ArcGIS API for JavaScript 4.16 There is the paragraph to display the layers list at top-left // Add a layer list widget const layerList = new LayerList({ view: view }); view.ui.empty("top-left"); view.ui.add(layerList, "top-left"); Since the slice widget popup itself is displayed at top-left, I want to display the layers list at bottom-right, so I write (in the widget.js) this.sceneView.ui.empty("bottom-right"); this.sceneView.ui.add(this.layerList, "bottom-right"); but the whole this.sceneView.ui is hidden since class esri-ui-corner-container is hidden which is the father of the 4 corners. and top-left corner is not empty. My questions: 1. How should I handle correctly the display of the layers list? Below are the 4 lines I did, but maybe there is a cleaner and nicer way?: this.sceneView.ui.empty("bottom-right"); this.sceneView.ui.add(this.layerList, "bottom-right"); document.getElementsByClassName("esri-ui-corner-container")[0].style.display = "block"; document.getElementsByClassName("esri-ui-top-left")[0].style.display = "none"; And I don't know yet why top-left of esri-ui-corner-container is not empty already but has some widgets in it? 2. Could I (how?) display the layerslist in a popup that the user can drag upon the screen (or even minimize and maximize?) I'll appreciate your help
... View more
07-14-2020
08:04 AM
|
0
|
1
|
2551
|
|
POST
|
Dear Robert, Thank you! I've succeeded to activate my in-panel custom widget (which is based on API 4.16) by learning from your zip of screenshot and from more widgets, and to to solve most my bugs, and I'm continuing debugging. Michael
... View more
07-14-2020
12:22 AM
|
0
|
0
|
2551
|
|
POST
|
Shay, I've succeeded to solve most my bugs... I'm continuing debugging. Thank you! Michael
... View more
07-14-2020
12:19 AM
|
1
|
0
|
1917
|
|
POST
|
Dear thejus kambi, I'm facing same problem. I added some custom widget in the widgets-panel and have the same error. Perhaps because my widget use API 4.16, maybe not all needed classes are loaded in time?? You wrote "To fix it, I included the measurement widget in the require present in the html page. this ensured that the required js are retrieved before it loads my custom widget.". Please explain since I don't understand what to do - which is this html page and what exactly to write there. Thanks, Michael
... View more
07-13-2020
11:03 PM
|
0
|
0
|
2554
|
|
POST
|
When I enter esri demo link for IntegratedMeshLayer modification - IntegratedMeshLayer modification | ArcGIS API for JavaScript 4.16 I get in the console multiple identical errors: dojo.js:115 [esri.views.3d.layers.SceneLayerView3D] Failed to store node in IndexedDB cache: 2755: QuotaExceededError g._consoleWriter @ dojo.js:115 all errors are identical, except number of cache is different between errros. 1. What is the cause for the error? 2. I want to build WAB custom widget for this capability. Can I ignore the error? 3. What could be done so that the error will not appear? 4. Is it esri issue or that the error depends on my setups? Attached: screenshot Help will be greatly appreciated.
... View more
07-13-2020
09:12 AM
|
0
|
2
|
1834
|
|
POST
|
Thanks, Shay! To answer your curiosity - I changed 3 lines above your line - I canged: var apiVersion = '4.15'; to 4.16 but it was not enough. After seeing your doc link, I changed both apiVersion to 4.16 and also apiUrl within the comment. I saw that if I download the app from within WAB, the apiUrl is uncommented within the zip, And I saw also that if I click the launch button of the app from within the WAB, it also uses the 4.16 API, due to apiVersion var. So, indeed I solved the problem how to run on 4.16 My problem now is an error in my slice widget, but I don't know how to debug and find it. screenshot attached Could I attach zip of my in-panel widget code? Michael
... View more
07-13-2020
01:12 AM
|
0
|
1
|
1917
|
|
POST
|
I need to do custom widgets for 1.Slice tool - which in API 4.16 has new SlicePlane class 2. IntegratedMeshLayer modification - which is totally new in API 4.16 I understand that Web AppBuilder (developer edition) 2.16 is regularly using API 4.15 I don't know how I can "connect" it to API version 4.16, and iif it won't cause errors (Indeed I tried changing 4.15 to 4.16 in some place, but got errors). My questions: A. What can I do in order to "connect" to API 4.16 without errors, or at least use some 4.16 classes in current last version (2.16) of Web AppBuilder (developer edition)? B. When will be the next version of Web AppBuilder (developer edition) - hopefully with API 4.16? C. Is Experience Builder working already with API 4.16? If not yet, then when? D. Is it easy or difficult to migrate my custom widgets to Experience Builder? E. Actually, what are the needed steps to migrate and migrate my existing custom widgets? F. Is it "worth the effort and time" to migrate? since the current application does not really need the extra features of Experience Builder (it runs on PC, and uses single screen app)? I will appreciate help.
... View more
07-12-2020
12:54 PM
|
0
|
4
|
2072
|
|
POST
|
I need to adapt slice tool widget BuildingSceneLayer with Slice widget | ArcGIS API for JavaScript 4.16 in order to have slice tool custom widget within ArcGIS Web AppBuilder (Developer Edition) 2.16 However, thogh the excample app works, yet when I look at the console, the above link displays some error message. Screenshot attached.
... View more
07-12-2020
12:40 AM
|
0
|
5
|
2717
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 12-15-2024 12:09 AM | |
| 1 | 08-01-2024 03:45 AM | |
| 1 | 01-04-2024 04:00 AM | |
| 1 | 03-28-2024 01:25 AM | |
| 1 | 03-25-2024 01:11 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-01-2025
04:28 AM
|