|
POST
|
Hello Robert, I have applied the codes. It works. To make the field value short, I change the code to if (value.toLowerCase().indexOf("http") > -1) { value = "<a href='" + value + "' target='_blank'>" + "Open Link" + "</a>"; } I will do more testing, making sure other functions in the identify widget will stay functional. Thanks so much for helping. Helen
... View more
09-14-2018
01:44 PM
|
0
|
1
|
1045
|
|
POST
|
Hello Robert, After applying your latest the code suggestion, the content is changed. But the identified panel doesn't render the hyper link - but the source code. Thanks
... View more
09-14-2018
08:14 AM
|
0
|
1
|
1045
|
|
POST
|
Thanks Robert. It is not a case issue. But it is always a good idea to consider the case when compare strings I am able to see the code is executed in the Chrome debugger. But after the code is executed, the "content" string doesn't change.
... View more
09-14-2018
07:44 AM
|
0
|
1
|
2176
|
|
POST
|
I am sorry, Robert. Typo - I did change search with indexOf. The code still not does anything to replace the url with "open link"
... View more
09-14-2018
06:42 AM
|
0
|
1
|
2176
|
|
POST
|
Hello Robert, I have changed from "search" to "replace", it still not working. Any idea? Thanks Helen
... View more
09-14-2018
06:26 AM
|
0
|
1
|
2176
|
|
POST
|
Adrian, I don't see "open link" anywhere in the identify pop up. It doesn't seem to work after the content.replace statement. Thanks Helen
... View more
09-14-2018
05:47 AM
|
0
|
1
|
2176
|
|
POST
|
I am trying to customize Robert Scheitlin's identify widget so that so that the identify result shows field value as a hyperlink if the field value is a url. Here is what I add in the showIdentifyResults module in the widget.js after line 1297 ( I am using widget version 2.7) content = content + this.resultFormatString.replace('[attribname]', fld).replace('[attribvalue]', value); /////////customize to create a hyper link for a field if the value is a url. Field value start with http or https if (value.search("http:") == 0 || value.search("https:") == 0) { content.replace(value, '<a href="' + value + '">open link</a>'); } The "content" doesn't change. Anybody has done that before? Thanks Helen
... View more
09-13-2018
02:53 PM
|
0
|
13
|
3384
|
|
POST
|
I have a map service which is configured to have some layers visible at certain scale. The layerlist widget in the Web Appbuilder show all the sublayers with invisible layers greyed out. How do I configure/customize the layerlist widget so that invisible sublayers are not listed (scale dependent). Thanks
... View more
06-21-2018
08:49 AM
|
0
|
5
|
2844
|
|
POST
|
Hi Robert, I have had another finding. Your identify wdiget in my WAB application only display feature information for expandable loaded maps services. I am able to debugging your identify widget.js and find out that problem layers have newSubLayer length = 0. So I am guessing in the WAB, there is an event triggered when new layers are added - something like LayerInfosChange in jimu. The change event has effects on all widgets which use map's operLayerInfos across in WAB applications, including layerlist, legend and identify, maybe others. Do you know if such an event exists? Thanks Helen
... View more
06-14-2018
10:13 AM
|
0
|
1
|
1244
|
|
POST
|
Thanks Robert, I have setTimeout when loading a layer. It still behaves the same - only one layer is expandable. I will dig more in the layerlist widget code to see how the refresh is triggered. Helen
... View more
06-14-2018
07:48 AM
|
0
|
0
|
1244
|
|
POST
|
Robert, One more note - No customization for Layer list and Legend - they are build-in from Web Appbuilder 2.8. Thanks Helen
... View more
06-13-2018
09:34 AM
|
0
|
4
|
1244
|
|
POST
|
Hello Rober, Thanks for help, It doesn't look like the customized code has something. I have created a very simple WAB application at this location Test LayerList WAB If I select add one map service from the drop down list, 911 is added to the map which is expandable. But I I choose add 2 map services from the drop down list, USA and Census are added to the map, only one layer is expandable. It looks random, my IE has USA expandable and Google has Census expandable.And the legend only lists the layers that are expandable. I have changed my code to be this simple by loading map service url this way- var dynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer("https://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer", {"id" : "census", opacity: 0.5}); this.map.addLayer(dynamicMapServiceLayer); Thanks so much for help. Helen
... View more
06-13-2018
09:17 AM
|
0
|
0
|
2613
|
|
POST
|
Robert, After further debugging, I found that in LayerListView,js, the layer that is expandable has newSubLayers length >0. And the layer that is non-expandable has the newSubLayers length property as 0. The layer is loaded as map service which obviously has at least one sublayer. As I said before, when I load only one map service (same map service url), the newSubLayer length is > 0. Do you know what will be the reason? Thanks Helen Load with other map services VS - load as the only map service
... View more
06-12-2018
02:35 PM
|
0
|
7
|
2613
|
|
POST
|
It is through a customized widget that I customized from the Addlayer widget (AddLayer Widget ). The original widget is used to add one layer when a check box is checked. It works with the layerlist which expands the layer node. What I have customized is to add a dijit/form/Select above the layer list in the widget.html. When the value changes in the select, a few map services are added to the map. The map services are added to the map in a loop. I have also noticed that Web AppBuilder build-in Legend widget only display the legend for the layer which is expandable in the layerlist widget. Here is the code which load a few map services. addLayerToMap is reused from the original code. Themelayers is the array of IDs for map services which will be loaded in the map. array.forEach(this.config.layers, function (layer) { if (themeLayers.indexOf(layer.name) != -1) //find the fire { //1. Check box checked var cb = registry.byId(layer.name); cb.setValue(true); //2. Load layer to map this.addLayerToMap(layer); } }, this); The screenshot below shows when Planning is selected, map services "Other Info", "Small CellInfo", "Trans Plan Info" are loaded to the map.
... View more
06-12-2018
02:27 PM
|
0
|
0
|
2613
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 11-09-2022 10:27 AM | |
| 2 | 04-27-2022 08:20 AM | |
| 1 | 04-27-2022 08:35 AM | |
| 3 | 04-25-2022 09:20 AM | |
| 1 | 04-18-2022 07:38 AM |
| Online Status |
Offline
|
| Date Last Visited |
12-08-2023
10:33 PM
|