Skip to content

Commit

Permalink
v 1.3.2 - let input waypoint to be a reference, instead of cloning
Browse files Browse the repository at this point in the history
  • Loading branch information
Daredzik committed Sep 25, 2019
1 parent 789d44c commit 413b69b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 21 deletions.
23 changes: 13 additions & 10 deletions dist/lrm-here.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
function corslite(url, callback, cors) {
var sent = false;

Expand Down Expand Up @@ -170,7 +170,7 @@ if (typeof module !== 'undefined' && module.exports) {

L.Routing.Here = L.Class.extend({
options: {
serviceUrl: 'https://route.cit.api.here.com/routing/7.2/calculateroute.json',
serviceUrl: 'https://route.api.here.com/routing/7.2/calculateroute.json',
timeout: 30 * 1000,
alternatives: 0,
mode: 'fastest;car;',
Expand Down Expand Up @@ -203,14 +203,17 @@ if (typeof module !== 'undefined' && module.exports) {
});
}, this.options.timeout);

for (i = 0; i < waypoints.length; i++) {
wp = waypoints[i];
wps.push({
latLng: wp.latLng,
name: wp.name,
options: wp.options
});
}
// for (i = 0; i < waypoints.length; i++) {
// wp = waypoints[i];
// wps.push({
// latLng: wp.latLng,
// name: wp.name,
// options: wp.options
// });
// }

// Let reference here, problem when reverse geocoding point took to long, didnt have name here
wps = waypoints;

corslite(url, L.bind(function (err, resp) {
var data;
Expand Down
Loading

0 comments on commit 413b69b

Please sign in to comment.