@wikicasa-dev/utilities 1.0.21 → 1.0.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/DeviceDetectionUtils.cjs +1 -1
- package/dist/DeviceDetectionUtils.js +8 -7
- package/dist/MapUtils.cjs +1 -0
- package/dist/MapUtils.js +65 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +81 -73
- package/dist/utils/ArrayUtils.d.ts +1 -1
- package/dist/utils/DeviceDetectionUtils.d.ts +1 -0
- package/dist/utils/MapUtils.d.ts +17 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./types-D0iZP-MN.cjs"),n=()=>/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window?.MSStream,r=()=>/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator?.userAgent),o=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),s=()=>navigator?.userAgent.includes("Windows"),a=(t={sm:i.f.SMALL,md:i.f.MEDIUM,lg:i.f.LARGE,xl:i.f.EXTRA_LARGE})=>{const e=t;return window?.innerWidth<e.sm?"mobile":window?.innerWidth<e.lg?"tablet":"desktop"};exports.getCurrentDeviceSize=a;exports.isMobile=r;exports.isSafari=o;exports.isWindows=s;exports.isiOSDevice=n;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { f as i } from "./types-B0dZ7OiV.js";
|
|
2
|
-
const
|
|
3
|
-
navigator
|
|
4
|
-
), s = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent), a = (
|
|
2
|
+
const r = () => /iPad|iPhone|iPod/.test(navigator.userAgent) && !window?.MSStream, o = () => /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(
|
|
3
|
+
navigator?.userAgent
|
|
4
|
+
), s = () => /^((?!chrome|android).)*safari/i.test(navigator.userAgent), a = () => navigator?.userAgent.includes("Windows"), d = (n = {
|
|
5
5
|
sm: i.SMALL,
|
|
6
6
|
md: i.MEDIUM,
|
|
7
7
|
lg: i.LARGE,
|
|
8
8
|
xl: i.EXTRA_LARGE
|
|
9
9
|
}) => {
|
|
10
|
-
const e =
|
|
11
|
-
return window
|
|
10
|
+
const e = n;
|
|
11
|
+
return window?.innerWidth < e.sm ? "mobile" : window?.innerWidth < e.lg ? "tablet" : "desktop";
|
|
12
12
|
};
|
|
13
13
|
export {
|
|
14
|
-
|
|
14
|
+
d as getCurrentDeviceSize,
|
|
15
15
|
o as isMobile,
|
|
16
16
|
s as isSafari,
|
|
17
|
-
|
|
17
|
+
a as isWindows,
|
|
18
|
+
r as isiOSDevice
|
|
18
19
|
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("google-polyline");function i(t){if(!t)return;const n=t.match(/[-]?[\d]*[.]?[\d]+/g);if(!n)return;const e=[];for(let l=0;l<n.length;l++)e.push({lat:parseFloat(n[l+1]),lng:parseFloat(n[l])}),l++;return e}function c(t,n=!0){const e=[];t.forEach(o=>{e.push([o.lat,o.lng])});const l=r.encode(e);return n?encodeURIComponent(l):l}function g(t){const n={minY:t[0].lat,maxY:t[0].lat,minX:t[0].lng,maxX:t[0].lng};return t.forEach(e=>{n.minY=Math.min(n.minY,e.lat),n.maxY=Math.max(n.maxY,e.lat),n.minX=Math.min(n.minX,e.lng),n.maxX=Math.max(n.maxX,e.lng)}),n}function u(t){if(t.length<=0)return[];const n=new Set;return t.filter(l=>{const o=n.has(l.lat+l.lng),a=l.lat+l.lng;return n.add(a),!o})}function m(t){let n=0,e=0;for(let l=0;l<t.length;l++){const o=t[l];n+=o.lat,e+=o.lng}return{lat:n/t.length,lng:e/t.length}}function s(t){let n="POLYGON((";return t.forEach(e=>{n+=`${e.lng} ${e.lat}, `}),n+=`${t[0].lng} ${t[0].lat}))`,n}exports.calcPolygonCenter=m;exports.encodePolygon=c;exports.getMinMaxLatLng=g;exports.getPolygonString=s;exports.parsePoints=i;exports.removeDuplicatePoints=u;
|
package/dist/MapUtils.js
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { encode as o } from "google-polyline";
|
|
2
|
+
function c(t) {
|
|
3
|
+
if (!t)
|
|
4
|
+
return;
|
|
5
|
+
const n = t.match(/[-]?[\d]*[.]?[\d]+/g);
|
|
6
|
+
if (!n)
|
|
7
|
+
return;
|
|
8
|
+
const e = [];
|
|
9
|
+
for (let l = 0; l < n.length; l++)
|
|
10
|
+
e.push({
|
|
11
|
+
lat: parseFloat(n[l + 1]),
|
|
12
|
+
lng: parseFloat(n[l])
|
|
13
|
+
}), l++;
|
|
14
|
+
return e;
|
|
15
|
+
}
|
|
16
|
+
function u(t, n = !0) {
|
|
17
|
+
const e = [];
|
|
18
|
+
t.forEach((a) => {
|
|
19
|
+
e.push([a.lat, a.lng]);
|
|
20
|
+
});
|
|
21
|
+
const l = o(e);
|
|
22
|
+
return n ? encodeURIComponent(l) : l;
|
|
23
|
+
}
|
|
24
|
+
function g(t) {
|
|
25
|
+
const n = {
|
|
26
|
+
minY: t[0].lat,
|
|
27
|
+
maxY: t[0].lat,
|
|
28
|
+
minX: t[0].lng,
|
|
29
|
+
maxX: t[0].lng
|
|
30
|
+
};
|
|
31
|
+
return t.forEach((e) => {
|
|
32
|
+
n.minY = Math.min(n.minY, e.lat), n.maxY = Math.max(n.maxY, e.lat), n.minX = Math.min(n.minX, e.lng), n.maxX = Math.max(n.maxX, e.lng);
|
|
33
|
+
}), n;
|
|
34
|
+
}
|
|
35
|
+
function m(t) {
|
|
36
|
+
if (t.length <= 0)
|
|
37
|
+
return [];
|
|
38
|
+
const n = /* @__PURE__ */ new Set();
|
|
39
|
+
return t.filter((l) => {
|
|
40
|
+
const a = n.has(l.lat + l.lng), r = l.lat + l.lng;
|
|
41
|
+
return n.add(r), !a;
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function f(t) {
|
|
45
|
+
let n = 0, e = 0;
|
|
46
|
+
for (let l = 0; l < t.length; l++) {
|
|
47
|
+
const a = t[l];
|
|
48
|
+
n += a.lat, e += a.lng;
|
|
49
|
+
}
|
|
50
|
+
return { lat: n / t.length, lng: e / t.length };
|
|
51
|
+
}
|
|
52
|
+
function h(t) {
|
|
53
|
+
let n = "POLYGON((";
|
|
54
|
+
return t.forEach((e) => {
|
|
55
|
+
n += `${e.lng} ${e.lat}, `;
|
|
56
|
+
}), n += `${t[0].lng} ${t[0].lat}))`, n;
|
|
57
|
+
}
|
|
58
|
+
export {
|
|
59
|
+
f as calcPolygonCenter,
|
|
60
|
+
u as encodePolygon,
|
|
61
|
+
g as getMinMaxLatLng,
|
|
62
|
+
h as getPolygonString,
|
|
63
|
+
c as parsePoints,
|
|
64
|
+
m as removeDuplicatePoints
|
|
65
|
+
};
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("./ArrayUtils.cjs"),O=require("./ColorUtils.cjs"),a=require("./CookieUtils.cjs"),P=require("./CurrencyUtils.cjs"),n=require("./DateUtils.cjs"),s=require("./DeviceDetectionUtils.cjs"),l=require("./DOMUtils.cjs"),u=require("./EmailUtils.cjs"),E=require("./FunctionUtils.cjs"),m=require("./GenericUtils.cjs"),t=require("./NumberUtils.cjs"),r=require("./ObjectUtils.cjs"),C=require("./ObserverUtils.cjs"),d=require("./PermissionUtils.cjs"),c=require("./RESB_UrlBuilder.cjs"),o=require("./StringUtils.cjs"),y=require("./URLBuilderUtils.cjs"),e=require("./RegexUtils.cjs"),g=require("./GeolocationUtils.cjs"),b=require("./AdressUtils.cjs"),S=require("./GAutocompleteUtils.cjs"),A=require("./DownloadUtils.cjs"),i=require("./MapUtils.cjs");exports.isArrNullOrEmpty=p.isArrNullOrEmpty;exports.rgba=O.rgba;exports.decodeCookie=a.decodeCookie;exports.encodeCookie=a.encodeCookie;exports.getCookie=a.getCookie;exports.removeCookie=a.removeCookie;exports.formatCurrency=P.formatCurrency;exports.formatDate=n.formatDate;exports.formatDateToddMMYYYY=n.formatDateToddMMYYYY;exports.subtractDaysFromDate=n.subtractDaysFromDate;exports.getCurrentDeviceSize=s.getCurrentDeviceSize;exports.isMobile=s.isMobile;exports.isSafari=s.isSafari;exports.isWindows=s.isWindows;exports.isiOSDevice=s.isiOSDevice;exports.emptyElem=l.emptyElem;exports.getSingleElement=l.getSingleElement;exports.hideElem=l.hideElem;exports.showElem=l.showElem;exports.hash256=u.hash256;exports.hashEmail=u.hashEmail;exports.debounce=E.debounce;exports.isPromise=E.isPromise;exports.awaitableSetTimeout=m.awaitableSetTimeout;exports.createCustomEvent=m.createCustomEvent;exports.formatFloat=t.formatFloat;exports.formatInteger=t.formatInteger;exports.formatLocaleNumber=t.formatLocaleNumber;exports.formatLocaleNumberAuto=t.formatLocaleNumberAuto;exports.formatNumber=t.formatNumber;exports.formatterNumberObj=t.formatterNumberObj;exports.parseLocaleNumber=t.parseLocaleNumber;exports.parseLocaleNumberAuto=t.parseLocaleNumberAuto;exports.deepCopy=r.deepCopy;exports.getOrNull=r.getOrNull;exports.invertFlatObject=r.invertFlatObject;exports.invertKeyToValue=r.invertKeyToValue;exports.isEmptyObject=r.isEmptyObject;exports.shallowCopyObjectTo=r.shallowCopyObjectTo;exports.observeOnce=C.observeOnce;exports.addPermissionStateListener=d.addPermissionStateListener;exports.onNotificationsPermissionChange=d.onNotificationsPermissionChange;exports.buildParams=c.buildParams;exports.buildParamsForAgency=c.buildParamsForAgency;exports.buildURL=c.buildURL;exports.capitalizeFirstLetter=o.capitalizeFirstLetter;exports.cleanASCII=o.cleanASCII;exports.decodeTextWithEntities=o.decodeTextWithEntities;exports.replaceAll=o.replaceAll;exports.replaceAllTokens=o.replaceAllTokens;exports.stringToHyphened=o.stringToHyphened;exports.appendQueryString=y.appendQueryString;exports.COMPETITOR_REGEX=e.COMPETITOR_REGEX;exports.DATE_REGEX=e.DATE_REGEX;exports.EMAIL_REGEX=e.EMAIL_REGEX;exports.EMAIL_REGEX_INTO_TEXT=e.EMAIL_REGEX_INTO_TEXT;exports.EXCLUDED_REGEX=e.EXCLUDED_REGEX;exports.GLOBAL_PHONE_REGEX=e.GLOBAL_PHONE_REGEX;exports.PASSWORD_REGEX=e.PASSWORD_REGEX;exports.PHONE_REGEX=e.PHONE_REGEX;exports.ROOMS_REGEX=e.ROOMS_REGEX;exports.SQM_REGEX=e.SQM_REGEX;exports.browserSupportGeolocation=g.browserSupportGeolocation;exports.getUserPosition=g.getUserPosition;exports.formatAddress=b.formatAddress;exports.formattedAddress=b.formattedAddress;exports.googlePlaceConverter=S.googlePlaceConverter;exports.downloadFile=A.downloadFile;exports.calcPolygonCenter=i.calcPolygonCenter;exports.encodePolygon=i.encodePolygon;exports.getMinMaxLatLng=i.getMinMaxLatLng;exports.getPolygonString=i.getPolygonString;exports.parsePoints=i.parsePoints;exports.removeDuplicatePoints=i.removeDuplicatePoints;
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,91 +1,99 @@
|
|
|
1
1
|
import { isArrNullOrEmpty as r } from "./ArrayUtils.js";
|
|
2
|
-
import { rgba as
|
|
3
|
-
import { decodeCookie as i, encodeCookie as
|
|
4
|
-
import { formatCurrency as
|
|
2
|
+
import { rgba as a } from "./ColorUtils.js";
|
|
3
|
+
import { decodeCookie as i, encodeCookie as l, getCookie as p, removeCookie as s } from "./CookieUtils.js";
|
|
4
|
+
import { formatCurrency as E } from "./CurrencyUtils.js";
|
|
5
5
|
import { formatDate as c, formatDateToddMMYYYY as d, subtractDaysFromDate as x } from "./DateUtils.js";
|
|
6
|
-
import { getCurrentDeviceSize as
|
|
7
|
-
import { emptyElem as
|
|
8
|
-
import { hash256 as
|
|
9
|
-
import { debounce as
|
|
10
|
-
import { awaitableSetTimeout as
|
|
11
|
-
import { formatFloat as
|
|
12
|
-
import { deepCopy as Q, getOrNull as
|
|
13
|
-
import { observeOnce as
|
|
14
|
-
import { addPermissionStateListener as
|
|
15
|
-
import { buildParams as
|
|
16
|
-
import { capitalizeFirstLetter as pe, cleanASCII as
|
|
17
|
-
import { appendQueryString as
|
|
18
|
-
import { COMPETITOR_REGEX as
|
|
19
|
-
import { browserSupportGeolocation as
|
|
20
|
-
import { formatAddress as
|
|
21
|
-
import { googlePlaceConverter as
|
|
22
|
-
import { downloadFile as
|
|
6
|
+
import { getCurrentDeviceSize as g, isMobile as b, isSafari as O, isWindows as P, isiOSDevice as C } from "./DeviceDetectionUtils.js";
|
|
7
|
+
import { emptyElem as A, getSingleElement as L, hideElem as R, showElem as S } from "./DOMUtils.js";
|
|
8
|
+
import { hash256 as _, hashEmail as G } from "./EmailUtils.js";
|
|
9
|
+
import { debounce as X, isPromise as D } from "./FunctionUtils.js";
|
|
10
|
+
import { awaitableSetTimeout as M, createCustomEvent as v } from "./GenericUtils.js";
|
|
11
|
+
import { formatFloat as w, formatInteger as F, formatLocaleNumber as k, formatLocaleNumberAuto as j, formatNumber as Y, formatterNumberObj as H, parseLocaleNumber as U, parseLocaleNumberAuto as W } from "./NumberUtils.js";
|
|
12
|
+
import { deepCopy as Q, getOrNull as B, invertFlatObject as K, invertKeyToValue as V, isEmptyObject as q, shallowCopyObjectTo as J } from "./ObjectUtils.js";
|
|
13
|
+
import { observeOnce as $ } from "./ObserverUtils.js";
|
|
14
|
+
import { addPermissionStateListener as oe, onNotificationsPermissionChange as re } from "./PermissionUtils.js";
|
|
15
|
+
import { buildParams as ae, buildParamsForAgency as me, buildURL as ie } from "./RESB_UrlBuilder.js";
|
|
16
|
+
import { capitalizeFirstLetter as pe, cleanASCII as se, decodeTextWithEntities as ne, replaceAll as Ee, replaceAllTokens as fe, stringToHyphened as ce } from "./StringUtils.js";
|
|
17
|
+
import { appendQueryString as xe } from "./URLBuilderUtils.js";
|
|
18
|
+
import { COMPETITOR_REGEX as ge, DATE_REGEX as be, EMAIL_REGEX as Oe, EMAIL_REGEX_INTO_TEXT as Pe, EXCLUDED_REGEX as Ce, GLOBAL_PHONE_REGEX as ye, PASSWORD_REGEX as Ae, PHONE_REGEX as Le, ROOMS_REGEX as Re, SQM_REGEX as Se } from "./RegexUtils.js";
|
|
19
|
+
import { browserSupportGeolocation as _e, getUserPosition as Ge } from "./GeolocationUtils.js";
|
|
20
|
+
import { formatAddress as Xe, formattedAddress as De } from "./AdressUtils.js";
|
|
21
|
+
import { googlePlaceConverter as Me } from "./GAutocompleteUtils.js";
|
|
22
|
+
import { downloadFile as Ie } from "./DownloadUtils.js";
|
|
23
|
+
import { calcPolygonCenter as Fe, encodePolygon as ke, getMinMaxLatLng as je, getPolygonString as Ye, parsePoints as He, removeDuplicatePoints as Ue } from "./MapUtils.js";
|
|
23
24
|
export {
|
|
24
|
-
|
|
25
|
+
ge as COMPETITOR_REGEX,
|
|
25
26
|
be as DATE_REGEX,
|
|
26
27
|
Oe as EMAIL_REGEX,
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
28
|
+
Pe as EMAIL_REGEX_INTO_TEXT,
|
|
29
|
+
Ce as EXCLUDED_REGEX,
|
|
30
|
+
ye as GLOBAL_PHONE_REGEX,
|
|
31
|
+
Ae as PASSWORD_REGEX,
|
|
32
|
+
Le as PHONE_REGEX,
|
|
33
|
+
Re as ROOMS_REGEX,
|
|
34
|
+
Se as SQM_REGEX,
|
|
35
|
+
oe as addPermissionStateListener,
|
|
36
|
+
xe as appendQueryString,
|
|
37
|
+
M as awaitableSetTimeout,
|
|
38
|
+
_e as browserSupportGeolocation,
|
|
39
|
+
ae as buildParams,
|
|
39
40
|
me as buildParamsForAgency,
|
|
40
|
-
|
|
41
|
+
ie as buildURL,
|
|
42
|
+
Fe as calcPolygonCenter,
|
|
41
43
|
pe as capitalizeFirstLetter,
|
|
42
|
-
|
|
44
|
+
se as cleanASCII,
|
|
43
45
|
v as createCustomEvent,
|
|
44
|
-
|
|
46
|
+
X as debounce,
|
|
45
47
|
i as decodeCookie,
|
|
46
|
-
|
|
48
|
+
ne as decodeTextWithEntities,
|
|
47
49
|
Q as deepCopy,
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
Ie as downloadFile,
|
|
51
|
+
A as emptyElem,
|
|
52
|
+
l as encodeCookie,
|
|
53
|
+
ke as encodePolygon,
|
|
54
|
+
Xe as formatAddress,
|
|
55
|
+
E as formatCurrency,
|
|
53
56
|
c as formatDate,
|
|
54
57
|
d as formatDateToddMMYYYY,
|
|
55
|
-
|
|
58
|
+
w as formatFloat,
|
|
56
59
|
F as formatInteger,
|
|
57
60
|
k as formatLocaleNumber,
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
61
|
+
j as formatLocaleNumberAuto,
|
|
62
|
+
Y as formatNumber,
|
|
63
|
+
De as formattedAddress,
|
|
64
|
+
H as formatterNumberObj,
|
|
65
|
+
p as getCookie,
|
|
66
|
+
g as getCurrentDeviceSize,
|
|
67
|
+
je as getMinMaxLatLng,
|
|
68
|
+
B as getOrNull,
|
|
69
|
+
Ye as getPolygonString,
|
|
70
|
+
L as getSingleElement,
|
|
71
|
+
Ge as getUserPosition,
|
|
72
|
+
Me as googlePlaceConverter,
|
|
73
|
+
_ as hash256,
|
|
74
|
+
G as hashEmail,
|
|
75
|
+
R as hideElem,
|
|
76
|
+
K as invertFlatObject,
|
|
77
|
+
V as invertKeyToValue,
|
|
73
78
|
r as isArrNullOrEmpty,
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
U as
|
|
83
|
-
|
|
84
|
-
|
|
79
|
+
q as isEmptyObject,
|
|
80
|
+
b as isMobile,
|
|
81
|
+
D as isPromise,
|
|
82
|
+
O as isSafari,
|
|
83
|
+
P as isWindows,
|
|
84
|
+
C as isiOSDevice,
|
|
85
|
+
$ as observeOnce,
|
|
86
|
+
re as onNotificationsPermissionChange,
|
|
87
|
+
U as parseLocaleNumber,
|
|
88
|
+
W as parseLocaleNumberAuto,
|
|
89
|
+
He as parsePoints,
|
|
90
|
+
s as removeCookie,
|
|
91
|
+
Ue as removeDuplicatePoints,
|
|
92
|
+
Ee as replaceAll,
|
|
85
93
|
fe as replaceAllTokens,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
94
|
+
a as rgba,
|
|
95
|
+
J as shallowCopyObjectTo,
|
|
96
|
+
S as showElem,
|
|
97
|
+
ce as stringToHyphened,
|
|
90
98
|
x as subtractDaysFromDate
|
|
91
99
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const isArrNullOrEmpty: (arrToCheck?:
|
|
1
|
+
export declare const isArrNullOrEmpty: <T>(arrToCheck?: T[]) => boolean;
|
|
@@ -16,6 +16,7 @@ export declare const isMobile: () => boolean;
|
|
|
16
16
|
* @returns {boolean} Returns true if the browser is Safari, false otherwise.
|
|
17
17
|
*/
|
|
18
18
|
export declare const isSafari: () => boolean;
|
|
19
|
+
export declare const isWindows: () => boolean;
|
|
19
20
|
type BreakpointType = {
|
|
20
21
|
sm: number;
|
|
21
22
|
md: number;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { LatLng } from 'leaflet';
|
|
2
|
+
|
|
3
|
+
export declare function parsePoints(polygonFromMap: string): Array<LatLng> | undefined;
|
|
4
|
+
/**
|
|
5
|
+
* @param polygon An array of latitude and polygon that will be used to design an area in a map
|
|
6
|
+
* @param forUrl If true, the output string will be encoded as a URI so respecting the UTF-8 encoding
|
|
7
|
+
* */
|
|
8
|
+
export declare function encodePolygon(polygon: Array<LatLng>, forUrl?: boolean): string;
|
|
9
|
+
export declare function getMinMaxLatLng(polygon: Array<LatLng>): {
|
|
10
|
+
minY: number;
|
|
11
|
+
maxY: number;
|
|
12
|
+
minX: number;
|
|
13
|
+
maxX: number;
|
|
14
|
+
};
|
|
15
|
+
export declare function removeDuplicatePoints(latLngs: Array<LatLng>): Array<LatLng>;
|
|
16
|
+
export declare function calcPolygonCenter(points: Array<LatLng>): LatLng;
|
|
17
|
+
export declare function getPolygonString(shapePoints: Array<LatLng>): string;
|