Giter Site home page Giter Site logo

cmv / cmv-wab-widgets Goto Github PK

View Code? Open in Web Editor NEW
9.0 10.0 19.0 48.36 MB

Examples of using widgets from the ESRI WebApp Builder in CMV

Home Page: https://cmv.github.io/cmv-wab-widgets/demo.html?config=wab

License: MIT License

CSS 4.56% HTML 3.28% JavaScript 92.11% Pascal 0.01% SCSS 0.05%
cmv cmv-widgets wab-widgets esri-webapp-builder esri-api esri-javascript-api esri-js arcgis-js-api arcgis-js arcgis-api

cmv-wab-widgets's Introduction

cmv-wab-widgets

Code Climate Join the chat at https://gitter.im/cmv/cmv-wab-widgets

Using widgets from the Esri WebApp Builder in CMV.

Introduction

Widgets created for the Esri WebApp Builder are very similar to widgets used by CMV. The primary difference between them is WAB widgets rely on the jimu.js library provided by Esri. Since both WAB and CMV widgets are based on the dojo toolkit, any WAB widget could be converted to a CMV widget removing the dependency on jimu.js. That conversion process can be simple or very involved depeding on the complexity of the widget. This repo provides a solution where no conversion is required and WAB widgets can be used directly in CMV without modification.

Another important difference between WAB and CMV is applications developed with the Esri WebApp Builder are dependent on Esri web apps hosted at ArcGIS On-line or within your own implementation of Portal for ArcGIS Server. Both ArcGis Online and Portal require subscriptions at an additional cost. No subscription is required to use the WAB widgets within CMV. Applications developed with CMV use the REST services provided by ArcGIS Server to access AGS resources.

Notes

A couple of the custom WAB widgets included in this repo were modified. None of those changes were required for the widget to work with CMV. The changes were for a specific need or to overcome poor code practices in the widget like missing dojo dependencies for the widget's template.

Examples

Out-of-the-box WAB Widgets

Includes the following widgets:

  • Basemap Gallery
  • Bookmarks
  • Coordinate
  • Chart
  • Directions
  • Draw
  • HomeButton
  • LayerList
  • Legend
  • Measurement
  • MyLocation
  • Print
  • Query

Custom AddLayer Widget

Custom Aloha Threat Zone Widget

Custom Draw & Measure and SaveSession Widgets

Both of these widgets have been modified from the original to provide additional functionality

Custom Enhanced Bookmarks Widget

Custom Enhanced Query Widget

Custom Wikipedia Search Widget

Requirements

  • This method uses the develop branch of cmv.

  • This method supports the following versions of the WebApp Builder:

    • version 2.15 released December 2019
    • version 2.14 released October 2019
    • version 2.13 released August 2019
  • The following versions of the WebApp Builder may also work but are no longer supported:

    • version 2.12 released April 2019
    • version 2.11 released January 2019
    • version 2.10 released October 2018
    • version 2.9 released July 2018
    • version 2.8 released April 2018
    • version 2.7 released January 2018
    • version 2.6 released October 2017
    • version 2.5 released July 2017
    • version 2.4 released March 2017
    • version 2.3 released January 2017
    • version 2.2 released October 2016

Changes to your CMV application

