Showing 28 of 69 total issues
File hpneo.gmaps.js
has 1686 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
(function(root, factory) {
if(typeof exports === 'object') {
module.exports = factory();
}
else if(typeof define === 'function' && define.amd) {
Function GMaps
has 258 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var GMaps = (function(global) {
"use strict";
var doc = document;
Function GMaps
has 254 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var GMaps = function(options) {
if (!this) return new GMaps(options);
options.zoom = options.zoom || 15;
options.mapType = options.mapType || 'roadmap';
Function staticMapURL
has 169 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
GMaps.staticMapURL = function(options){
var parameters = [],
data,
static_root = 'https://maps.googleapis.com/maps/api/staticmap';
Function drawOverlay
has 92 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
GMaps.prototype.drawOverlay = function(options) {
var overlay = new google.maps.OverlayView(),
auto_show = true;
overlay.setMap(this.map);
File front.js
has 307 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* global $this: true */
/* eslint no-unused-vars: ["error", { "varsIgnorePattern": "animationsSlider" }] */
if ($.cookie('themeCSSpath')) {
$('link#theme-stylesheet').attr('href', $.cookie('themeCSSpath'))
Function createMarker
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
GMaps.prototype.createMarker = function(options) {
if (options.lat == undefined && options.lng == undefined && options.position == undefined) {
throw 'No latitude or longitude defined.';
}
Function addLayer
has 66 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
GMaps.prototype.addLayer = function(layerName, options) {
//var default_layers = ['weather', 'clouds', 'traffic', 'transit', 'bicycling', 'panoramio', 'places'];
options = options || {};
var layer;
Function map
has 55 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function map () {
if ($('#map').length) {
var lat = $('#gmap-lat').val()
var lng = $('#gmap-lng').val()
var direction = $('#gmap-dir').val()
Function getRoutes
has 52 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
GMaps.prototype.getRoutes = function(options) {
switch (options.travelMode) {
case 'bicycling':
travelMode = google.maps.TravelMode.BICYCLING;
break;
Consider simplifying this complex logical expression. Open
Open
if ($('.owl-carousel').length) {
$('.customers').owlCarousel({
items: ($('.customers').attr('data-items') || 6),
slideSpeed: ($('.customers').attr('data-slide-speed') || 2000),
paginationSpeed: ($('.customers').attr('data-pagination-speed') || 1000),
Consider simplifying this complex logical expression. Open
Open
if (options.search || options.nearbySearch || options.radarSearch) {
var placeSearchRequest = {
bounds : options.bounds || null,
keyword : options.keyword || null,
location : options.location || null,
Function drawSteppedRoute
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
GMaps.prototype.drawSteppedRoute = function(options) {
var self = this;
if (options.origin && options.destination) {
this.getRoutes({
Function drawPolyline
has 49 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
GMaps.prototype.drawPolyline = function(options) {
var path = [],
points = options.path;
if (points.length) {
Function travelRoute
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
GMaps.prototype.travelRoute = function(options) {
if (options.origin && options.destination) {
this.getRoutes({
origin: options.origin,
destination: options.destination,
Function draw
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
overlay.draw = function() {
var projection = this.getProjection(),
pixel = projection.fromLatLngToDivPixel(new google.maps.LatLng(options.lat, options.lng));
options.horizontalOffset = options.horizontalOffset || 0;
Function createControl
has 36 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
GMaps.prototype.createControl = function(options) {
var control = document.createElement('div');
control.style.cursor = 'pointer';
Function sliders
has 35 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
function sliders () {
if ($('.owl-carousel').length) {
$('.customers').owlCarousel({
items: ($('.customers').attr('data-items') || 6),
slideSpeed: ($('.customers').attr('data-slide-speed') || 2000),
Function onAdd
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
overlay.onAdd = function() {
var el = document.createElement('div');
el.style.borderStyle = "none";
el.style.borderWidth = "0px";
Function getElevations
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
GMaps.prototype.getElevations = function(options) {
options = extend_object({
locations: [],
path : false,
samples : 256