How to use the mapv.baiduMapLayer function in mapv

To help you get started, we’ve selected a few mapv examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github huiyan-fe / react-bmap / src / components / marker-order.js View on Github external
}, {
                        number: item.number
                    });
                }
            }

            this.pointLayer = new baiduMapLayer(map, this.dataSet, options);


            var options = {
                fillStyle: 'white',
                size: 12,
                textKey: 'number',
                draw: 'text'
            }
            this.numberLayer = new baiduMapLayer(map, this.dataSet, options);
        }

        var data = this.props.data;
        var points = [];
        for (var i = 0; i < data.length; i++) {
            if (data[i].location) {
                var location = data[i].location.split(',');
                points.push(new BMap.Point(location[0], location[1]));
                data[i].geometry = {
                    type: 'Point',
                    coordinates: [location[0], location[1]]
                };
                data[i].number = i + 1;
            }
        }
        this.dataSet.set(data);
github huiyan-fe / react-bmap / src / components / arc.js View on Github external
createLayers() {

        this._createLayer = true;
        var map = this.map;

        let self = this;
        this.lineDataSet = new DataSet([]);
        this.lineLayer = new baiduMapLayer(map, this.lineDataSet, {});

        this.pointDataSet = new DataSet([]);
        this.pointLayer = new baiduMapLayer(map, this.pointDataSet, {});

        this.textLayer = new baiduMapLayer(map, this.pointDataSet, {});

        if (this.props.enableAnimation) {
            this.animationLayer = new baiduMapAnimationLayer(map, this.lineDataSet, {});
        }

    }
github huiyan-fe / react-bmap / src / components / mapv-marker-list.js View on Github external
splitList: {
                4: '#d53938',
                3: '#fe6261',
                2: '#ffb02d',
                1: '#80db69'
            },
            styleType: 'fill',
            globalAlpha: 0.4,
            coordType: 'bd09mc',
            size: 8,
            minSize: 5,
            draw: 'category'
        };
        this.layers.push(new baiduMapLayer(map, otherShadowSet, otherShadowOptions));
        
        this.layers.push(new baiduMapLayer(map, otherSet, otherOptions));

        if (this.props.animation === true) {
            let shadowOptions = {
                splitList: {
                    4: '#d53938',
                    3: '#fe6261',
                    2: '#ffb02d',
                    1: '#80db69'
                },
                styleType: 'stroke',
                globalAlpha: 0.4,
                coordType: 'bd09mc',
                size: 20,
                minSize: 10,
                draw: 'category'
            };
github huiyan-fe / react-bmap / src / components / thick-ray.js View on Github external
createLayers() {

        this._createLayer = true;
        var map = this.map;

        let self = this;
        this.lineDataSet = new DataSet([]);
        this.lineLayer = new baiduMapLayer(map, this.lineDataSet, {});

        this.pointDataSet = new DataSet([]);
        this.pointLayer = new baiduMapLayer(map, this.pointDataSet, {});

        this.textLayer = new baiduMapLayer(map, this.pointDataSet, {});

    }
github huiyan-fe / react-bmap / src / components / mapv-layer.js View on Github external
createLayers() {
        this._createLayer = true;
        var map = this.map;

        let self = this;
        let dataSet = this.dataSet = new DataSet([]);
        this.layer = new baiduMapLayer(map, dataSet, {});

    }
github huiyan-fe / react-bmap / src / components / arc.js View on Github external
createLayers() {

        this._createLayer = true;
        var map = this.map;

        let self = this;
        this.lineDataSet = new DataSet([]);
        this.lineLayer = new baiduMapLayer(map, this.lineDataSet, {});

        this.pointDataSet = new DataSet([]);
        this.pointLayer = new baiduMapLayer(map, this.pointDataSet, {});

        this.textLayer = new baiduMapLayer(map, this.pointDataSet, {});

        if (this.props.enableAnimation) {
            this.animationLayer = new baiduMapAnimationLayer(map, this.lineDataSet, {});
        }

    }
github huiyan-fe / react-bmap / src / components / mapv-marker-list.js View on Github external
self.map.setDefaultCursor('pointer');
                        circleSet.update(function(item) {
                            item.fillStyle = '#1495ff';
                        }, {
                            id: item.id
                        });
                    } else {
                        self.isBigPath = false;
                        if (!self.isBigPath && !self.isSmallPath) {
                            self.map.setDefaultCursor('auto');
                        }
                    }
                }
            },
        };
        this.layers.push(new baiduMapLayer(map, circleSet, circleOptions));

        let numOptions = {
            coordType: 'bd09mc',
            draw: 'text',
            font: '13px Arial',
            fillStyle: '#ffffff',
            shadowColor: '#ffffff',
            shadowBlur: 10
        }
        this.layers.push(new baiduMapLayer(map, numSet, numOptions));


        let textOptions = {
            coordType: 'bd09mc',
            font: '13px Arial',
            fillStyle: '#666',