帖子
|
发生此错误是因为需要在库中加载require库时没有加载它。我想问你是否在你的代码中包含了对arcgis的依赖关系,因为我以前忘记添加依赖关系时遇到过这种情况。我会检查你拥有的任何其他使用ArcGIS库的自定义小部件,清单有正确的依赖集。如果仍然有问题,可以将此代码添加到index.html页面。在这里找到索引页。这是导致问题的代码,因为它试图访问窗口。在它可用之前需要。你可以用这个替换它。if (url. indexof (window.jimuConfig. arcgisjsapiurl) === 0 && url !== window.jimuConfig. arcgisjsapiurl + 'init.js') {let amdPath = url.replace(window.jimuConfig. arcgisjsapiurl) == 0 && url !arcgisJsApiUrl”);amdPath = amdPath.replace(/\.js$/, ");返回new Promise(function (resolve, reject) {if (window.require) {window.require)require([amdPath], function (m) { const reg = [[], function (_export) { _export({ default: m, __useDefault: true }); return { setters: [], execute: function () { _export('default', m); } }; }] resolve(reg); }) } else { setTimeout(function () { window.require([amdPath], function (m) { const reg = [[], function (_export) { _export({ default: m, __useDefault: true }); return { setters: [], execute: function () { _export('default', m); } }; }] resolve(reg); }) }, 1000) } }); } What this code does is check if window.require exists,if it does then continue. If not, wait one second, then try again. You could maybe change this to a while loop, but I've found one second was enough. I realise this is a bit of a hack, but if you are stuck and need a last resort then hopefully this helps. You would need to remember to add this in anytime you upgrade. But as its in the dist folder it gets copied out anytime you download the experience to be deployed.
…查看更多
2周前
|
0
|
0
|
43
|
帖子
|
一点都不麻烦!只是想避免混淆。干杯
…查看更多
02-08-2023需要点
|
0
|
0
|
55
|
帖子
|
澄清一下,我不是ExB团队的一员。我在鹰科技公司工作,是Esri在新西兰的经销商。我只是在ExB上构建了许多大型自定义解决方案。
…查看更多
02-08-2023上午11:37
|
0
|
2
|
78
|
帖子
|
嗨Paul,除非你在返回语句上设置了断点,例如console.log等,否则它将作为一个异步进程传递它,因此它将在后台运行代码,之后它将跳转到then/catch函数。尝试一下,看看你是否开始看到任何结果?干杯
…查看更多
02-02-2023下午02:52
|
0
|
1
|
70
|
帖子
|
不确定转换为QueriableDataSource(我没有在我的工作流中使用它),我转换为FeatureLayerDataSource,然后从那里查询。我要提出的另一个建议是,在承诺中始终包含一个catch,因为它将允许您看到服务器生成的任何错误,否则它们可能会无声地失败。请参见下面的代码片段let dsm = DataSourceManager.getInstance();//使用设置通过id获取数据源。let ds = dsm.getDataSource(this.props.useDataSources[1].dataSourceId) as FeatureLayerDataSource;//我没有为查询参数创建一个单独的对象,只是像ds那样传入它们。query({where: '1 = 1', returnGeometry: false, pageSize: 2}) .then((response) =>{//记录响应控制台. Log (response)}) . Catch ((error) =>{//捕捉任何问题并记录到控制台console.error(error)}) .finally(() => {console. Log('操作已完成')})希望这有帮助。干杯
…查看更多
02-02-202301:53点
|
1
|
0
|
74
|
帖子
|
嗨,这可能是因为共享问题或应用程序所依赖的层不再可用。所以要仔细检查资料来源。但是你可以做一个备份。您可以尝试执行以下操作。1.在ArcGIS Online中创建一个新的Experience Builder应用程序,使用什么模板并不重要,我们只需要一个应用程序。给它起一个像My App Copy 3这样的名字。保存应用,发布应用。如果原来的应用程序仍然正常工作,打开Chrome浏览器或Edge或Firefox。右键单击浏览器并选择inspect以打开开发控制台。 6. Select the network tab. 7. With the same window open, paste in the URL to the app ( not the new one we created, but the one you want to recover). 8. Once its loaded go back to the dev console and filter on data. There might be multiple entries, but it should be the first one. Click on the names to check the response. You want to find the one that has the app config, it should look like the below. With {"pages":{ etc 8. Copy the content out of the response and paste in to notepad. 9. Now open up ArcGIS Assistant https://assistant.esri-ps.com/ and sign in. 10. Find the new app that we created at the start, click it and then select View Item JSON 11. Select the Data tab 12.Click Edit JSON and copy in the config you copied to notepad above. 13. Then click save. 14. Go back to ArcGIS Online and try and edit the new app now. It should hopefully be a copy of the app that was broken. You could always try and grab the JSON for the original app from ArcGIS Assistant as well. If the problem still exists, its mnost likely a layer that the app relied on is no longer available.
…查看更多
01-25-202303:40点
|
0
|
2
|
217
|
帖子
|
因此,您将使用开箱即用的Esri托管打印服务和它提供的模板。这些模板(据我所知)没有北箭头,所以在输出中不会有。关于图例,地图中有哪些图层?如果它只是宿主贴图层,那么它可能不会显示这个,如果它被设置为基图。获取布局任务可在这里https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Get布局模板信息任务?F =json,但你不需要访问它,你应该能够配置小部件中可用的选项,通过选择一个模板。你的托管贴图层是公开可用的吗?如果是,你能把链接分享给我吗?我可以测试一下是否能打印出来。
…查看更多
01-25-202302:06点
|
1
|
1
|
62
|
帖子
|
只是几个简单的问题,1。托管瓷砖层是在AGOL还是在ArcGIS企业?2.您能提供您配置的打印服务的URL吗?,它是你自己的还是Esri托管的?打印小部件将创建一个ExportWebMap对象,并将该对象发送给打印服务。通常,当一个层没有出现在输出中,这是因为打印服务无法访问该层。
…查看更多
01-25-2023中午12点
|
0
|
3.
|
92
|
帖子
|
如果您想要与某个用户相关的所有详细信息,并且该用户已经登录,那么您可以通过调用门户/self端点来获得这些详细信息。这将返回用户的详细对象,包括用户权限和他们所属的组。示例代码:getUserDetails = (resp) => {let token = this.props.token;const userUrl = this.props.portalUrl + '/sharing/rest/community/self?token=' + token + '&f=json' fetch(userUrl,{})。然后(response => response.json())。then((data: any) => {this.parseGetUserDetails(data);}) //捕捉我们击中的任何错误并更新应用程序。Catch ((error: any) => {console.error(error);返回null;});}
…查看更多
01-11-2023上午11:09
|
1
|
1
|
162
|
帖子
|
你可以在回调中使用一个箭头函数,这将自动将外部作用域绑定到内部作用域,有点像旧的lang。在Web AppBuilder开发中使用。this.props.mapView.whenLayerView(layer).then((layerView) => {layerView. this. mapview . whenlayerview (layer).thenwatch("updating", (val) =>{//等待层视图完成更新if (!val) {layerView.queryExtent().then((response)=>{//查看层视图中所有图形的范围this.props.mapView.goTo(response.extent);});} });});我没有测试上面的,但我认为它应该工作,如果不ping我回来。另一件需要考虑的事情是将你的回调函数推到单独的函数中,因为这使代码更容易测试,如果你正在运行单元测试等。
…查看更多
12-30-202201:55点
|
0
|
0
|
75
|
标题 | 荣誉 | 发布 |
---|---|---|
1 | 02-02-202301:53点 | |
1 | 01-25-202302:06点 | |
1 | 01-11-2023上午11:09 | |
1 | 10-27-202211点 | |
1 | 11-28-202206:29点 |
在线状态 |
离线
|
最后到访日期 |
一周前
|