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

feat: 图片图层请求数据支持自定义参数 #2015

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

lvisei
Copy link
Member

@lvisei lvisei commented Nov 3, 2023

[English Template / 英文模板]

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 工作流程
  • 版本更新
  • 其他改动(是关于什么的改动?)

💡 需求背景和解决方案

图片图层在跨域请求的情况下不发送 cookies,现在允许图片图层在请求数据时自定义请求参数

带 cookies 使用方式如下:

const layer = new ImageLayer({})
.source(
    'https://gw.alipayobjects.com/zos/rmsportal/FnHFeFklTzKDdUESRNDv.jpg',
    {
      parser: {
        type: 'image',
        extent: [ 121.168, 30.2828, 121.384, 30.4219 ],
		requestParameters: { credentials: "include" }
      }
    }
  );

@lzxue lzxue merged commit 0284989 into master Nov 8, 2023
10 checks passed
@lzxue lzxue deleted the fix/image-layer-fetch branch November 8, 2023 08:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants