-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tileImge的crossOrigin问题 #826
Comments
谢谢~ 方便提供一下出错的tile服务的url不? |
wms地址:http://bj.smartmall.gaiais.com:8090/iserver/services/cacheMap_UGCV5_KB/wms111/全国数据 |
另外,我还有一个问题,marker可以设置三维效果的样式吗?比如立体效果的柱子,柱子添加阴影效果等,我参考的demo是http://maptalks.org/examples/cn/animation/marker-anim/#animation_marker-anim。 |
@fuzhenn 顺便问下关于crossOrigin的问题,项目中遇到离线访问地图服务的情况,因此会直接把切片放到前端代码根目录,我通过file协议直接访问,此时为非跨域请求瓦片,无论我如何设置crossOrigin,图片请求的origin都是null,导致报跨域错误 |
我的问题调用超图的iServer wms就不行,调用geoserver的就可以了,好奇怪。最后没有办法用geoserver重新发布了一遍iServer的wms服务 |
@AllanHao symbol的属性表(readme里有链接): crossOrigin出错估计是iServer对crossOrigin的支持和geoserver不同,我晚点会找时间看一下 |
噢,对了,三维的效果可以看一下maptalks.three插件 |
@fuzhenn 好的,谢谢 |
image设置了crossOrigin属性后,超图服务会直接返回网络错误(net::ERR_FAILED),没有http错误码也没有任何报错信息,看上去是超图服务对crossOrigin的处理逻辑有bug。 我修改了一下程序,现在能通过手动把crossOrigin设成undefined(默认是null)来覆盖掉原有的crossOrigin默认值。 |
maptalks v0.42.1
我请求瓦片数据报“ Access to image at 'xxx' from origin 'xxx' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource"的错,通过调试,
在TileLayerGLRenderer的loadTileImage函数中,有一句
tileImage.crossOrigin = this.layer.options['crossOrigin'] || '';
我把这句去掉就解决了。
通过调试openlayers源码,发现如果crossOrigin没有设置,没有赋默认值。
最后,感谢大神做出这么牛逼的地图库~~~
The text was updated successfully, but these errors were encountered: