How to use the mapv.baiduMapAnimationLayer 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-list.js View on Github external
}

        if (!this.animationLayer && this.props.animation === true) {
            var splitList = this.props.splitList || {};
            splitList.other = this.props.fillStyle || 'rgba(50, 50, 255, 0.5)'
            var animationOptions = {
                styleType: 'stroke',
                strokeStyle: this.props.fillStyle || 'rgba(20, 249, 255, 0.5)',
                coordType: this.props.coordType,
                splitList: splitList,
                globalAlpha: 0.4,
                size: (this.props.multiple || this.props.mini) ? 20 : 26,
                minSize: (this.props.multiple || this.props.mini) ? 10 : 13,
                draw: 'category'
            };
            this.animationLayer = new baiduMapAnimationLayer(map, this.dataSet, animationOptions);
        }

        var projection = map.getMapType().getProjection();

        var data = this.props.data;
        var mapvData = [];
        for (var i = 0; i < data.length; i++) {
            if (this.props.showIndex !== undefined && this.props.showIndex != i) {
                continue;
            }

            if (data[i].location) {
                var location = data[i].location.split(',');
                if (this.props.coordType && this.props.coordType === 'bd09mc') {
                    var point = projection.pointToLngLat(new BMap.Pixel(location[0], location[1]));
                } else {
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
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'
            };
            this.layers.push(new baiduMapAnimationLayer(map, shadowSet, shadowOptions));
        }

        let circleOptions = {
            splitList: {
                1: '#80db69',
                4: '#d53938',
                3: '#fe6261',
                2: '#ffb02d'
            },
            fillStyle: 'red',
            coordType: 'bd09mc',
            size: 10,
            draw: 'category',
            methods: {
                click: function (item) {
                    if (item) {