mirror of https://gitee.com/antv-l7/antv-l7
fix(layer) getlegendcfg
This commit is contained in:
parent
6d7870e087
commit
889d0c0acb
|
@ -71,7 +71,7 @@ scene.on('loaded', () => {
|
||||||
})
|
})
|
||||||
.render();
|
.render();
|
||||||
console.log(circleLayer);
|
console.log(circleLayer);
|
||||||
var a = circleLayer.getLendgendCfg('type','color');
|
var a = circleLayer.getLegendCfg('type','color');
|
||||||
console.log(a);
|
console.log(a);
|
||||||
circleLayer.on('click',(e)=>{
|
circleLayer.on('click',(e)=>{
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@antv/l7",
|
"name": "@antv/l7",
|
||||||
"version": "1.1.3",
|
"version": "1.1.5",
|
||||||
"description": "Large-scale WebGL-powered Geospatial Data Visualization",
|
"description": "Large-scale WebGL-powered Geospatial Data Visualization",
|
||||||
"main": "build/l7.js",
|
"main": "build/l7.js",
|
||||||
"browser": "build/l7.js",
|
"browser": "build/l7.js",
|
||||||
|
|
|
@ -643,7 +643,7 @@ export default class Layer extends Base {
|
||||||
* @param {*} type 图例类型 color, size
|
* @param {*} type 图例类型 color, size
|
||||||
* @return {*} 图例配置项
|
* @return {*} 图例配置项
|
||||||
*/
|
*/
|
||||||
getLendgendCfg(field, type = 'color') {
|
getLegendCfg(field, type = 'color') {
|
||||||
// todo heatmap
|
// todo heatmap
|
||||||
if (this.type === 'heatmap' && this.shapeType === 'heatmap') {
|
if (this.type === 'heatmap' && this.shapeType === 'heatmap') {
|
||||||
return this.get('styleOptions').rampColors;
|
return this.get('styleOptions').rampColors;
|
||||||
|
|
Loading…
Reference in New Issue