Web AppBuilder for ArcGIS v2.6 Developer Edition Now Available!

2147
16
10-12-2017 10:46 AM
DerekLaw
Esri Esteemed Contributor
1 16 2,147
16 Comments
StevenHaslemore
Occasional Contributor

Hi,

noticed the following in the WAB config about switching between 2D/3D, is there any target version to support a switchable viewer?

3D

Boolean. Default: false—Identifies whether the map is 3D or 2D. If both 3D and 2D are true, it’s an app with the ability to switch between 3D and 2D (not supported in this version).

2D

Boolean. Default: true—Identifies whether the map is 2D or 3D? If both 2D and 3D are true, it’s an app with the ability to switch between 2D and 3D (not supported in this version)

Cheers,

Steven

DerekLaw
Esri Esteemed Contributor

Hi Steven,

> noticed the following in the WAB config about switching between 2D/3D, is there any target version to support a switchable viewer?

We're waiting for the ArcGIS API for JavaScript to finalize its v4.0 release first. Please submit your enhancement request on the ArcGIS Ideas.

Hope this helps,

GuillaumeArnaud
Occasional Contributor

Hi,

is there a bug on this new version ? In the chrome's developper tool, i have this :

init.js:114 TypeError: Cannot read property 'refreshInterval' of null
at Object.<anonymous> (MapManager.js?wab_dv=2.6:302)
at init.js:63...

Thanks,

Guillaume

DerekLaw
Esri Esteemed Contributor

Hi Guillaume,

You haven't provided much detail/context on how you got this message. It would help if you could provide some background on what you were doing and provide some repro steps.

DanielMatranga1
New Contributor III

I'm experiencing an issue where, after spending some time configuring widgets and customizing an app, it fails to load. I can no longer edit the application and am starting over, but here is the error info (with my computer name and domain masked).

JavaScript Errors

RobertScheitlin__GISP
MVP Emeritus

Daniel,

 Have you done any manual editing of a widget config file or have you only used the widgets settings UIs?

DanielMatranga1
New Contributor III

So far, I've just edited the widgets using the UI. What do you think? Any idea which JS file might be causing the error?

RobertScheitlin__GISP
MVP Emeritus

Daniel,

  Not a JS file. I sounds like an issue in a widgets config.json. Can you tell which widget it is failing on?

GuillaumeArnaud
Occasional Contributor

Hi

I ask french support with this bug.

I have the same problem with agol's wab. I think the problem come when the webmap contain tiled mapservice or annotation layer.

Extract of firebug :

You can read the entire log on https://lacarto.ledepartement82.fr/CadastreNapoleonien/

The issue is open on French esri support with Esri Case #02010576

Thanks. 

Guillaume

DanielMatranga1
New Contributor III

Robert, thanks for the advice. I ended up just rebuilding the app since it was just a basic map app. This issue does make me a little concerned about building a more advanced app with v 2.6 though. Will create a separate post in the support forum.

DanielMatranga1
New Contributor III

Nice work on the web map app, Guillaume! I'm not sure how you were able to mask off the other areas of the map outside your area of interest, but it looks cool, great idea.

RobertScheitlin__GISP
MVP Emeritus

Guillaume,

   I am not real sure why you are seeing this issue but the fix would be a simple change to the code in MapManager.js:

(lines 69 - 71)

      _show2DWebMap: function(appConfig) {
        //should use appConfig instead of this.appConfig, because appConfig is new.
        // if (appConfig.portalUrl) {
        //   var url = portalUrlUtils.getStandardPortalUrl(appConfig.portalUrl);
        //   agolUtils.arcgisUrl = url + "/sharing/content/items/";
        // }
        if(!appConfig.map.mapOptions){
          appConfig.map.mapOptions = {};
        }
        var mapOptions = this._processMapOptions(appConfig.map.mapOptions) || {};
        mapOptions.isZoomSlider = false;

        var webMapPortalUrl = appConfig.map.portalUrl;
        var webMapItemId = appConfig.map.itemId;
        var webMapOptions = {
          mapOptions: mapOptions,
          bingMapsKey: appConfig.bingMapsKey,
          usePopupManager: true
        };

        if(!window.isBuilder && !appConfig.mode && appConfig.map.appProxy &&
            appConfig.map.appProxy.mapItemId === appConfig.map.itemId) {
          var layerMixins = [];
          array.forEach(appConfig.map.appProxy.proxyItems, function(proxyItem){
            if (proxyItem.useProxy && proxyItem.proxyUrl) {
              layerMixins.push({
                url: proxyItem.sourceUrl,
                mixin: {
                  url: proxyItem.proxyUrl
                }
              });
            }
          });

          if(layerMixins.length > 0) {
            webMapOptions.layerMixins = layerMixins;
          }
        }

        var mapDeferred = this._createWebMapRaw(webMapPortalUrl, webMapItemId, this.mapDivId, webMapOptions);

        mapDeferred.then(lang.hitch(this, function(response) {
          var map = response.map;

          //hide the default zoom slider
          map.hideZoomSlider();

          // set default size of infoWindow.
          map.infoWindow.resize(270, 316);
          //var extent;
          map.itemId = appConfig.map.itemId;
          map.itemInfo = response.itemInfo;
          map.webMapResponse = response;
          // enable snapping
          var options = {
            snapKey: keys.copyKey
          };
          map.enableSnapping(options);

          html.setStyle(map.root, 'zIndex', 0);

          map._initialExtent = map.extent;

          this.layerInfosObj = LayerInfos.getInstanceSyncForInit(map, map.itemInfo);

          //save layer's original refreshInterval
          this.layerInfosObj.traversalLayerInfosOfWebmap(lang.hitch(this, function(layerInfo){
            layerInfo.getLayerObject().then(lang.hitch(this, function(layerObject){
              if(layerObject.refreshInterval){
                lang.setObject("_wabProperties.originalRefreshinterval", layerObject.refreshInterval, layerObject);
              }
            }), lang.hitch(this, function(err){
              console.error("can't get layerObject", err);
            }));
          }));

          if(appConfig.map.mapRefreshInterval && !appConfig.map.mapRefreshInterval.useWebMapRefreshInterval){
            this._updateRefreshInterval(appConfig.map.mapRefreshInterval);
          }

          this._showUnreachableLayersTitleMessage();
          this._publishMapEvent(map);
          setTimeout(lang.hitch(this, this._checkAppState), 500);
          this._addDataLoadingOnMapUpdate(map);
        }), lang.hitch(this, function(error) {
          console.error(error);
          this._showError(error);
          topic.publish('mapCreatedFailed');
        }));
      },
GuillaumeArnaud
Occasional Contributor

It's not a mask, it's just our map cache on our server

GuillaumeArnaud
Occasional Contributor

I know it's here to correct the bug.  

To correct the bug i test layerObject not layerObject.refreshInterval but my real question is why my mapservice bug ? It's 10.5 Arcgis Mapservice.

RobertScheitlin__GISP
MVP Emeritus

Guillaume,

  Neither Derek or I can answer that as it feels like it is a bug in 2.6 when working with non-webmercator basemaps.

DerekLaw
Esri Esteemed Contributor

Hi Guillaume,

I've asked Esri Tech Support to look into your issue and they will check into your Esri France Support issue. I will post more when I get a status update.

About the Author
Senior Product Manager | Twitter: @GIS_Bandit | Mastodon: mastodon.world/@GIS_Bandit | Bluesky: bsky.app/profile/gisbandit.bsky.social