首页 / 浏览问题 / WebGIS / 问题详情
getFeaturesByGeometry 提示跨域
4EXP 2022年02月28日
使用iclient for openlayers 中的   FeatureService.getFeaturesByGeometry 查询iserver 8c 发布的服务,提示跨域。该如何解决

Access to fetch at 'http://192.168.XXX.XXX:8090/iserver/services/map-XXX/rest/maps/PZPOINT/featureResults.json?returnContent=true&fromIndex=0&toIndex=19' from origin 'http://localhost:8080' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

1个回答

您好,iServer 8C已经过了我们的产品支持周期,建议您先升级一下产品版本,看看是否还会出现这个问题。
341EXP 2022年03月01日
...