此内容是否有用?
如何进行改进?
联系我们的支持团队
当用户单击 Web 地图上的要素时,系统会将 infoWindow 弹出窗口设置为在指针所在位置打开,且该弹出窗口不可移动。 此行为是有意设计的。 然而,该行为有时会遮挡其他要素并破坏视图。
提供的说明描述了如何使 Web AppBuilder for ArcGIS 中的弹出窗口通过鼠标光标拖动窗口进行移动。
请按照以下步骤、使用指定的 Dojo 工具包在弹出窗口中启用拖放功能。 需要对 Web AppBuilder for ArcGIS 中的两个基本文件进行编辑:
@import url("panels/LaunchpadPanel/style.css"); .esriPopupWrapper .title { cursor: move; } .esriPopup .hidden { display: none !important;
define([ ... 'dojo/dnd/Moveable', 'dojo/dom-class', ... ],
mo.createWebMap = function(portalUrl, itemId, mapDiv, /* optional */ options) { portalUrl = portalUrlUtils.getStandardPortalUrl(portalUrl); var itemUrl = portalUrlUtils.getBaseItemUrl(portalUrl); arcgisUtils.arcgisUrl = itemUrl; var def = arcgisUtils.createMap(itemId, mapDiv, options); def.then(function (response){ var map = response.map; var handle = query(".title", map.infoWindow.domNode)[0]; var dnd = new Moveable(map.infoWindow.domNode, { handle: handle }); }); return def; };
上次修改时间: 12/4/2020
文章 ID: 000015175
软件: Web AppBuilder for ArcGIS(开发人员版) 2.9, 2.8, 2.7, 2.6, 2.5, 2.4, 2.3, 2.2, 2.18, 2.17, 2.16, 2.15, 2.14, 2.13, 2.12, 2.11, 2.10, 2.1, 2.0