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: 新增 RasterTileLayer 栅格瓦片图层 #1092

Merged
merged 26 commits into from
May 9, 2022

Conversation

lvisei
Copy link
Member

@lvisei lvisei commented May 1, 2022

Checklist
  • npm test passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines

Description of change

  • 新增栅格瓦片 Source 类型
  • 在 RasterLayer 中新增栅格瓦片图层
  • ImageLayer 的 Source 新增支持 HTMLImageElement
  • 升级 storybook

使用方式

import { Scene, RasterLayer } from '@antv/l7';
import { Map } from '@antv/l7-maps';

const scene = new Scene({
  id: 'map',
  map: new Map({
    center: [ 90.268, 40.3628 ],
    zoom: 3
  })
});

scene.on('loaded', () => {
  const layer = new RasterLayer({
    zIndex: 1
  });
  layer.source(
    'https://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x={x}&y={y}&z={z}',
    {
      parser: {
        type: 'rasterTile',
        tileSize: 256,
        minZoom: 2,
        maxZoom: 18,
        zoomOffset: 0
      }
    }
  );

  scene.addLayer(layer);
});

特性

  • 支持瓦片增量更新渲染,避免加载闪烁
  • 支持对称子午线地图重复,瓦片连贯显示

image

后续 Action

详细内容🔗

@github-actions
Copy link
Contributor

github-actions bot commented May 1, 2022

😭 Deploy PR Preview 54ec29c failed. Build logs

🤖 By surge-preview

@github-actions github-actions bot added feature and removed feature labels May 9, 2022
Copy link
Contributor

@lzxue lzxue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

通过

Copy link
Contributor

@lzxue lzxue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

后续新增文档部分

@yiiiiiiqianyao yiiiiiiqianyao merged commit c5b3e22 into master May 9, 2022
@yiiiiiiqianyao yiiiiiiqianyao deleted the feat/raster-tile-layer branch May 9, 2022 07:10
@github-actions github-actions bot added feature and removed feature labels May 9, 2022
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.

3 participants