How to use the mapv.utilCurve.getPoints 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 / thick-ray.js View on Github external
this.props.data.forEach((item, index) => {
                var fromCenter = item.from.point || utilCityCenter.getCenterByCityName(item.from.city);
                var toCenter = item.to.point || utilCityCenter.getCenterByCityName(item.to.city);
                var curve = utilCurve.getPoints([fromCenter, toCenter]);

                if (this.props.coordType === 'bd09mc') {
                    points.push(projection.pointToLngLat(new BMap.Pixel(fromCenter.lng, fromCenter.lat)));
                    points.push(projection.pointToLngLat(new BMap.Pixel(toCenter.lng, toCenter.lat)));
                } else {
                    points.push(fromCenter);
                    points.push(toCenter);
                }

                var intensity = new utilDataRangeIntensity({
                    maxSize: 10,
                    minSize: 1,
                    min: this.props.min || 0,
                    max: this.props.max || 1000
                });
                var lineWidth = intensity.getSize(item.count)
github SuperMap / iClient-JavaScript / src / mapboxgl / overlay / mapv / MapvDataSet.js View on Github external
endPoints.map(function (data) {
                var coords = data.geometry && data.geometry.coordinates;
                var toCenter = {lng: coords[0], lat: coords[1]};
                var fromCenter = {lng: center[0], lat: center[1]};
                var cv = utilCurve.getPoints([fromCenter, toCenter]);
                for (var j = 0; j < cv.length; j++) {
                    timeData.push({
                        geometry: {
                            type: 'Point',
                            coordinates: cv[j]
                        },
                        time: j
                    });
                }
                return data
            });
            return new DataSet(timeData);
github huiyan-fe / react-bmap / src / components / arc.js View on Github external
this.props.data.forEach((item, index) => {
                var fromCenter = item.from.point || utilCityCenter.getCenterByCityName(item.from.city);
                var toCenter = item.to.point || utilCityCenter.getCenterByCityName(item.to.city);
                var curve = utilCurve.getPoints([fromCenter, toCenter]);

                if (this.props.coordType === 'bd09mc') {
                    points.push(projection.pointToLngLat(new BMap.Pixel(fromCenter.lng, fromCenter.lat)));
                    points.push(projection.pointToLngLat(new BMap.Pixel(toCenter.lng, toCenter.lat)));
                } else {
                    points.push(fromCenter);
                    points.push(toCenter);
                }

                lineData.push({
                    strokeStyle: item.color,
                    geometry: {
                        type: 'LineString',
                        coordinates: curve
                    }
                });
github SuperMap / iClient-JavaScript / src / mapboxgl / overlay / mapv / MapvDataSet.js View on Github external
LinePoints.map(function (data) {
                var coords = data.geometry && data.geometry.coordinates;
                var toCenter = {lng: coords[0], lat: coords[1]};
                var fromCenter = {lng: startPoint[0], lat: startPoint[1]};
                var cv = utilCurve.getPoints([fromCenter, toCenter]);
                lineData.push({
                    geometry: {
                        type: 'LineString',
                        coordinates: cv
                    }
                });
                return data;
            });
            return new DataSet(lineData);