ang-google-services
Advanced tools
Comparing version 1.0.4 to 1.0.5
{ | ||
"name": "ang-google-services", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Consuming google's APIs services", | ||
@@ -5,0 +5,0 @@ "main": "./src/module.js", |
{ | ||
"name": "ang-google-services", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Consuming google's APIs services", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -126,3 +126,2 @@ (function($A, $G) { | ||
var $PathPolyline = new $G.maps.Polyline({ | ||
path: $Paths, | ||
@@ -134,3 +133,2 @@ geodesic: options['geodesic'] || true, | ||
map: $Map | ||
}); | ||
@@ -148,3 +146,3 @@ | ||
var $PolylineObj = polylineObj || undefined; | ||
if ($PolylineObj) if (typeof $PolylineObj['setMap'] == 'function') $PolylineObj['setMap'](null); | ||
@@ -195,5 +193,6 @@ } | ||
if (status == $G.maps.GeocoderStatus.OK) { | ||
results.$input = options; | ||
$Deffered.resolve(results, options); | ||
} else { | ||
$Deffered.reject(results, options); | ||
$Deffered.reject({ status: status, message: "There something wrong due to " + status, $input: options}, options); | ||
} | ||
@@ -284,9 +283,8 @@ | ||
$GeocodeService.geocode({'location' : options['coords'] || {lat: null, lng: null } }, function(results, status) { | ||
if (status == $G.maps.GeocoderStatus.OK) { | ||
results.$input = options; | ||
$Defer.resolve(results, options); | ||
} else { | ||
$Defer.reject({error: status, message: 'Failed to get the result ' + status}, options); | ||
} | ||
$Deffered.reject({ status: status, message: "There something wrong due to " + status, $input: options}, options); | ||
} | ||
}); | ||
@@ -308,4 +306,4 @@ | ||
$GeocodeService.geocode({'address' : options['address'] || '' }, function(results, status) { | ||
if (status == $G.maps.GeocoderStatus.OK) { | ||
results.$input = options; | ||
$Defer.resolve(results, options); | ||
@@ -315,6 +313,6 @@ } else { | ||
status: status, | ||
message: "There something wrong due to " + status | ||
message: "There something wrong due to " + status, | ||
$input: options | ||
}, options); | ||
} | ||
}); | ||
@@ -333,5 +331,3 @@ | ||
for (var index = 0, length = $SeperatedField.length; index < length; index++) { | ||
$ObjStr += '["' + $SeperatedField[index] + '"]'; | ||
} | ||
@@ -386,3 +382,2 @@ | ||
}, function(response, status) { | ||
if (status == $G.maps.DistanceMatrixStatus.OK) { | ||
@@ -407,2 +402,3 @@ var $Summary = mapReduceDistance(response.rows[0].elements || undefined, "distance.value", function(prevValue, value, $Summary) { | ||
}); | ||
response.$input = options; | ||
$Defer.resolve({ | ||
@@ -415,5 +411,6 @@ response: response, | ||
status: status, | ||
message: "There something wrong " + status | ||
message: "There something wrong " + status, | ||
$input: options | ||
}, options); | ||
} | ||
} | ||
}); | ||
@@ -420,0 +417,0 @@ |
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
2607116
462