ang-google-maps
Advanced tools
Comparing version 1.4.1 to 1.4.2
{ | ||
"name": "ang-google-maps", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"homepage": "https://github.com/khalednobani/ang-google-maps", | ||
@@ -5,0 +5,0 @@ "description": "Initialise Google Maps, Set Location, Drop Pins, Get Connected Routes between the current location and the destination.", |
@@ -191,2 +191,3 @@ (function(ang) { | ||
$scope.handleDirectionChange = function($Leg, $parentScope, $Directions) { | ||
window.$Directions = $Directions; | ||
return; | ||
@@ -248,3 +249,2 @@ | ||
function reShapeWaypoints($list) { | ||
var $List = $list || [], | ||
@@ -261,3 +261,2 @@ $NewList = []; | ||
return $NewList; | ||
} | ||
@@ -264,0 +263,0 @@ |
{ | ||
"name": "ang-google-maps", | ||
"version": "1.4.1", | ||
"version": "1.4.2", | ||
"description": "Module to initialize Google Maps API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -43,2 +43,45 @@ (function(ang, g) { | ||
/** | ||
* Gets the overall paths from $Legs. | ||
*/ | ||
function getOverallPaths($Legs, $Options) { | ||
var $Legs = $Legs || [], | ||
$Options = $Options || {}, | ||
$Paths = []; | ||
// First iteration on legs | ||
for ( var index = 0, length = $Legs.length; index < length; index++) { | ||
var $Steps = ('steps' in $Legs[index]) ? $Legs[index]['steps'] : []; | ||
// Second iteration on steps | ||
(function($S) { | ||
for (var index2 = 0, length2 = $S.length; index2 < length2; index2++) { | ||
var $Path = ('path' in $S[index2]) ? $S[index2]['path'] : []; | ||
// Third iteration on path | ||
(function($P) { | ||
for (var index3 = 0, length3 = $P.length; index3 < length3; index3++) { | ||
var $Data = $P[index3]; | ||
$Paths.push({ | ||
lat: (typeof $Data['lat'] == 'function') ? $Data['lat']() : $Data['lat'], | ||
lng: (typeof $Data['lng'] == 'function') ? $Data['lng']() : $Data['lng'] | ||
}); | ||
} | ||
}($Path)); | ||
} | ||
}($Steps)); | ||
if ($Options['isSkipLast'] && index + 1 == length - 1) return $Paths; | ||
if (index + 1 == length) return $Paths; | ||
} | ||
} | ||
function processLegs($Directions, $Map) { | ||
@@ -303,2 +346,5 @@ | ||
// Attaches getOverallPaths into $Maps. | ||
$Maps.getOverallPaths = getOverallPaths; | ||
/** | ||
@@ -305,0 +351,0 @@ * Assign _$Marker service into map's object. |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
584198
1284