' +\n\t\t\t\t\t\terror.message + '
= 1000) {\n\t\t\t\t\tdata = {\n\t\t\t\t\t\tvalue: round(d / 1609.344, sensitivity),\n\t\t\t\t\t\tunit: un.miles\n\t\t\t\t\t};\n\t\t\t\t} else {\n\t\t\t\t\tdata = {\n\t\t\t\t\t\tvalue: round(yards, sensitivity),\n\t\t\t\t\t\tunit: un.yards\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tv = round(d, sensitivity);\n\t\t\t\tdata = {\n\t\t\t\t\tvalue: v >= 1000 ? (v / 1000) : v,\n\t\t\t\t\tunit: v >= 1000 ? un.kilometers : un.meters\n\t\t\t\t};\n\t\t\t}\n\n\t\t\tif (simpleRounding) {\n\t\t\t\tdata.value = data.value.toFixed(-sensitivity);\n\t\t\t}\n\n\t\t\treturn L.Util.template(this.options.distanceTemplate, data);\n\t\t},\n\n\t\t_round: function(d, sensitivity) {\n\t\t\tvar s = sensitivity || this.options.roundingSensitivity,\n\t\t\t\tpow10 = Math.pow(10, (Math.floor(d / s) + '').length - 1),\n\t\t\t\tr = Math.floor(d / pow10),\n\t\t\t\tp = (r > 5) ? pow10 : pow10 / 2;\n\n\t\t\treturn Math.round(d / p) * p;\n\t\t},\n\n\t\tformatTime: function(t /* Number (seconds) */) {\n\t\t\tvar un = this.options.unitNames || this._localization.localize('units');\n\t\t\t// More than 30 seconds precision looks ridiculous\n\t\t\tt = Math.round(t / 30) * 30;\n\n\t\t\tif (t > 86400) {\n\t\t\t\treturn Math.round(t / 3600) + ' ' + un.hours;\n\t\t\t} else if (t > 3600) {\n\t\t\t\treturn Math.floor(t / 3600) + ' ' + un.hours + ' ' +\n\t\t\t\t\tMath.round((t % 3600) / 60) + ' ' + un.minutes;\n\t\t\t} else if (t > 300) {\n\t\t\t\treturn Math.round(t / 60) + ' ' + un.minutes;\n\t\t\t} else if (t > 60) {\n\t\t\t\treturn Math.floor(t / 60) + ' ' + un.minutes +\n\t\t\t\t\t(t % 60 !== 0 ? ' ' + (t % 60) + ' ' + un.seconds : '');\n\t\t\t} else {\n\t\t\t\treturn t + ' ' + un.seconds;\n\t\t\t}\n\t\t},\n\n\t\tformatInstruction: function(instr, i) {\n\t\t\tif (instr.text === undefined) {\n\t\t\t\treturn this.capitalize(L.Util.template(this._getInstructionTemplate(instr, i),\n\t\t\t\t\tL.extend({}, instr, {\n\t\t\t\t\t\texitStr: instr.exit ? this._localization.localize('formatOrder')(instr.exit) : '',\n\t\t\t\t\t\tdir: this._localization.localize(['directions', instr.direction]),\n\t\t\t\t\t\tmodifier: this._localization.localize(['directions', instr.modifier])\n\t\t\t\t\t})));\n\t\t\t} else {\n\t\t\t\treturn instr.text;\n\t\t\t}\n\t\t},\n\n\t\tgetIconName: function(instr, i) {\n\t\t\tswitch (instr.type) {\n\t\t\tcase 'Head':\n\t\t\t\tif (i === 0) {\n\t\t\t\t\treturn 'depart';\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'WaypointReached':\n\t\t\t\treturn 'via';\n\t\t\tcase 'Roundabout':\n\t\t\t\treturn 'enter-roundabout';\n\t\t\tcase 'DestinationReached':\n\t\t\t\treturn 'arrive';\n\t\t\t}\n\n\t\t\tswitch (instr.modifier) {\n\t\t\tcase 'Straight':\n\t\t\t\treturn 'continue';\n\t\t\tcase 'SlightRight':\n\t\t\t\treturn 'bear-right';\n\t\t\tcase 'Right':\n\t\t\t\treturn 'turn-right';\n\t\t\tcase 'SharpRight':\n\t\t\t\treturn 'sharp-right';\n\t\t\tcase 'TurnAround':\n\t\t\tcase 'Uturn':\n\t\t\t\treturn 'u-turn';\n\t\t\tcase 'SharpLeft':\n\t\t\t\treturn 'sharp-left';\n\t\t\tcase 'Left':\n\t\t\t\treturn 'turn-left';\n\t\t\tcase 'SlightLeft':\n\t\t\t\treturn 'bear-left';\n\t\t\t}\n\t\t},\n\n\t\tcapitalize: function(s) {\n\t\t\treturn s.charAt(0).toUpperCase() + s.substring(1);\n\t\t},\n\n\t\t_getInstructionTemplate: function(instr, i) {\n\t\t\tvar type = instr.type === 'Straight' ? (i === 0 ? 'Head' : 'Continue') : instr.type,\n\t\t\t\tstrings = this._localization.localize(['instructions', type]);\n\n\t\t\tif (!strings) {\n\t\t\t\tstrings = [\n\t\t\t\t\tthis._localization.localize(['directions', type]),\n\t\t\t\t\t' ' + this._localization.localize(['instructions', 'Onto'])\n\t\t\t\t];\n\t\t\t}\n\n\t\t\treturn strings[0] + (strings.length > 1 && instr.road ? strings[1] : '');\n\t\t}\n\t});\n})();\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"./localization\":57}],52:[function(_dereq_,module,exports){\n(function (global){\n(function() {\n\t'use strict';\n\n\tvar L = (typeof window !== \"undefined\" ? window['L'] : typeof global !== \"undefined\" ? global['L'] : null);\n\tvar Autocomplete = _dereq_('./autocomplete');\n\tvar Localization = _dereq_('./localization');\n\n\tfunction selectInputText(input) {\n\t\tif (input.setSelectionRange) {\n\t\t\t// On iOS, select() doesn't work\n\t\t\tinput.setSelectionRange(0, 9999);\n\t\t} else {\n\t\t\t// On at least IE8, setSeleectionRange doesn't exist\n\t\t\tinput.select();\n\t\t}\n\t}\n\n\tmodule.exports = L.Class.extend({\n\t\tincludes: ((typeof L.Evented !== 'undefined' && L.Evented.prototype) || L.Mixin.Events),\n\n\t\toptions: {\n\t\t\tcreateGeocoder: function(i, nWps, options) {\n\t\t\t\tvar container = L.DomUtil.create('div', 'leaflet-routing-geocoder'),\n\t\t\t\t\tinput = L.DomUtil.create('input', '', container),\n\t\t\t\t\tremove = options.addWaypoints ? L.DomUtil.create('span', 'leaflet-routing-remove-waypoint', container) : undefined;\n\n\t\t\t\tinput.disabled = !options.addWaypoints;\n\n\t\t\t\treturn {\n\t\t\t\t\tcontainer: container,\n\t\t\t\t\tinput: input,\n\t\t\t\t\tcloseButton: remove\n\t\t\t\t};\n\t\t\t},\n\t\t\tgeocoderPlaceholder: function(i, numberWaypoints, geocoderElement) {\n\t\t\t\tvar l = new Localization(geocoderElement.options.language).localize('ui');\n\t\t\t\treturn i === 0 ?\n\t\t\t\t\tl.startPlaceholder :\n\t\t\t\t\t(i < numberWaypoints - 1 ?\n\t\t\t\t\t\tL.Util.template(l.viaPlaceholder, {viaNumber: i}) :\n\t\t\t\t\t\tl.endPlaceholder);\n\t\t\t},\n\n\t\t\tgeocoderClass: function() {\n\t\t\t\treturn '';\n\t\t\t},\n\n\t\t\twaypointNameFallback: function(latLng) {\n\t\t\t\tvar ns = latLng.lat < 0 ? 'S' : 'N',\n\t\t\t\t\tew = latLng.lng < 0 ? 'W' : 'E',\n\t\t\t\t\tlat = (Math.round(Math.abs(latLng.lat) * 10000) / 10000).toString(),\n\t\t\t\t\tlng = (Math.round(Math.abs(latLng.lng) * 10000) / 10000).toString();\n\t\t\t\treturn ns + lat + ', ' + ew + lng;\n\t\t\t},\n\t\t\tmaxGeocoderTolerance: 200,\n\t\t\tautocompleteOptions: {},\n\t\t\tlanguage: 'en',\n\t\t},\n\n\t\tinitialize: function(wp, i, nWps, options) {\n\t\t\tL.setOptions(this, options);\n\n\t\t\tvar g = this.options.createGeocoder(i, nWps, this.options),\n\t\t\t\tcloseButton = g.closeButton,\n\t\t\t\tgeocoderInput = g.input;\n\t\t\tgeocoderInput.setAttribute('placeholder', this.options.geocoderPlaceholder(i, nWps, this));\n\t\t\tgeocoderInput.className = this.options.geocoderClass(i, nWps);\n\n\t\t\tthis._element = g;\n\t\t\tthis._waypoint = wp;\n\n\t\t\tthis.update();\n\t\t\t// This has to be here, or geocoder's value will not be properly\n\t\t\t// initialized.\n\t\t\t// TODO: look into why and make _updateWaypointName fix this.\n\t\t\tgeocoderInput.value = wp.name;\n\n\t\t\tL.DomEvent.addListener(geocoderInput, 'click', function() {\n\t\t\t\tselectInputText(this);\n\t\t\t}, geocoderInput);\n\n\t\t\tif (closeButton) {\n\t\t\t\tL.DomEvent.addListener(closeButton, 'click', function() {\n\t\t\t\t\tthis.fire('delete', { waypoint: this._waypoint });\n\t\t\t\t}, this);\n\t\t\t}\n\n\t\t\tnew Autocomplete(geocoderInput, function(r) {\n\t\t\t\t\tgeocoderInput.value = r.name;\n\t\t\t\t\twp.name = r.name;\n\t\t\t\t\twp.latLng = r.center;\n\t\t\t\t\tthis.fire('geocoded', { waypoint: wp, value: r });\n\t\t\t\t}, this, L.extend({\n\t\t\t\t\tresultFn: this.options.geocoder.geocode,\n\t\t\t\t\tresultContext: this.options.geocoder,\n\t\t\t\t\tautocompleteFn: this.options.geocoder.suggest,\n\t\t\t\t\tautocompleteContext: this.options.geocoder\n\t\t\t\t}, this.options.autocompleteOptions));\n\t\t},\n\n\t\tgetContainer: function() {\n\t\t\treturn this._element.container;\n\t\t},\n\n\t\tsetValue: function(v) {\n\t\t\tthis._element.input.value = v;\n\t\t},\n\n\t\tupdate: function(force) {\n\t\t\tvar wp = this._waypoint,\n\t\t\t\twpCoords;\n\n\t\t\twp.name = wp.name || '';\n\n\t\t\tif (wp.latLng && (force || !wp.name)) {\n\t\t\t\twpCoords = this.options.waypointNameFallback(wp.latLng);\n\t\t\t\tif (this.options.geocoder && this.options.geocoder.reverse) {\n\t\t\t\t\tthis.options.geocoder.reverse(wp.latLng, 67108864 /* zoom 18 */, function(rs) {\n\t\t\t\t\t\tif (rs.length > 0 && rs[0].center.distanceTo(wp.latLng) < this.options.maxGeocoderTolerance) {\n\t\t\t\t\t\t\twp.name = rs[0].name;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\twp.name = wpCoords;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis._update();\n\t\t\t\t\t}, this);\n\t\t\t\t} else {\n\t\t\t\t\twp.name = wpCoords;\n\t\t\t\t\tthis._update();\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\n\t\tfocus: function() {\n\t\t\tvar input = this._element.input;\n\t\t\tinput.focus();\n\t\t\tselectInputText(input);\n\t\t},\n\n\t\t_update: function() {\n\t\t\tvar wp = this._waypoint,\n\t\t\t value = wp && wp.name ? wp.name : '';\n\t\t\tthis.setValue(value);\n\t\t\tthis.fire('reversegeocoded', {waypoint: wp, value: value});\n\t\t}\n\t});\n})();\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"./autocomplete\":48,\"./localization\":57}],53:[function(_dereq_,module,exports){\n(function (global){\nvar L = (typeof window !== \"undefined\" ? window['L'] : typeof global !== \"undefined\" ? global['L'] : null),\n Control = _dereq_('./control'),\n Itinerary = _dereq_('./itinerary'),\n Line = _dereq_('./line'),\n OSRMv1 = _dereq_('./osrm-v1'),\n Plan = _dereq_('./plan'),\n Waypoint = _dereq_('./waypoint'),\n Autocomplete = _dereq_('./autocomplete'),\n Formatter = _dereq_('./formatter'),\n GeocoderElement = _dereq_('./geocoder-element'),\n Localization = _dereq_('./localization'),\n ItineraryBuilder = _dereq_('./itinerary-builder'),\n Mapbox = _dereq_('./mapbox'),\n ErrorControl = _dereq_('./error-control');\n\nL.routing = {\n control: function(options) { return new Control(options); },\n itinerary: function(options) {\n return Itinerary(options);\n },\n line: function(route, options) {\n return new Line(route, options);\n },\n plan: function(waypoints, options) {\n return new Plan(waypoints, options);\n },\n waypoint: function(latLng, name, options) {\n return new Waypoint(latLng, name, options);\n },\n osrmv1: function(options) {\n return new OSRMv1(options);\n },\n localization: function(options) {\n return new Localization(options);\n },\n formatter: function(options) {\n return new Formatter(options);\n },\n geocoderElement: function(wp, i, nWps, plan) {\n return new L.Routing.GeocoderElement(wp, i, nWps, plan);\n },\n itineraryBuilder: function(options) {\n return new ItineraryBuilder(options);\n },\n mapbox: function(accessToken, options) {\n return new Mapbox(accessToken, options);\n },\n errorControl: function(routingControl, options) {\n return new ErrorControl(routingControl, options);\n },\n autocomplete: function(elem, callback, context, options) {\n return new Autocomplete(elem, callback, context, options);\n }\n};\n\nmodule.exports = L.Routing = {\n Control: Control,\n Itinerary: Itinerary,\n Line: Line,\n OSRMv1: OSRMv1,\n Plan: Plan,\n Waypoint: Waypoint,\n Autocomplete: Autocomplete,\n Formatter: Formatter,\n GeocoderElement: GeocoderElement,\n Localization: Localization,\n Formatter: Formatter,\n ItineraryBuilder: ItineraryBuilder,\n\n // Legacy; remove these in next major release\n control: L.routing.control,\n itinerary: L.routing.itinerary,\n line: L.routing.line,\n plan: L.routing.plan,\n waypoint: L.routing.waypoint,\n osrmv1: L.routing.osrmv1,\n geocoderElement: L.routing.geocoderElement,\n mapbox: L.routing.mapbox,\n errorControl: L.routing.errorControl,\n};\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{\"./autocomplete\":48,\"./control\":49,\"./error-control\":50,\"./formatter\":51,\"./geocoder-element\":52,\"./itinerary\":55,\"./itinerary-builder\":54,\"./line\":56,\"./localization\":57,\"./mapbox\":58,\"./osrm-v1\":59,\"./plan\":60,\"./waypoint\":61}],54:[function(_dereq_,module,exports){\n(function (global){\n(function() {\n\t'use strict';\n\n\tvar L = (typeof window !== \"undefined\" ? window['L'] : typeof global !== \"undefined\" ? global['L'] : null);\n\n\tmodule.exports = L.Class.extend({\n\t\toptions: {\n\t\t\tcontainerClassName: ''\n\t\t},\n\n\t\tinitialize: function(options) {\n\t\t\tL.setOptions(this, options);\n\t\t},\n\n\t\tcreateContainer: function(className) {\n\t\t\tvar table = L.DomUtil.create('table', (className || '') + ' ' + this.options.containerClassName),\n\t\t\t\tcolgroup = L.DomUtil.create('colgroup', '', table);\n\n\t\t\tL.DomUtil.create('col', 'leaflet-routing-instruction-icon', colgroup);\n\t\t\tL.DomUtil.create('col', 'leaflet-routing-instruction-text', colgroup);\n\t\t\tL.DomUtil.create('col', 'leaflet-routing-instruction-distance', colgroup);\n\n\t\t\treturn table;\n\t\t},\n\n\t\tcreateStepsContainer: function() {\n\t\t\treturn L.DomUtil.create('tbody', '');\n\t\t},\n\n\t\tcreateStep: function(text, distance, icon, steps) {\n\t\t\tvar row = L.DomUtil.create('tr', '', steps),\n\t\t\t\tspan,\n\t\t\t\ttd;\n\t\t\ttd = L.DomUtil.create('td', '', row);\n\t\t\tspan = L.DomUtil.create('span', 'leaflet-routing-icon leaflet-routing-icon-'+icon, td);\n\t\t\ttd.appendChild(span);\n\t\t\ttd = L.DomUtil.create('td', '', row);\n\t\t\ttd.appendChild(document.createTextNode(text));\n\t\t\ttd = L.DomUtil.create('td', '', row);\n\t\t\ttd.appendChild(document.createTextNode(distance));\n\t\t\treturn row;\n\t\t}\n\t});\n})();\n\n}).call(this,typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : typeof window !== \"undefined\" ? window : {})\n},{}],55:[function(_dereq_,module,exports){\n(function (global){\n(function() {\n\t'use strict';\n\n\tvar L = (typeof window !== \"undefined\" ? window['L'] : typeof global !== \"undefined\" ? global['L'] : null);\n\tvar Formatter = _dereq_('./formatter');\n\tvar ItineraryBuilder = _dereq_('./itinerary-builder');\n\n\tmodule.exports = L.Control.extend({\n\t\tincludes: ((typeof L.Evented !== 'undefined' && L.Evented.prototype) || L.Mixin.Events),\n\n\t\toptions: {\n\t\t\tpointMarkerStyle: {\n\t\t\t\tradius: 5,\n\t\t\t\tcolor: '#03f',\n\t\t\t\tfillColor: 'white',\n\t\t\t\topacity: 1,\n\t\t\t\tfillOpacity: 0.7\n\t\t\t},\n\t\t\tsummaryTemplate: 'Ruta | \r\nDescripción | \r\nConductor | \r\nPlaca | \r\nDistancia Total | \r\nTiempo Total | \r\nFecha y Hora Ruta | \r\nEstado | \r\nAcciones | \r\n
---|---|---|---|---|---|---|---|---|
{{ item.nombreRuta }} | \r\n{{ item.descripcionRuta }} | \r\n{{ item.nombres + ' ' + item.apellidos }} | \r\n{{ item.placa }} | \r\n{{ item.distanciaTotalRecorrida }} | \r\n{{ item.tiempoTotalRecorrido }} | \r\n{{ item.fechaHoraInicioRuta | timeSince }} | \r\n{{ item.estadoRuta }} | \r\n\r\n | \r\n
{{ header }} | \r\n
---|
{{ item[key] }} | \r\n
{{ header }} | \r\nOpciones | \r\n
---|---|
{{ formatItemValue(item[key]) }} | \r\n\r\n | \r\n