Files
maps-saas/apps/api/dist/common/gis.utils.js
T

21 lines
651 B
JavaScript

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.JORDAN_BOUNDS = void 0;
exports.isWithinJordan = isWithinJordan;
exports.mockMapMatch = mockMapMatch;
exports.JORDAN_BOUNDS = {
minLat: 29.1,
maxLat: 33.4,
minLng: 34.9,
maxLng: 39.3,
};
function isWithinJordan(lat, lng) {
return (lat >= exports.JORDAN_BOUNDS.minLat &&
lat <= exports.JORDAN_BOUNDS.maxLat &&
lng >= exports.JORDAN_BOUNDS.minLng &&
lng <= exports.JORDAN_BOUNDS.maxLng);
}
function mockMapMatch(lat, lng) {
return `osm_way_${Math.floor(Math.random() * 1000000)}`;
}
//# sourceMappingURL=gis.utils.js.map