Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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)
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);
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
}
});
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);