map/client/cesium/utils/utils.style.js

Summary

Maintainability
B
4 hrs
Test Coverage

Showing 3 of 3 total issues

Function convertToCesiumFromStyle has 74 lines of code (exceeds 50 allowed). Consider refactoring.
Open

export function convertToCesiumFromStyle (feature, options) {
const style = _.get(feature, 'style', false)
if (!style || !_.get(feature, 'geometry')) return {}
 
let geometryType = _.get(GeoJsonGeometryTypesToCesiumEntityMappings, _.get(feature, 'geometry.type'))
Severity: Major
Found in map/client/cesium/utils/utils.style.js - About 1 hr to fix

    Function convertToCesiumObjects has a Cognitive Complexity of 29 (exceeds 20 allowed). Consider refactoring.
    Open

    export function convertToCesiumObjects (style) {
    const mapValue = (value) => {
    if (typeof value === 'object') {
    const type = value.type
    const options = value.options
    Severity: Minor
    Found in map/client/cesium/utils/utils.style.js - About 1 hr to fix

    Avoid too many return statements within this function.
    Open

    return value
    Severity: Major
    Found in map/client/cesium/utils/utils.style.js - About 30 mins to fix
      Category
      Status