mirror of https://gitee.com/antv-l7/antv-l7
fix: mapbox 光照问题
This commit is contained in:
parent
7d4d82c792
commit
6190b1403a
|
@ -3,33 +3,72 @@ title: ChangeLog
|
|||
order: 10
|
||||
---
|
||||
|
||||
## 2020.03.12 2.1 正式版
|
||||
|
||||
###✨ Features
|
||||
|
||||
• 新增 l7-react 版本
|
||||
• 可自定义样式的聚合图 MakerLayer
|
||||
• 新增 quantile、quantize 度量
|
||||
• 地图导出功能
|
||||
|
||||
### 🍏 Improvements
|
||||
|
||||
• IE 11 支持
|
||||
• 更新拾取机制,拾取更高效
|
||||
• 优化依赖包减少包体积
|
||||
|
||||
### 🐞 Bug Fixes
|
||||
|
||||
• setData 更新机制
|
||||
• color,size,shape 更新重绘问题
|
||||
|
||||
## 2020.01.06 2.0 正式版
|
||||
|
||||
[Github](https://github.com/antvis/L7) https://github.com/antvis/L7 欢迎 Star
|
||||
|
||||
###✨ Features
|
||||
|
||||
• 新增弧线图,路径图动画功能
|
||||
|
||||
• 新增气泡图水波动画功能
|
||||
|
||||
• 新增聚合地图
|
||||
|
||||
• 新增文本标注,支持避让
|
||||
|
||||
• 新增城市建筑图层
|
||||
|
||||
• 新增栅格地图,支持卫星遥感数据可视化
|
||||
|
||||
• 新增图层交互事件
|
||||
|
||||
### 🍏 Improvements
|
||||
|
||||
• Marker 支持事件和自定义数据
|
||||
|
||||
• 弧线支持虚线样式
|
||||
|
||||
• 面图层支持,文本标注,气泡图效果
|
||||
|
||||
• 重构了文档结构
|
||||
|
||||
• source 支持 map,join,filter 数据处理支持
|
||||
|
||||
• source 支持数据更新
|
||||
|
||||
• 支持 blend 效果配置
|
||||
|
||||
• 支持通过地图实例初始化地图
|
||||
|
||||
• 官网新增所有图表概览页面
|
||||
|
||||
### 🐞 Bug Fixes
|
||||
|
||||
• 修复容器 resize 不能正常响应
|
||||
|
||||
• 修复 babel 打包问题
|
||||
|
||||
• 修复地图组件加载报错问题
|
||||
|
||||
• 修复样式配置 strokeColor- stroke
|
||||
|
|
|
@ -3,6 +3,26 @@ title: 发布日志
|
|||
order: 10
|
||||
---
|
||||
|
||||
## 2020.03.12 2.1 正式版
|
||||
|
||||
###✨ Features
|
||||
|
||||
• 新增 l7-react 版本
|
||||
• 可自定义样式的聚合图 MakerLayer
|
||||
• 新增 quantile、quantize 度量
|
||||
• 地图导出功能
|
||||
|
||||
### 🍏 Improvements
|
||||
|
||||
• IE 11 支持
|
||||
• 更新拾取机制,拾取更高效
|
||||
• 优化依赖包减少包体积
|
||||
|
||||
### 🐞 Bug Fixes
|
||||
|
||||
• setData 更新机制
|
||||
• color,size,shape 更新重绘问题
|
||||
|
||||
## 2020.01.06 2.0 正式版
|
||||
|
||||
[Github](https://github.com/antvis/L7) https://github.com/antvis/L7 欢迎 Star
|
||||
|
|
|
@ -25,6 +25,14 @@ shape 支持
|
|||
|
||||
```
|
||||
|
||||
## source
|
||||
|
||||
点数据类型,根据经纬点绘制图形,目前支持三种数据结构
|
||||
|
||||
- [GeoJSON]('../../../../source/geojson/#point')
|
||||
- [CSV](../../../../source/csv/#parser)
|
||||
- [JSON](../../../../source/json/#点数据)
|
||||
|
||||
**图片标注**
|
||||
|
||||
通过 `Scene.addImage()` 可以添加图片资源,
|
||||
|
|
|
@ -29,9 +29,9 @@ shape 支持
|
|||
|
||||
点数据类型,根据经纬点绘制图形,目前支持三种数据结构
|
||||
|
||||
- [GeoJOSN]('../source/geojson/#point')
|
||||
- [CSV]()
|
||||
- [JSON](../source/json/#点数据)
|
||||
- [GeoJSON]('../../../../source/geojson/#point')
|
||||
- [CSV](../../../../source/csv/#parser)
|
||||
- [JSON](../../../../source/json/#点数据)
|
||||
|
||||
**图片标注**
|
||||
|
||||
|
|
|
@ -13,13 +13,13 @@ import { MapboxScene, AmapScene } from '@antv/l7-react';
|
|||
|
||||
## Scene Props
|
||||
|
||||
| prop name | Type | Default | Description |
|
||||
| ------------- | ---------- | ---------- | -------------------------------------- |
|
||||
| style | `Object` | `null` | scene css 样式 |
|
||||
| className | `string` | `null` | 样式名称 |
|
||||
| map | `Object` | `Required` | map option [地图配置项]() |
|
||||
| option | `Object` | `void` | scene option 配置项 [详情](#map-props) |
|
||||
| onSceneLoaded | `Function` | `void` | scene 加载回调函数 |
|
||||
| prop name | Type | Default | Description |
|
||||
| ------------- | -------------- | ---------- | -------------------------------------- |
|
||||
| style | `Object` | `null` | scene css 样式 |
|
||||
| className | `string` | `null` | 样式名称 |
|
||||
| map | `map option` | `Required` | map option [地图配置项]() |
|
||||
| option | `scene option` | `void` | scene option 配置项 [详情](#map-props) |
|
||||
| onSceneLoaded | `Function` | `void` | scene 加载回调函数 |
|
||||
|
||||
### 高德地图场景
|
||||
|
||||
|
|
|
@ -335,6 +335,14 @@ scene.removeLayer(layer);
|
|||
|
||||
- `layer` {Layer}
|
||||
|
||||
### exportMap
|
||||
|
||||
导出地图,目前仅支持导出可视化层,不支持底图导出
|
||||
|
||||
- 参数 type `png|jpg` 默认 png
|
||||
|
||||
scene.exportMap('png')
|
||||
|
||||
## 事件
|
||||
|
||||
### on
|
||||
|
|
|
@ -347,6 +347,14 @@ scene.removeLayer(layer);
|
|||
|
||||
- `layer` {Layer}
|
||||
|
||||
### exportMap
|
||||
|
||||
导出地图,目前仅支持导出可视化层,不支持底图导出
|
||||
|
||||
- 参数 type `png|jpg` 默认 png
|
||||
|
||||
scene.exportMap('png')
|
||||
|
||||
## 事件
|
||||
|
||||
### on
|
||||
|
|
|
@ -264,6 +264,8 @@ const World = React.memo(function Map() {
|
|||
}}
|
||||
style={{
|
||||
opacity: 1,
|
||||
strokeOpacity: 0,
|
||||
strokeWidth: 0,
|
||||
}}
|
||||
>
|
||||
<LayerEvent type="mousemove" handler={showPopup} />
|
||||
|
|
|
@ -90,6 +90,7 @@ const World = React.memo(function Map() {
|
|||
}}
|
||||
style={{
|
||||
position: 'absolute',
|
||||
background:'#fff', // 地图背景色
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
|
@ -118,7 +119,7 @@ const World = React.memo(function Map() {
|
|||
},
|
||||
}}
|
||||
color={{
|
||||
field: 'confirmedCount',
|
||||
field: 'confirmedCount', // 填充颜色
|
||||
values: [
|
||||
'#732200',
|
||||
'#CC3D00',
|
||||
|
@ -144,7 +145,7 @@ const World = React.memo(function Map() {
|
|||
values: 0.6,
|
||||
}}
|
||||
color={{
|
||||
values: '#f00',
|
||||
values: '#f00', // 描边颜色
|
||||
}}
|
||||
shape={{
|
||||
values: 'line',
|
||||
|
|
|
@ -83,7 +83,7 @@ module.exports = {
|
|||
zh: 'React 组件',
|
||||
en: 'react component'
|
||||
},
|
||||
order: 6
|
||||
order: 2
|
||||
},
|
||||
{
|
||||
slug: 'api/layer',
|
||||
|
@ -91,7 +91,7 @@ module.exports = {
|
|||
zh: '图层 Layer',
|
||||
en: 'Layer'
|
||||
},
|
||||
order: 3
|
||||
order: 4
|
||||
},
|
||||
{
|
||||
slug: 'api/layer/point_layer',
|
||||
|
@ -155,7 +155,7 @@ module.exports = {
|
|||
zh: '数据 Source',
|
||||
en: 'Source'
|
||||
},
|
||||
order: 4
|
||||
order: 5
|
||||
},
|
||||
{
|
||||
slug: 'api/component',
|
||||
|
@ -163,7 +163,7 @@ module.exports = {
|
|||
zh: '组件 Component',
|
||||
en: 'Component'
|
||||
},
|
||||
order: 5
|
||||
order: 6
|
||||
}
|
||||
],
|
||||
examples: [
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
.l7-marker {
|
||||
|
|
|
@ -93,6 +93,7 @@ export default class Marker extends EventEmitter {
|
|||
if (this.popup) {
|
||||
this.popup.setLnglat(this.lngLat);
|
||||
}
|
||||
this.update();
|
||||
return this;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ float calc_lighting(vec4 pos) {
|
|||
// //cal light weight
|
||||
vec3 viewDir = normalize(u_CameraPosition - worldPos);
|
||||
|
||||
vec3 lightDir = normalize(reverse_offset_normal(vec3(1, 10.5, 12)));
|
||||
vec3 lightDir = normalize(vec3(1, -10.5, 12));
|
||||
|
||||
vec3 halfDir = normalize(viewDir+lightDir);
|
||||
// //lambert
|
||||
|
|
|
@ -6,9 +6,9 @@ export const MapTheme: {
|
|||
normal: 'mapbox://styles/mapbox/streets-v11',
|
||||
blank: {
|
||||
version: 8,
|
||||
sprite: 'https://lzxue.github.io/font-glyphs/sprite/sprite',
|
||||
glyphs:
|
||||
'https://gw.alipayobjects.com/os/antvdemo/assets/mapbox/glyphs/{fontstack}/{range}.pbf',
|
||||
// sprite: 'https://lzxue.github.io/font-glyphs/sprite/sprite',
|
||||
// glyphs:
|
||||
// 'https://gw.alipayobjects.com/os/antvdemo/assets/mapbox/glyphs/{fontstack}/{range}.pbf',
|
||||
sources: {},
|
||||
layers: [
|
||||
{
|
||||
|
|
|
@ -107,6 +107,10 @@ class Scene
|
|||
return this.sceneService.exportPng(type);
|
||||
}
|
||||
|
||||
public exportMap(type?: 'png' | 'jpg'): string {
|
||||
return this.sceneService.exportPng(type);
|
||||
}
|
||||
|
||||
public get map() {
|
||||
return this.mapService.map;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { LineLayer, Scene } from '@antv/l7';
|
||||
import { Mapbox } from '@antv/l7-maps';
|
||||
import { Mapbox, GaodeMap } from '@antv/l7-maps';
|
||||
import * as React from 'react';
|
||||
|
||||
export default class DashLineDemo extends React.Component {
|
||||
|
|
Loading…
Reference in New Issue