How to use the mapv.DataSet 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 SuperMap / iClient-JavaScript / test / mapboxgl / overlay / MapvLayerSpec.js View on Github external
var citys = ["北京", "天津", "上海", "重庆", "石家庄", "太原", "呼和浩特", "哈尔滨", "长春", "沈阳", "济南", "南京", "合肥", "杭州", "南昌", "福州", "郑州", "武汉", "长沙", "广州", "南宁", "西安", "银川", "兰州", "西宁", "乌鲁木齐", "成都", "贵阳", "昆明", "拉萨", "海口"];
        // 构造数据
        while (randomCount--) {
            var cityCenter1 = utilCityCenter.getCenterByCityName(citys[parseInt(Math.random() * citys.length)]);
            var cityCenter2 = utilCityCenter.getCenterByCityName(citys[parseInt(Math.random() * citys.length)]);
            data.push({
                geometry: {
                    type: 'LineString',
                    coordinates: [[cityCenter1.lng - 1 + Math.random() * 1, cityCenter1.lat - 1 + Math.random() * 1],
                        [cityCenter2.lng - 1 + Math.random() * 1, cityCenter2.lat - 1 + Math.random() * 1]
                    ]
                },
                count: 30 * Math.random()
            });
        }
        dataSet = new DataSet(data);

        if (!map.getLayer("mapv")) {
            mapvLayer = new MapvLayer(map, dataSet, options);
        }
    });
    afterEach(() => {
github SuperMap / iclient-python / iclientpy / js / src / iclient.js View on Github external
refresh: function () {
        var mapvOptions = this.model.get('map_v_options')
        mapvOptions.size = this.model.get('size');
        mapvOptions.globalAlpha = this.model.get('global_alpha');
        mapvOptions.fillStyle = this.model.get('fill_style');
        mapvOptions.shadowColor = this.model.get('shadow_color');
        mapvOptions.shadowBlur = this.model.get('shadow_blur');
        // mapvOptions.lineWidth = this.model.get('line_width');
        var dataSet = this.model.get('data_set');
        var mapvDataSet = new mapv.DataSet(dataSet);
        this.obj.update({data: mapvDataSet, options: mapvOptions})
    },
github huiyan-fe / react-bmap / src / components / mapv-marker-list.js View on Github external
createLayers() {
        this._createLayer = true;
        var map = this.map;
        this.project = map.getMapType().getProjection();

        let self = this;
        let shadowSet = this.shadowSet = new DataSet([]);
        let circleSet = this.circleSet =  new DataSet([]);
        let textSet = this.textSet = new DataSet([]);
        let numSet = this.numSet = new DataSet([]);
        let otherSet = this.otherSet = new DataSet([]);
        let otherShadowSet = this.otherShadowSet = new DataSet([]);
        this.layers = [];

        let otherOptions = {
            coordType: 'bd09mc',
            splitList: {
                4: '#d53938',
                3: '#fe6261',
                2: '#ffb02d',
                other: '#80db69'
            },
            shadowBlur: 10,
            size: 5,
            max: 30,
            methods: {
                click: function (item) {
github huiyan-fe / react-bmap / src / components / mapv-marker-list.js View on Github external
createLayers() {
        this._createLayer = true;
        var map = this.map;
        this.project = map.getMapType().getProjection();

        let self = this;
        let shadowSet = this.shadowSet = new DataSet([]);
        let circleSet = this.circleSet =  new DataSet([]);
        let textSet = this.textSet = new DataSet([]);
        let numSet = this.numSet = new DataSet([]);
        let otherSet = this.otherSet = new DataSet([]);
        let otherShadowSet = this.otherShadowSet = new DataSet([]);
        this.layers = [];

        let otherOptions = {
            coordType: 'bd09mc',
            splitList: {
                4: '#d53938',
                3: '#fe6261',
                2: '#ffb02d',
                other: '#80db69'
            },
            shadowBlur: 10,
            size: 5,
            max: 30,
            methods: {
                click: function (item) {
                    if (item) {
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
createLayers() {
        this._createLayer = true;
        var map = this.map;
        this.project = map.getMapType().getProjection();

        let self = this;
        let shadowSet = this.shadowSet = new DataSet([]);
        let circleSet = this.circleSet =  new DataSet([]);
        let textSet = this.textSet = new DataSet([]);
        let numSet = this.numSet = new DataSet([]);
        let otherSet = this.otherSet = new DataSet([]);
        let otherShadowSet = this.otherShadowSet = new DataSet([]);
        this.layers = [];

        let otherOptions = {
            coordType: 'bd09mc',
            splitList: {
                4: '#d53938',
                3: '#fe6261',
                2: '#ffb02d',
                other: '#80db69'
            },
            shadowBlur: 10,
            size: 5,
            max: 30,
            methods: {
github huiyan-fe / react-bmap / src / components / boundary.js View on Github external
initialize() {
        var map = this.props.map;
        if (!map) {
            return;
        }

        if (!this.mapvLayer) {
            this.dataSet = new DataSet([]);

            var options = this.props.layerOptions || {
                gradient: {
                    0: 'yellow',
                    1: 'red'
                },
                max: 100,
                globalAlpha: 0.8,
                draw: 'intensity'
            }

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

        this.getBoundaryData();
    }