POST
|
Got it working for the sub layers. here is the working code for anybody looking to hide a specific layer in a dynamic services if(layerInfoParam.title === "Drinking_Water"){
//WORNG WAY TO ACCESS THE LAYRS THIS WAS MY MISTAKE
//layerInfoParam.hideLayers[1];
//THE RIGHT WAY TO ACCESS THE SUBLAYERS IN DynamicMapService
layerInfoParam.hideLayers=[0,1];
// return layerInfoParam.layer.layerInfos[0];
return layerInfoParam;
} Thanks again Robert for all the hard work.
... View more
11-14-2017
05:13 AM
|
1
|
0
|
2109
|
POST
|
hi Robert is it also possible to hide only a sub-layers in a ArcGISDynaicMapserviceLayer ? It seems the layerInfoParam object returns, {hideLayers: Array[0], layer: Object {...}, title: "Bird_Area"}
but the script to hide the sublayers seems not to work. layerInfoParam.hideLayers[0];
thanks,
... View more
11-14-2017
02:16 AM
|
0
|
1
|
2109
|
POST
|
Are you looking toggling between layers on the layer list widget as in the example?
... View more
11-08-2017
06:24 AM
|
0
|
0
|
411
|
POST
|
Thaks Robert. Yes I got you on the grouping of a dynamic map service part but the code to group feature layers using the FeatureCollection is not grouping my feature layers too. I provided above the code and also how my layers look like in my Layerlist widget. I expected my feature layers to be under two groups namely myGroupLayes and myGroupLayes2 ). I am missing something there?
... View more
10-27-2017
06:13 AM
|
0
|
1
|
426
|
POST
|
I am trying to organize my layers in the layerlistwidget based on categories, like none responsive text in between different category as in this question. My question here is, is there a way to do so without the need to group them in ArcMap? I also experimented the the add feature collection method as in the code below in my layerlistwidget startup function(see the code ) but the groups ("myGroupLayes" and " myGroupLayes2") are not visible in the layerlistwidget, instead all layers are listed in a flat hierarchy (see the graph below). // ***begin*** added code in startup() of LayerList/widget.js
// First group
var featureLayer1 = new esri.layers.FeatureLayer("http://Feature layer URL");
featureLayer1.title = "featureLayer1";
var featureLayer2 = new esri.layers.FeatureLayer("http://Feature layer URL");
featureLayer2.title = "featureLayer2";
var featureLayers = [featureLayer1, featureLayer2];
this.operLayerInfos.addFeatureCollection(featureLayers, "myGroupLayes");
// Second group
var featureLayer3 = new esri.layers.FeatureLayer("http://Feature layer URL");
featureLayer3.title = "featureLayer3";
var featureLayer4 = new esri.layers.FeatureLayer("http://Feature layer URL");
featureLayer4.title = "featureLayer4";
var featureLayersSecond = [featureLayer3, featureLayer4];
this.operLayerInfos.addFeatureCollection(featureLayersSecond, "myGroupLayes2");
// ***end*** added code in startup() of LayerList/widget.js
/** I also tried to group feature layer that are already part of the web map using the solution provided by @Robert Scheitlin, GISP in this thread but with no success. Am I missing something obvious. Also does the add FeatureCollection support dynamic layers too? Or do we have another means to Group dynamic services as in the case of Feature layers? For more information I am using WAB 2.6 and I also tried the code in WAB 2.2.
... View more
10-20-2017
05:15 AM
|
1
|
4
|
803
|
POST
|
Basically I wanted to organize my layers in layerlistwidget in categories, like none responsive text in between different category as in the original question. My question here is, is there a way to do so without the need to group them in ArcMap.
// ***begin*** added code in startup() of LayerList/widget.js
// First group
var featureLayer1 = new esri.layers.FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/NapervilleShelters/FeatureServer/0");
featureLayer1.title = "featureLayer1";
var featureLayer2 = new esri.layers.FeatureLayer("http://sampleserver5.arcgisonline.com/arcgis/rest/services/Energy/Geology/FeatureServer/6");
featureLayer2.title = "featureLayer2";
var featureLayers = [featureLayer1, featureLayer2];
this.operLayerInfos.addFeatureCollection(featureLayers, "myGroupLayes");
// Second group
var featureLayer3 = new esri.layers.FeatureLayer("http://sampleserver6.arcgisonline.com/arcgis/rest/services/NapervilleShelters/FeatureServer/0");
featureLayer3.title = "featureLayer3";
var featureLayer4 = new esri.layers.FeatureLayer("http://sampleserver5.arcgisonline.com/arcgis/rest/services/Energy/Geology/FeatureServer/6");
featureLayer4.title = "featureLayer4";
var featureLayersSecond = [featureLayer3, featureLayer4];
this.operLayerInfos.addFeatureCollection(featureLayersSecond, "myGroupLayes2");
// ***end*** added code in startup() of LayerList/widget.js
/** I also experimented the the feature collection code above in my layerlistwidget startup function(see the code ) but the title of the groups ("myGroupLayes" and " myGroupLayes2") are not visible in the layerlistwidget. Is it supposed to behave as in the graph or I am missing something. does it support dynamic layers too? Thanks in advance
... View more
10-19-2017
04:53 AM
|
1
|
0
|
857
|
POST
|
Thanks again Robert Scheitlin, GISP, Rebecca Strauch, GISP and Brian Collins sorry for not replaying on time, I was out of office. I tried as Brain suggested and it didn't workout for me and I also deployed an app created in WAB 2.2 to see if the isue is only in 2.4, but the issue seems identical. Here is the link to the web site so that you can have a firt hand impression to the Error messages. Thanks again.
... View more
06-19-2017
02:40 AM
|
0
|
1
|
537
|
POST
|
Robert, yes you are right but unfortunately our organisation disabled it.
... View more
06-14-2017
08:19 AM
|
0
|
2
|
1107
|
POST
|
Robert, It would be interesting to try it on IIS server to see if the Tomcat deployment process is the problem. Do you know some free providers.
... View more
06-14-2017
07:18 AM
|
0
|
4
|
1107
|
POST
|
I hope by now you are awake and thanks for the reply. Yes my WAB app files are in the webapps folder. My services are publicly shared in portal and I have ofcourse an esri base map. My question is Is it necessary/must to set a proxy? The mystery for me is it works fine in my offices browsers but not if I want to access it at home form my machine. Are they extra steps in the deployment that deals with permission issues?
... View more
06-14-2017
06:57 AM
|
0
|
6
|
1107
|
POST
|
I have been developing an app from the developer edition of web appbuilder and deployed it in our Web server (Tomcat) it seems to work with out any problem from our organizations intranet and internet infrastracture. But when we tried it at home from our own machine it appears to hang forever with the blue sreen (loading screen). Here are the error report from the console of chrome and Firefox. From Chrome (2 error report) Failed to load resource: the server responded with a status of statisticsUtils.js 403 (Forbidden) js.arcgis.com/3.20/init.js:3Error: scriptError at f (js.arcgis.com/3.20/init.js:10) at HTMLScriptElement.<anonymous> (js.arcgis.com/3.20/init.js:35) from Firefox Request URL: http://myDomain/MyApp/jimu.js/statisticsUtils.js Status Code 403 Forbiden It complains about the statisticsUtil.js file and this javascript file resides in the Jimu.js folder and it deals with query and filtering a layer (from my understanding), this file is the only file which can not be opened from the browser and it throws this error message (403 Forbidden: You don't have permission to access /...../..../jimu.js/statisticsUtils.js on this server). Any idea Robert Scheitlin, GISP and any body that have an idea what did I do wrong in the process of deploying the app. Thanks in advance
... View more
06-13-2017
08:28 AM
|
0
|
18
|
2802
|
POST
|
@ William Miller Hi William did you implement the code by associating it to already exiting widget or created a new widget for it and then make it to appear on startup and/or on click. It would be nice if you explain the process a bit. Infact I made it to run by invoking the showHelp function from the splash widgets onOkClick but once I close it I can no more get it again unless I refresh the app again which is not a flexible way. Thanks @Steve Cole for shading light on an alterntive techick to adding tabs to the splash widget. Cheers
... View more
06-06-2017
07:39 AM
|
0
|
0
|
1067
|
POST
|
I am developing a web map application in ArcGIS Web Appbuilder and I have Tile services (layers) with several sublayers. I defined one sublayer to be vissible on the legend and all others to be hiden from the legend for all the services in Portal map viewer. This property seems to persist in my Web appbuilder which was what I wanted to be, but when ever I printed a map the print widget includes all the legends of the layers (hiden) in my print out. I created a custom pritner with my custom templates created in ArcGIS desktop. whenever I restricted the size of the legend in my map templates in the legend property it seems to print the legend of the first layer in Web appbuilder. If the space for the legend is too small nothing is printed in the contary if the space is too big it prints many more layers legend. I played with the layout templates's legend property in ArcGIS Desktop (Fitting strategy, Wrap labels and so on) but I could only come up with only the upper layer to be printed not necessarly the legend I activated. I also tried to alter the script in the print.js but with no success. am I missing something? Is it posssible to print the legend that is shown in the leged widget only (which is the activated leged)? Any help is appreciated. Thanks a lot.
... View more
05-24-2017
08:13 AM
|
0
|
0
|
603
|
POST
|
Robert Scheitlin, GISP @Jay Clark I stumbled in this thread while looking for a possibility to toggle between layers in WAB. I am aware about your code Robert for toggling between sublayers but it was important for me to be able to implement the possibility to toggle between layers (not sub layers) and I used your idea here to accomplish it. I read many question about the possibility of toggling so it might be of a help for some one. I am able to switch off and on between 3 layers now (one layer visible at a time). Below is the peace of code. _onCkSelectNodeClick: function(layerInfo, ckSelect, evt) { if (ckSelect.checked) { layerInfo.setTopLayerVisible(true); if (layerInfo.title === 'the title of your map1') //you can find it from the layer list widget (title) { // how to find layer id //console.log(layerInfo.id); this.layerListWidget.operLayerInfos.getLayerInfoById('map Id_2').setTopLayerVisible(false); this.layerListWidget.operLayerInfos.getLayerInfoById('map Id_3').setTopLayerVisible(false); } if (layerInfo.title === 'the title of your map2') { //console.log(layerInfo.id); this.layerListWidget.operLayerInfos.getLayerInfoById('map Id_1').setTopLayerVisible(false); this.layerListWidget.operLayerInfos.getLayerInfoById('map Id_3').setTopLayerVisible(false); } if (layerInfo.title === 'the title of your map3') { //console.log(layerInfo.id); this.layerListWidget.operLayerInfos.getLayerInfoById('map Id_1').setTopLayerVisible(false); this.layerListWidget.operLayerInfos.getLayerInfoById('map Id_2').setTopLayerVisible(false); } } else { layerInfo.setTopLayerVisible(false); } evt.stopPropagation(); }, And many Thanks Robert and Clark.
... View more
05-16-2017
06:44 AM
|
1
|
0
|
2312
|
POST
|
The error followed after this was jus a sytem error. I was running it on my labtop and when I runned it on desktop with better processor and ram it worked fine and once again thanks Cartis and Dan.
... View more
03-30-2016
11:00 AM
|
0
|
1
|
2047
|
Title | Kudos | Posted |
---|---|---|
4 | 10-10-2023 02:09 AM | |
1 | 09-12-2023 03:03 AM | |
1 | 08-20-2019 02:28 AM | |
1 | 04-19-2022 01:18 AM | |
1 | 01-13-2020 07:34 AM |
Online Status |
Offline
|
Date Last Visited |
4 weeks ago
|