UNPKG

@yaga/leaflet-ng2

Version:
19 lines 638 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.lng2lat = void 0; /** * 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 if (position.length && Array.isArray(position)) { return position.map((elem) => lng2lat(elem)); } throw new Error("Can not convert the given coordinates"); } exports.lng2lat = lng2lat; //# sourceMappingURL=lng2lat.js.map