Currently, the process requires 3 simple changes to your CMV application. I anticipate these changes will be incorporated into the main cmv-app project and so most of these steps will be eliminated and it will be a simple configuration exercise to use WAB widgets in CMV.

  1. Add the new _WABMixin.js controller mixin to your app. I placed mine in the config folder.

  2. Modification to app.js:

    • Add a locale to dojoConfig:

      locale: 'en-us',
    • Add packages for jimu, lib and widgets folders from WAB to dojoConfig:

      /* customizations for WAB widgets */
      },{
          name: 'jimu',
          location: path + 'wab/2.15/jimu.js'
      },{
          name: 'libs',
          location: path + 'wab/2.15/libs'
      },{
          name: 'wabwidgets',
          location: path + 'wab/2.15/widgets'
      /* end customizations for WAB widgets */
    • Add the new mixin to the Controller. JavaScript and css files specific to jimu and wab are loaded here as well.

      require(window.dojoConfig, [
          'dojo/_base/declare',
      
          // minimal Base Controller
          'viewer/_ControllerBase',
      
          // *** Controller Mixins
          // Use the core mixins, add custom mixins
          // or replace core mixins with your own
          'viewer/_ConfigMixin', // manage the Configuration
          'viewer/_LayoutMixin', // build and manage the Page Layout and User Interface
          'viewer/_MapMixin', // build and manage the Map
          'viewer/_WidgetsMixin', // build and manage the Widgets
      
          'config/_WABMixin', // cusom mix-in to use WAB widgets
      
          // needed by some wab widgets like Print
          'libs/caja-html-sanitizer-minified',
      
          // jimu stylesheet needed for WAB widgets
          'xstyle/css!jimu/css/jimu-theme.css',
      
          // needed so that jimu styles play nice with cmv
          'xstyle/css!./css/cmv-jimu.css',
          // some css tweaks for WAB widgets (optional)
          'xstyle/css!./css/cmv-wab.css'
      
          ], function (
          declare,
      
          _ControllerBase,
          _ConfigMixin,
          _LayoutMixin,
          _MapMixin,
          _WidgetsMixin,
      
          _WABMixin
      
      ) {
          var App = declare([
              _LayoutMixin,
              _WidgetsMixin,
              _MapMixin,
              _WABMixin,
              _ConfigMixin,
              _ControllerBase
          ]);
          var app = new App();
          app.startup();
      });

Adding WAB widgets to your cmv configuration

Adding WAB widgets to your CMV application is very similar to adding CMV widgets. Below are several examples with comments to identify the differences needed for WAB widgets.

Examples of 'off-panel` widgets included with WAB:

Coordinate Widget

coordinate: {
    include: true,
    id: 'coordinate',
    type: 'domNode',
    srcNodeRef: 'mapInfoDijit',
    path: 'jimu/BaseWidgetPanel',
    options: {
        widgetManager: true,
        config: {
            widgets: [
                {
                    id: 'WABCoordinate',
                    uri: 'wabwidgets/Coordinate/Widget' // Note the path
                }
            ]
        }
    }
},

HomeButton and MyLocation Widgets

mapButtons: {
    include: true,
    id: 'mapButtons',
    type: 'domNode',
    srcNodeRef: 'homeButton',
    path: 'jimu/BaseWidgetPanel', // Note the path
    options: {
        // use the WAB WidgetManager (required)
        widgetManager: true,

        // configuration for the BaseWidgetPanel
        config: {
            // a BaseWidgetPanel can contain multiple widgets
            widgets: [
                {
                    id: 'WABHome',
                    uri: 'wabwidgets/HomeButton/Widget' // Note the path
                },
                {
                    id: 'WABMyLocation',
                    uri: 'wabwidgets/MyLocation/Widget'  // Note the path
                }
            ]
        }
    }
},

Examples of 'in-panel` widgets included with WAB:

Draw Widget

draw: {
    include: true,
    id: 'draw',
    type: 'titlePane',
    position: 3,
    title: 'Draw',
    open: false,
    path: 'jimu/BaseWidgetPanel', // Note the path
    options: {
        // use the WAB WidgetManager (required)
        widgetManager: true,

        config: {
            widgets: [
                // minimum configuration for the WAB Widget
                {
                    id: 'WABDraw',
                    uri: 'wabwidgets/Draw/Widget' // Note the path
                }
            ]
        }
    }
}

Query Widget

query: {
    include: true,
    id: 'query',
    type: 'titlePane',
    position: 8,
    title: 'Query',
    open: false,
    path: 'jimu/BaseWidgetPanel', // Note the path
    options: {
        // use the WAB WidgetManager (required)
        widgetManager: true,

        config: {
            widgets: [
                {
                    id: 'WABQuery',
                    uri: 'wabwidgets/Query/Widget', // Note the path

                    // more complex configuration passed to WAB Widget
                    config: {
                        queries: [
                            {
                                name: 'Cities',
                                url: 'https://sampleserver6.arcgisonline.com/arcgis/rest/services/SampleWorldCities/MapServer/0',
                                filter: {
                                    logicalOperator: 'AND',
                                    parts: [
                                        {
                                            fieldObj: {
                                                name: 'POP_RANK',
                                                label: 'POP_RANK',
                                                shortType: 'number',
                                                type: 'esriFieldTypeInteger'
                                            },
                                            operator: 'numberOperatorIs',
                                            valueObj: {
                                                isValid: true,
                                                type: 'value',
                                                value: 3
                                            },
                                            interactiveObj: '',
                                            caseSensitive: false,
                                            expr: 'POP_RANK = 3'
                                        }
                                    ],
                                    expr: 'POP_RANK = 3'
                                },
                                popup: {
                                    title: '${CITY_NAME}',
                                    fields: [
                                        {
                                            name: 'CITY_NAME',
                                            alias: 'CITY_NAME',
                                            specialType: 'none'
                                        }
                                    ]
                                },
                                resultsSymbol: {
                                    color: [
                                        0,
                                        0,
                                        128,
                                        128
                                    ],
                                    size: 18,
                                    angle: 0,
                                    xoffset: 0,
                                    yoffset: 0,
                                    type: 'esriSMS',
                                    style: 'esriSMSCircle',
                                    outline: {
                                        color: [
                                            0,
                                            0,
                                            128,
                                            255
                                        ],
                                        width: 0.75,
                                        type: 'esriSLS',
                                        style: 'esriSLSSolid'
                                    }
                                },
                                objectIdField: 'OBJECTID',
                                orderByFields: []
                            }
                        ]
                    }
                }
            ]
        }
    }
}

Examples of 'in-panel` custom widget:

Aloha Threat Zone Widget

widget: {
    include: true,
    id: 'widget',
    type: 'titlePane',
    position: 0,
    title: 'Aloha Threat Zone',
    canFloat: true,
    resizable: true, // This widget is resizable when floating
    open: true,
    path: 'jimu/BaseWidgetPanel', // Note the path
    options: {
        // use the WAB WidgetManager (required)
        widgetManager: true,

        // This widget requires some height to work properly
        style: 'height:400px;',

        config: {
            widgets: [
                {
                    id: 'WABWidget',
                    uri: 'widgets/AlohaThreatZone/Widget'  // Note the path
                }
            ]
        }
    }
}

SaveSession Widget

saveSession: {
    include: true,
    id: 'saveSession',
    type: 'titlePane',
    position: 0,
    title: 'Save Session',
    open: true,
    path: 'jimu/BaseWidgetPanel', // Note the path
    options: {
        // use the WAB WidgetManager (required)
        widgetManager: true,

        config: {
            widgets: [
                {
                    id: 'WABSaveSession',
                    uri: 'widgets/SaveSession/Widget',  // Note the path
                    // includes an optional configuration
                    config: {
                       fileNameForAllSessions: "cmvSessions.json",
                       fileNameTplForSession: "cmvSessions_${name}.json"
                    }
                }
            ]
        }
    }
}

To-Do

  • Currently, off-panel Widgets are loaded within a BaseWidgetPanel. This is probably unnecessary.

Sources of WAB Widgets

You can find WAB widgets:

License

MIT

cmv-wab-widgets's People

Contributors

amcgee avatar dependabot[bot] avatar duckblaster avatar greenkeeper[bot] avatar snyk-bot avatar tmcgee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cmv-wab-widgets's Issues

Bypassing Portal

Hello

Would be nice if the CMV-wab-widgets could be able to bypass ArcGIS Portal to make it more open to connect to REST map services (like ArcGIS,MapServer and Geoserver).

Sincerely
Ezequias

3.17 API Update

Will you be migrating this application to the 3.17 API in the near future?

Chart widget - Enlarge Window

HI,

When I click on Enlarge button of Chart widget, the pop up window going out of screen, X & Y axis data and close button not visible on screen.

I would like to set the settings same as Identify popup window as it is display properly on center of the screen even when you maximize the popup.

9

Please suggest me on this.

WAB Widgets Content Height

Hi,

How do I increase the height of the container so that widget's complete UI we can see without scrolling, as current height is not enough to see the complete UI.

Also, How do I set max-height & min-height for widgets ?

4

WAB Widget: Image Discovery

WAB version: 2.4
JS Arcgis version: 3.2
CMV version: 2.0 beta 1.0

Hi,
I need help to use this WAB Image Discovery runs inside CMV . Install okay show in the picture. However no action on clicking the search tools. I use localhost mosaic datasets as image services. Also, console from the Chrome developer tools shows no errors. Please help. Thanks.

imagedis

Basemap Gallery in sidebar Right panel

I want to put the basemap gallery in the right side panel. The panel displays, but the widget does not. Any suggestions?
right: {
id: 'sidebarRight',
placeAt: 'outer',
region: 'right',
open: true,
splitter: true,
style: 'height:200px;',
collapsible: true,
content: '

'
},
basemapGallery: {
include: true,
id: 'basemapGallery',
type: 'titlePane',
title: 'Basemap Gallery',
open: false,
path: 'jimu/BaseWidgetPanel',
sidebarID: 'sidebarRight',
options: {
widgetManager: true,
config: {
widgets: [
{
id: 'WABBasemapGallery',
uri: 'wabwidgets/BasemapGallery/Widget'
}
]
}
}
},

Filter Widget Error - 'isShowInMap' null

Hi,

I added Filter widgets and when I hit apply I get the error at line number 303 in widgets.js file of Filter widget "Cannot read property 'isShowInMap' of null".

5

6

7

below is widgets configuration in Viewer.js

filter: {
                include: true,
                id: 'filter',
                type: 'titlePane',
                iconClass: 'fa fa-filter',
                position: 10,
                title: 'Filter',
                path: 'jimu/BaseWidgetPanel',
                canFloat: true,
                open: false,
                options: {
                    // use the WAB WidgetManager (required)
                    widgetManager: true,
                    layerControlLayerInfos: true,
                    //style: 'min-height: 500px;',
                    config: {
                        widgets: [
                            {
                                id: 'WABFilter',
                                uri: 'wabwidgets/Filter/Widget', // Note the path
                                // more complex configuration passed to WAB Widget
                                config: {
                                    filters: [{
                                          "url": "https://myserver.com/arcgis/rest/services/Road/MapServer/0",
                                        "name": "Project Type",
                                        "filter": {
                                            "logicalOperator": "AND",
                                            "parts": [{
                                                "fieldObj": {
                                                    "name": "PROJECT_TYPE",
                                                    "label": "PROJECT_TYPE",
                                                    "shortType": "string",
                                                    "type": "esriFieldTypeString"
                                                },
                                                "operator": "stringOperatorIs",
                                                "valueObj": {
                                                    "isValid": true,
                                                    "type": "unique",
                                                    "value": ""
                                                },
                                                "interactiveObj": {
                                                    "prompt": "Project Type is",
                                                    "hint": "",
                                                    "cascade": "none"
                                                },
                                                "caseSensitive": false
                                            }],
                                            "expr": ""
                                        },
                                        "icon": "",
                                        "enableMapFilter": true
                                    }, {
                                         "url": "https://myserver.com/arcgis/rest/services/Road/MapServer/0",
                                        "name": "Works Programme",
                                        "filter": {
                                            "logicalOperator": "AND",
                                            "parts": [{
                                                "fieldObj": {
                                                    "name": "WORKS_PROGRAMME",
                                                    "label": "WORKS_PROGRAMME",
                                                    "shortType": "string",
                                                    "type": "esriFieldTypeString"
                                                },
                                                "operator": "stringOperatorIs",
                                                "valueObj": {
                                                    "isValid": true,
                                                    "type": "unique",
                                                    "value": ""
                                                },
                                                "interactiveObj": {
                                                    "prompt": "Works Programme is",
                                                    "hint": "",
                                                    "cascade": "none"
                                                },
                                                "caseSensitive": false
                                            }],
                                            "expr": ""
                                        },
                                        "icon": "",
                                        "enableMapFilter": true
                                    }, {
                                          "url": "https://myserver.com/arcgis/rest/services/Road/MapServer/0",
                                        "name": "Audit Type",
                                        "filter": {
                                            "logicalOperator": "AND",
                                            "parts": [{
                                                "fieldObj": {
                                                    "name": "AUDIT_TYPE",
                                                    "label": "AUDIT_TYPE",
                                                    "shortType": "string",
                                                    "type": "esriFieldTypeString"
                                                },
                                                "operator": "stringOperatorIs",
                                                "valueObj": {
                                                    "isValid": true,
                                                    "type": "unique",
                                                    "value": ""
                                                },
                                                "interactiveObj": {
                                                    "prompt": "Audit Type is",
                                                    "hint": "",
                                                    "cascade": "none"
                                                },
                                                "caseSensitive": false
                                            }],
                                            "expr": ""
                                        },
                                        "icon": "",
                                        "enableMapFilter": true
                                    }, {
                                        "url": "https://myserver.com/arcgis/rest/services/Road/MapServer/0",
                                        "name": "Audit Stage",
                                        "filter": {
                                            "logicalOperator": "AND",
                                            "parts": [{
                                                "fieldObj": {
                                                    "name": "AUDIT_STAGE",
                                                    "label": "AUDIT_STAGE",
                                                    "shortType": "string",
                                                    "type": "esriFieldTypeString"
                                                },
                                                "operator": "stringOperatorIs",
                                                "valueObj": {
                                                    "isValid": true,
                                                    "type": "unique",
                                                    "value": ""
                                                },
                                                "interactiveObj": {
                                                    "prompt": "Audit Stage is",
                                                    "hint": "",
                                                    "cascade": "none"
                                                },
                                                "caseSensitive": false
                                            }],
                                            "expr": ""
                                        },
                                        "icon": "",
                                        "enableMapFilter": true
                                    }]
                                }
                            }
                        ]
                    }
                }
            },

Please suggest me on this.

CheckBox issue in this CMV-WAB viewer

Hi, @tmcgee : Just found out this issue when i tried to add @roemhildtg AppSettings widget to it. Somehow the checkbox is not clickable anymore. I think it is CSS conflicts somewhere, but i could not figure it out. If you check the default print widget, click the setting button, all other controls are fine, but the check box is not clickable.

here is the print widget
image

here is the appsetting widget
image

Please let me know if you have the fix or something.

Thanks a lot!

eDraw wab widget issue?

Can anyone try the eDraw widget and test if the export feature is working with the latest CMV from the dev branch? The import seems to be functioning but I cannot get the export dialog to trigger.

Thanks!

Logo for 'sub-configuration' viewers.

How do I display a different logo in the title section of a 'sub-configuration'?
titles: {
header: 'Aloha Threat Zone Widget Preview',
subHeader: 'This is an example of using Web App Builder widgets with CMV',
pageTitle: 'Aloha Threat Zone Widget Preview'
},

CMV Editor widget issue in WAB enabled cmv viewer since api 3.21

Today a user reported to us this issue, if we update the viewer to 3.25, then the CMV editor widget stops working, the error popup is

Uncaught RangeError: Maximum call stack size exceeded

If we switch back to 3.21, it still works, tried 3.22, 3.23, 3.24, 3.25, and 3.26, all failed. Please see if you experienced the same or not, any suggestion on how to fix this issue.

Thanks!

Errors loading custom basemaps when integrating a WAB widget

When adding the WAB widgets and their dependencies (_WABMixin in the controller), I get the following errors upon loading a custom basemap:

Basemap.js:4 esri.dijit.Basemap: unable to find the 'layers' property in parameters
BasemapLayer.js:4 esri.dijit.BasemapLayer: unable to find the 'url' or 'type' property in parameters

I was not able to replicate this issue when loading AGOL basemaps. Also, it's worth noting that the basemap will not load at all in IE when using the same custom basemaps (still loads fine in Chrome, Firefox and Edge). The errors are generated after basemap creation takes place in the config (i.e. wab-measure.js) file.

Any ideas on what could be causing the issue?
I've made the test site public: http://map.sccmo.org/Main/cmv_wab/demo.html but I can attach code if needed.

Besides that, the WAB widgets are working great CMV!

Thanks,

Jesse

Wab widgets won’t load

Hi,

I’m having trouble getting any wab widgets to load in CMV (I am using the latest version). They appear in the title pane but when I open them they just stay with the loading dots and never open. I am getting no errors appear anywhere, they just never load. I have tried multiple widgets in the wab repo and it’s the same with all of them. I have a feeling it maybe related to the wabapp-config.js. Was I meant to edit the itemid and portalUrl if my system is completely offline/stand-alone?

Any help you could provide would be hugely appreciated

Cannot read property split of undefined

Hello @tmcgee could you help me here please, I got this error while trying to include this widgets into my cmv app

TypeError: Cannot read property 'split' of undefined
at Object.mo.manifest.ret.processManifestLabel (utils.js:1345)
at Object._processManifest (WidgetManager.js:260)
at Object. (WidgetManager.js:222)
at init.js:63

my configurations are :
in the app.js :

 (function () { 
    var path = location.pathname.replace(/[^\/]+$/, '');
    window.dojoConfig = {
        async: true,
        packages: [
            {
                name: 'viewer',
                location: path +'../Scripts/arcgis/viewer'
            }, {
                name: 'gis',
                location: path + '../Scripts/arcgis/gis'
            }, {
                name: 'config',
                location: path + '../Scripts/arcgis/config'
            }, {
                name: 'JSZip3',
                main: 'jszip-3.1.3.min',
                location: path + '../Scripts/arcgis/gis/dijit/Export/lib'
            }, {
                name: 'proj4js',
                location: '//cdnjs.cloudflare.com/ajax/libs/proj4js/2.3.15'
            }, {
                name: 'flag-icon-css',
                location: '//cdnjs.cloudflare.com/ajax/libs/flag-icon-css/2.8.0'
            }, {
                name: 'jimu',
                location: path + '../Scripts/arcgis/gis/dijit/wab/jimu.js'
            }, {
                name: 'libs',
                location: path + '../Scripts/arcgis/gis/dijit/wab/libs'
            }, {
                name: 'wabwidgets',
                location: path + '../Scripts/arcgis/gis/dijit/wab/widgets'
            }
        ]
    }; 
require(window.dojoConfig, [
    'dojo/_base/declare',

    // minimal Base Controller
    'viewer/_ControllerBase',

    // *** Controller Mixins
    // Use the core mixins, add custom mixins
    // or replace core mixins with your own
    'viewer/_ConfigMixin', // manage the Configuration
    'viewer/_LayoutMixin', // build and manage the Page Layout and User Interface
    'viewer/_MapMixin', // build and manage the Map
    'viewer/_WidgetsMixin', // build and manage the Widgets
    'viewer/_WABMixin' // cusom mix-in to use the new widgets
    // 'viewer/_WebMapMixin' // for WebMaps
    //'config/_customMixin'

], function (
    declare,

    _ControllerBase,
    _ConfigMixin,
    _LayoutMixin,
    _MapMixin,
    _WidgetsMixin,
    _WABMixin
    // _WebMapMixin
    //_MyCustomMixin

) {
    var App = declare([

        // add custom mixins here...note order may be important and
        // overriding certain methods incorrectly may break the app
        // First on the list are last called last, for instance the startup
        // method on _ControllerBase is called FIRST, and _LayoutMixin is called LAST
        // for the most part they are interchangeable, except _ConfigMixin
        // and _ControllerBase
        //
        _LayoutMixin,
        _WidgetsMixin,
        // _WebMapMixin,
        _MapMixin,
        _WABMixin,
        // configMixin should be right before _ControllerBase so it is
        // called first to initialize the config object
        _ConfigMixin,

        // controller base needs to be last
        _ControllerBase
    ]);
    var app = new App();

    app.startup();
});

})(); `

the home index :
`<script src="~/Scripts/arcgis/3.20/init.js"></script>

<script src="~/Scripts/arcgis/config/app.js"></script> <script src="~/Scripts/arcgis/gis/dijit/wab/libs/caja-html-sanitizer-minified.js"></script>

`

Layer operation buttons not working

When trying CMV WAB demo, in Layer list and click ellipsis button on the right of layer title, it keeps loading, but nothing shows up.
image

In browser debug window, got the errors:

init.js:114 TypeError: window.getAppConfig is not a function
    at Object._getBasicItemInfo (LayerInfo.js:1106)
    at Object.isItemLayer (LayerInfo.js:992)
    at Object._getATagLabel (PopupMenuInfo.js:51)
    at Object._initCandidateMenuItems (PopupMenuInfo.js:117)
    at Object.constructor (PopupMenuInfo.js:43)
    at new <anonymous> (init.js:200)
    at Function.<anonymous> (PopupMenuInfo.js:471)
    at init.js:63
    at h (init.js:107)
    at d.then.b.then (init.js:110) "TypeError: window.getAppConfig is not a function
    at Object._getBasicItemInfo (https://cmv.github.io/cmv-wab-widgets/wab/2.8/jimu.js/LayerInfos/LayerInfo.js:1106:50)
    at Object.isItemLayer (https://cmv.github.io/cmv-wab-widgets/wab/2.8/jimu.js/LayerInfos/LayerInfo.js:992:19)
    at Object._getATagLabel (https://cmv.github.io/cmv-wab-widgets/wab/2.8/widgets/LayerList/PopupMenuInfo.js:51:43)
    at Object._initCandidateMenuItems (https://cmv.github.io/cmv-wab-widgets/wab/2.8/widgets/LayerList/PopupMenuInfo.js:117:21)
    at Object.constructor (https://cmv.github.io/cmv-wab-widgets/wab/2.8/widgets/LayerList/PopupMenuInfo.js:43:12)
    at new <anonymous> (https://js.arcgis.com/3.24/init.js:200:335)
    at Function.<anonymous> (https://cmv.github.io/cmv-wab-widgets/wab/2.8/widgets/LayerList/PopupMenuInfo.js:471:22)
    at https://js.arcgis.com/3.24/init.js:63:337
    at h (https://js.arcgis.com/3.24/init.js:107:277)
    at d.then.b.then (https://js.arcgis.com/3.24/init.js:110:152)
    ----------------------------------------
    rejected at a (https://js.arcgis.com/3.24/init.js:108:174)
    at h (https://js.arcgis.com/3.24/init.js:107:436)
    at d.then.b.then (https://js.arcgis.com/3.24/init.js:110:152)
    at Function.clazz.create (https://cmv.github.io/cmv-wab-widgets/wab/2.8/widgets/LayerList/PopupMenuInfo.js:450:30)
    at Object.openDropMenu (https://cmv.github.io/cmv-wab-widgets/wab/2.8/widgets/LayerList/PopupMenu.js:201:23)
    at Object._onPopupMenuClick (https://cmv.github.io/cmv-wab-widgets/wab/2.8/widgets/LayerList/LayerListView.js:549:21)
    at HTMLDivElement.<anonymous> (https://js.arcgis.com/3.24/init.js:63:15)
    ----------------------------------------
Error
    at d.then.b.then (https://js.arcgis.com/3.24/init.js:110:97)
    at Function.clazz.create (https://cmv.github.io/cmv-wab-widgets/wab/2.8/widgets/LayerList/PopupMenuInfo.js:450:30)
    at Object.openDropMenu (https://cmv.github.io/cmv-wab-widgets/wab/2.8/widgets/LayerList/PopupMenu.js:201:23)
    at Object._onPopupMenuClick (https://cmv.github.io/cmv-wab-widgets/wab/2.8/widgets/LayerList/LayerListView.js:549:21)
    at HTMLDivElement.<anonymous> (https://js.arcgis.com/3.24/init.js:63:15)"

WAB widgets do not load on mobile devices

  1. Load the demo in Chrome
  2. Open Dev Tools
  3. Click the 'Toggle device toolbar' icon and select a tablet or phone, such as the iPhone 7.
  4. Refresh
  5. The page never loads, with the following error:

init.js:28 Uncaught TypeError: this.widgetManager.loadWidget is not a function
at Object. (BaseWidgetPanel.js:76)
at Object.forEach (init.js:70)
at Object.loadAllWidgetsInOrder (BaseWidgetPanel.js:66)
at Object.startup (BaseWidgetPanel.js:55)
at Object.placeAt (init.js:361)
at Object.createWidget (_WidgetsMixin.js:190)
at Object. (_WidgetsMixin.js:171)
at init.js:63
at ia (init.js:28)
at init.js:28

I believe this is due to the panel being collapsed when the page loads, preventing the widget to properly initialize.

Switching on Dynamic-Sublayer in LayerControl results in drawing all sublayers

I have a Dynamic Service (Regions_Zones) with the following structure:

  • Regions (0)
    • Region_A (1)
    • Region_B (2)
    • Region_C (3)
    • Region_D (4)
  • Zones (5)
    • Zone_A (6)
    • Zone_B (7)
    • Zone_C (8)
    • Zone_D (9)

If I select the layer (6) in the LayerControl the layer is checked, but all layers in the Zones Group are displayed on the map. The layerControl show only layer (6) as checked). If I debug this in the file Dynamic.js the setLayers variable contains the right value (6) but after the call setVisibleLayers the setLayers array contains now a lot more values (now 48 values) and all values are in the range from 5...9 which is the range from the group.

_setVisibleLayers: function () { // file: Dynamic.js

(203) layer.setVisibleLayers(setLayers);
(204) layer.refresh();

This behavior occurs only with the WAB integration. The standalone CMV works fine.

I cross-checked the following:

  • cmv current development works as expected
  • cmv 2.0.0 beta2 works as expected

Try to reload my drawing?

Sorry I don’t see that one: Wab widgets won’t load
Your tool Tim is very power full, I try and its work perfectly until i try to reload my drawing?
i make a draw and I save and I reload but I don’t understood something
to reload the draw, cmvSessions.json I have no draw???
image

I am sure its not a versioning problem
I work with WAB since a while with 10.02 and almost everything work but no dropdown in a popup...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.