Closed lifefriend closed 5 years ago
天地图现在已经全部服务需要申请 key 才可以使用,瓦片服务只需在 tileUrl 后加一个 tk 参数即可
@lifefriend 你可以看看你的瓦片请求错误,状态码应该是 418
@lifefriend adding a retry strategy to TileLayer is definitely a good idea. Could you submit a pull request to me?
tileRetryCount
to TileLayer's optionsTileLayerCanvasRenderer
's onTileError
methodThanks!
@fuzhenn A pull request has been made in the hope that it does not break your code structure
chrome71 , maptalks v0.42.2
tianditu api was changed, the example of epsg4326(http://maptalks.org/examples/en/tilelayer-projection/epsg4326/#tilelayer-projection_epsg4326) is blank
old: http://t{s}.tianditu.com/DataServer?T=vec_c&x={x}&y={y}&l={z} new: http://t{s}.tianditu.gov.cn/DataServer?T=vec_c&tk=YOUR_KEY&x={x}&y={y}&l={z}
in the new api,random white patches appear on the map
Here's the amendment I've tried.
white patches disappear