app/javascript/src/maps-search.js
Function initItineraryIndex
has 54 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const initItineraryIndex = function () {
indexItinerariesMapInit('#index-itineraries-map')
clearItineraries()
Function drawPath
has 47 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const drawPath = function (itinerary, strokeColor, strokeOpacity) {
if (strokeColor == null) { strokeColor = '#0000FF' }
if (strokeOpacity == null) { strokeOpacity = 0.45 }
icare.latLngBounds.extend(new google.maps.LatLng(itinerary.start_location.lat, itinerary.start_location.lng))
icare.latLngBounds.extend(new google.maps.LatLng(itinerary.end_location.lat, itinerary.end_location.lng))