agnostic-maps
Advanced tools
Comparing version 1.1.4 to 1.1.5
{ | ||
"name": "agnostic-maps", | ||
"version": "1.1.4", | ||
"version": "1.1.5", | ||
"description": "A set of wrappers for modern maps API e.g. Open Street Maps and Yandex", | ||
@@ -26,4 +26,4 @@ "keywords": [ | ||
"leaflet.icon.glyph": "^0.2.1", | ||
"ymaps-loader": "^1.0.4" | ||
"ymaps-loader": "^1.0.5" | ||
} | ||
} |
@@ -29,3 +29,3 @@ /* global ymaps */ | ||
for (let i = 1; i < waypoints.length; i++) { // eslint-disable-line no-plusplus | ||
for (var i = 1; i < waypoints.length; i++) { // eslint-disable-line no-plusplus | ||
lines.push({ | ||
@@ -32,0 +32,0 @@ type: 'LineString', |
@@ -0,1 +1,7 @@ | ||
const getExtremum = function(extremumType) { | ||
return function (extremum, number) { | ||
return Math[extremumType](extremum, number); | ||
}; | ||
}; | ||
module.exports.getExtremePoints = function (bounds) { | ||
@@ -6,7 +12,7 @@ const lats = bounds.map(function (item) { return item.lat; }); | ||
return { | ||
min: { lat: Math.min(...lats), lon: Math.min(...lons) }, | ||
max: { lat: Math.max(...lats), lon: Math.max(...lons) }, | ||
min: { lat: lats.reduce(getExtremum('min')), lon: lons.reduce(getExtremum('min')) }, | ||
max: { lat: lats.reduce(getExtremum('max')), lon: lons.reduce(getExtremum('max')) }, | ||
}; | ||
}; | ||
module.exports.getMainRoutePolylineColor = () => '#2b580c'; | ||
module.exports.getMainRoutePolylineColor = function () { return '#2b580c'; }; |
9871
1
150
Updatedymaps-loader@^1.0.5