Move the popup window in WAB?

3484
12
Jump to solution
11-27-2019 07:50 AM
CarolinaAguilar_Aravena
New Contributor II

I need a code that allows moving the pop-up window, since when viewing the map this window covers the layers of the map. I need this to better the user experience assistance. I use the code of How To: Enable drag function on an infoWindow pop-up in Web AppBuilder for ArcGIS  but generate this error.

0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Carolina,

   The utils.js that step 2 tells you to modify, should look like this.

define([
    'dojo/_base/lang',
    'dojo/_base/array',
    'dojo/_base/html',
    'dojo/_base/sniff',
    'dojo/_base/config',
    'dojo/io-query',
    'dojo/query',
    'dojo/NodeList-traverse',
    'dojo/Deferred',
    'dojo/promise/all',
    'dojo/on',
    'dojo/json',
    'dojo/cookie',
    'dojo/number',
    'dojo/date/locale',
    'dojo/i18n!dojo/cldr/nls/number',
    'dojox/encoding/base64',
    'esri/lang',
    'moment/moment',
    'esri/arcgis/utils',
    'esri/dijit/PopupTemplate',
    'esri/SpatialReference',
    'esri/geometry/Extent',
    'esri/geometry/geometryEngine',
    'esri/geometry/Multipoint',
    'esri/geometry/Polyline',
    'esri/geometry/Polygon',
    'esri/geometry/webMercatorUtils',
    'esri/tasks/GeometryService',
    'esri/tasks/ProjectParameters',
    'esri/tasks/FeatureSet',
    'esri/symbols/PictureMarkerSymbol',
    'esri/urlUtils',
    'esri/request',
    'esri/tasks/query',
    'esri/tasks/QueryTask',
    'esri/graphicsUtils',
    'esri/IdentityManager',
    'esri/arcgis/OAuthInfo',
    'jimu/portalUrlUtils',
    './shared/utils',
    './accessibleUtils',
    './zoomToUtils',
    'dojo/dnd/Moveable',
    'dojo/dom-class',
    'libs/caja-html-sanitizer-minified'
  ],

function(lang, array, html, has, config, ioQuery, query, nlt, Deferred, all, on, json, cookie,
  dojoNumber, dateLocale, nlsBundle, base64, esriLang, moment, arcgisUtils, PopupTemplate, SpatialReference,
  Extent, geometryEngine, Multipoint, Polyline, Polygon, webMercatorUtils, GeometryService, ProjectParameters,
  FeatureSet, PictureMarkerSymbol, esriUrlUtils, esriRequest, EsriQuery, QueryTask, graphicsUtils, IdentityManager,
  OAuthInfo, portalUrlUtils, sharedUtils, accessibleUtils, zoomToUtils, Moveable, domClass
) {

View solution in original post

12 Replies
RobertScheitlin__GISP
MVP Emeritus

Carolina,

   Sounds like you have something missing or out of order in the define array (step 2 in the instructions).

0 Kudos
CarolinaAguilar_Aravena
New Contributor II

Do you know how I can solve this error?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Not without seeing your code change, were I can identify your mistake.

0 Kudos
CarolinaAguilar_Aravena
New Contributor II

The modifications of the code that generated this error were those shown in the following link: How To: Enable drag function on an infoWindow pop-up in Web AppBuilder for ArcGIS in step 2 and 3, these generate the message presented, of the function "Moveable"

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Carolina,

   That is the problem. When those modification are done properly they do Not produce an error. So you are likely make a standard beginners error and adding the new define and making the vars that are linked with those defines out of order.

0 Kudos
CarolinaAguilar_Aravena
New Contributor II

Could you help me solve it? What part of code do you need to see what the error is?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Carolina,

   The utils.js that step 2 tells you to modify, should look like this.

define([
    'dojo/_base/lang',
    'dojo/_base/array',
    'dojo/_base/html',
    'dojo/_base/sniff',
    'dojo/_base/config',
    'dojo/io-query',
    'dojo/query',
    'dojo/NodeList-traverse',
    'dojo/Deferred',
    'dojo/promise/all',
    'dojo/on',
    'dojo/json',
    'dojo/cookie',
    'dojo/number',
    'dojo/date/locale',
    'dojo/i18n!dojo/cldr/nls/number',
    'dojox/encoding/base64',
    'esri/lang',
    'moment/moment',
    'esri/arcgis/utils',
    'esri/dijit/PopupTemplate',
    'esri/SpatialReference',
    'esri/geometry/Extent',
    'esri/geometry/geometryEngine',
    'esri/geometry/Multipoint',
    'esri/geometry/Polyline',
    'esri/geometry/Polygon',
    'esri/geometry/webMercatorUtils',
    'esri/tasks/GeometryService',
    'esri/tasks/ProjectParameters',
    'esri/tasks/FeatureSet',
    'esri/symbols/PictureMarkerSymbol',
    'esri/urlUtils',
    'esri/request',
    'esri/tasks/query',
    'esri/tasks/QueryTask',
    'esri/graphicsUtils',
    'esri/IdentityManager',
    'esri/arcgis/OAuthInfo',
    'jimu/portalUrlUtils',
    './shared/utils',
    './accessibleUtils',
    './zoomToUtils',
    'dojo/dnd/Moveable',
    'dojo/dom-class',
    'libs/caja-html-sanitizer-minified'
  ],

function(lang, array, html, has, config, ioQuery, query, nlt, Deferred, all, on, json, cookie,
  dojoNumber, dateLocale, nlsBundle, base64, esriLang, moment, arcgisUtils, PopupTemplate, SpatialReference,
  Extent, geometryEngine, Multipoint, Polyline, Polygon, webMercatorUtils, GeometryService, ProjectParameters,
  FeatureSet, PictureMarkerSymbol, esriUrlUtils, esriRequest, EsriQuery, QueryTask, graphicsUtils, IdentityManager,
  OAuthInfo, portalUrlUtils, sharedUtils, accessibleUtils, zoomToUtils, Moveable, domClass
) {
CarolinaAguilar_Aravena
New Contributor II

I thought my code was the same as yours, but I copy your code and it worked and my problem was solved. Thanks

0 Kudos
ЭрикНазаров
New Contributor II

Hello! Please help me! I did everything in accordance with these recommendations, but still nothing comes out. In the file "utils.js "there is no "mo.createwebapp", there is only "e.create a web map." I also changed it there and nothing worked out.

0 Kudos