ngcc-tdt / demo

天地图示例代码
58 stars 50 forks source link

官网demo都有错误,本机也有这个错误 #2

Open strivezsh opened 4 years ago

strivezsh commented 4 years ago

Access to XMLHttpRequest at 'https://t4.tianditu.gov.cn/mapservice/GetTiles?lxys=3,2,0&tk=5d22d49fdc586cb5caed68bfb12d1e6b' from origin 'http://api.tianditu.gov.cn' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.

wlfei0502 commented 3 years ago

http://api.tianditu.gov.cn/cdn/demo/sanwei/index.html

yippee2015 commented 3 years ago

也碰到No 'Access-Control-Allow-Origin' header is present on the requested resource. 跨域这个问题

yippee2015 commented 3 years ago

请问这个问题如何解决?@wlfei0502

wlfei0502 commented 3 years ago

加群:243901516(天地图API群),截个图,我让运维看一下

icehong commented 3 years ago

需要注册一下,申请许可。 “为了保证天地图地理信息公共服务的稳定可靠,更好地为广大用户提供地理信息应用开发支持,即日起天地图API及服务接口调用都需要申请开发许可(Key)。您可以在天地图API网站控制台免费注册申请。”