【问题标题】:Getting CORS error while integrating WMS esri Layers in Angular application在 Angular 应用程序中集成 WMS esri 层时出现 CORS 错误
【发布时间】:2022-10-24 14:39:06
【问题描述】:

在我的角度应用程序中加载 WMS 层时,我的以下代码出现 CORS 错误。 任何建议都会有所帮助。

const roadFlowLine = new WMSLayer({
    url: '${EndPoint.env.CGIS_URL}/flowlinewms/GetCapabilities?service=WMS&version=1.3.0&request=GetCapabilities',
    title: 'Road-Network',
  });

enter image description here

【问题讨论】:

    标签: angular cors gis esri wms


    【解决方案1】:

    您要添加应用程序的 WMS 地址未针对 CORS 进行配置。 WMS 地址必须同源。

    如果您是目标 WMS 的所有者,请进行以下设置:

    对于国际空间站: https://enable-cors.org/server_iis6.html

    对于 Apache Tomcat: https://enable-cors.org/server_tomcat.html

    【讨论】:

      猜你喜欢
      • 2021-11-16
      • 2018-10-06
      • 1970-01-01
      • 2020-03-03
      • 2021-01-27
      • 1970-01-01
      • 2019-12-25
      • 1970-01-01
      • 2018-01-01
      相关资源
      最近更新 更多