Skip to content
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

地图加载一服务存在跨域问题 #2390

Open
liangyuan1 opened this issue Sep 5, 2024 · 4 comments
Open

地图加载一服务存在跨域问题 #2390

liangyuan1 opened this issue Sep 5, 2024 · 4 comments
Assignees
Labels

Comments

@liangyuan1
Copy link

地图加载一服务存在跨域问题,例如天地图,和geoserver发布的服务,但是同样的地址在opnlayer和cesium中请求不存在跨域问题

@jailln
Copy link
Contributor

jailln commented Sep 5, 2024

Can you provide more details about your bug please ?

@liangyuan1
Copy link
Author

Can you provide more details about your bug please ?

var orthoSource1 = new itowns.WMTSSource({
url: 'http://t0.tianditu.gov.cn/img_w/wmts?tk=6e3de5b9cfca24b0f43d7c431acf56b9',
crs: 'EPSG:3857',
name: 'img',
tileMatrixSet: 'w',
format: 'tiles',
style: 'default',
})
var orthoLayer1 = new itowns.ColorLayer('Ortho1', {
source: orthoSource1,
})
view.addLayer(orthoLayer1)
image

@AnthonyGlt
Copy link
Contributor

Thank you for the issue.
Could you type in English please ? :)
As far as I understand, you are getting CORS issues on iTowns but for the same url you don't have issue on cesium ?

@liangyuan1
Copy link
Author

Thank you for the issue.
Could you type in English please ? :)
As far as I understand, you are getting CORS issues on iTowns but for the same url you don't have issue on cesium ?

Yes, using the same service on both Cesium and Openlayer did not encounter cross domain issues

@jailln jailln assigned mgermerie, Desplandis and jailln and unassigned mgermerie Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants