mirror of https://gitee.com/antv-l7/antv-l7
fix: mapbox 光照问题
This commit is contained in:
parent
7d4d82c792
commit
d58f604ca3
|
@ -2,6 +2,24 @@
|
|||
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 正式版
|
||||
|
||||
|
|
|
@ -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/#点数据)
|
||||
|
||||
**图片标注**
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ import { MapboxScene, AmapScene } from '@antv/l7-react';
|
|||
| ------------- | ---------- | ---------- | -------------------------------------- |
|
||||
| style | `Object` | `null` | scene css 样式 |
|
||||
| className | `string` | `null` | 样式名称 |
|
||||
| map | `Object` | `Required` | map option [地图配置项]() |
|
||||
| option | `Object` | `void` | scene option 配置项 [详情](#map-props) |
|
||||
| map | ` map option` | `Required` | map option [地图配置项]() |
|
||||
| option | `scene option` | `void` | scene option 配置项 [详情](#map-props) |
|
||||
| onSceneLoaded | `Function` | `void` | scene 加载回调函数 |
|
||||
|
||||
### 高德地图场景
|
||||
|
|
|
@ -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',
|
||||
|
|
|
@ -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