app/service/Map.js
File Map.js
has 537 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*eslint angular/di: [2,"array"]*/
/*eslint angular/document-service: 2*/
/*eslint max-len: [2,100]*/
/**
* Map service
Function buildMapLayers
has 64 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function buildMapLayers(layerConfig) {
var layer,
layers = [];
if (angular.isArray(layerConfig)) {
Function createHeatMapSource
has 59 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function createHeatMapSource(hmParams) {
var counts_ints2D = hmParams.counts_ints2D,
gridLevel = hmParams.gridLevel,
gridColumns = hmParams.columns,
gridRows = hmParams.rows,
Function init
has 56 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
service.init = function(config) {
var viewConfig = angular.extend(defaults.view,
config.mapConfig.view),
rendererConfig = config.mapConfig.renderer ?
config.mapConfig.renderer : defaults.renderer,
Function getCurrentExtent
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
service.getCurrentExtent = function(){
var viewProj = service.getMapProjection(),
extent = service.getMapView().calculateExtent(service.getMapSize()),
extentWgs84 = ol.proj.transformExtent(extent, viewProj, 'EPSG:4326'),
transformInteractionLayer = service.
Function createOrUpdateHeatMapLayer
has 31 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
service.createOrUpdateHeatMapLayer = function(hmData) {
var existingHeatMapLayers, transformInteractionLayer, olVecSrc, newHeatMapLayer;
hmData.heatmapRadius = 20;
hmData.blur = 6;
Avoid too many return
statements within this function. Open
Open
return scaledValue;