all files / lib/ lng2lat.js

100% Statements 9/9
87.5% Branches 7/8
100% Functions 1/1
100% Lines 9/9
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20            287× 186×   101× 101× 101× 247×   101×      
"use strict";
/**
 * Function to convert from Lng-Lat format from geoJSON to LatLng on Leaflet
 */
/* tslint:disable:max-line-length */
function lng2lat(position) {
    /* tslint:enable */
    if (position.length > 0 && typeof position[0] === 'number') {
        return [position[1], position[0]];
    }
    else Eif (position.length && Array.prototype.isPrototypeOf(position)) {
        var arr = [];
        for (var i = 0; i < position.length; i += 1) {
            arr.push(lng2lat(position[i]));
        }
        return arr;
    }
}
exports.lng2lat = lng2lat;
//# sourceMappingURL=lng2lat.js.map