@nasa-terra/components 0.0.203 → 0.0.205
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/cdn/apis/harmony.api.d.ts +5 -0
- package/cdn/chunks/GeoTIFF.CENKOG7R.js +19979 -0
- package/cdn/chunks/chunk.2232XEJQ.js +29 -0
- package/cdn/chunks/chunk.2B2TSVNY.js +978 -0
- package/cdn/chunks/chunk.2NNYMNZ5.js +29 -0
- package/cdn/chunks/chunk.2NX4H2BN.js +19 -0
- package/cdn/chunks/chunk.2WBW37NH.js +19 -0
- package/cdn/chunks/chunk.2X7DAD43.js +29 -0
- package/cdn/chunks/chunk.2XT2DXDS.js +528 -0
- package/cdn/chunks/chunk.34A6RU6E.js +29 -0
- package/cdn/chunks/chunk.3A3Y63MA.js +19 -0
- package/cdn/chunks/chunk.3JB5ESJU.js +8969 -0
- package/cdn/chunks/chunk.3TH37PLU.js +1121 -0
- package/cdn/chunks/chunk.3XHPRPKJ.js +1009 -0
- package/cdn/chunks/chunk.4FAAL7CU.js +897 -0
- package/cdn/chunks/chunk.4JTU674G.js +48 -0
- package/cdn/chunks/chunk.4KBZ7BIR.js +29 -0
- package/cdn/chunks/chunk.4PDH3KAH.js +1945 -0
- package/cdn/chunks/chunk.4RS5WH4G.js +19 -0
- package/cdn/chunks/chunk.4W7HENDQ.js +19 -0
- package/cdn/chunks/chunk.5256OMFI.js +62 -0
- package/cdn/chunks/chunk.577EXZQP.js +19 -0
- package/cdn/chunks/chunk.5DIIZV4K.js +791 -0
- package/cdn/chunks/chunk.5DIVPJOJ.js +1653 -0
- package/cdn/chunks/chunk.5F22YVKZ.js +19 -0
- package/cdn/chunks/chunk.5GC6XXMO.js +19 -0
- package/cdn/chunks/chunk.5GD3GQER.js +33 -0
- package/cdn/chunks/chunk.5JGHWKZV.js +38 -0
- package/cdn/chunks/chunk.5MCRMJ7W.js +110 -0
- package/cdn/chunks/chunk.5MFAIDYF.js +19 -0
- package/cdn/chunks/chunk.5QQP4HY5.js +29 -0
- package/cdn/chunks/chunk.5SGSESUV.js +39 -0
- package/cdn/chunks/chunk.5T32ADMR.js +32 -0
- package/cdn/chunks/chunk.5TUINKG3.js +19 -0
- package/cdn/chunks/chunk.5Z5FTYHQ.js +29 -0
- package/cdn/chunks/chunk.64ZLB3XD.js +37 -0
- package/cdn/chunks/chunk.67MZVSO7.js +234 -0
- package/cdn/chunks/chunk.6KW23GBD.js +3035 -0
- package/cdn/chunks/chunk.6NU4LT46.js +189 -0
- package/cdn/chunks/chunk.6ONOP4ID.js +29 -0
- package/cdn/chunks/chunk.6RBN3R3S.js +19 -0
- package/cdn/chunks/chunk.6RVC4QTE.js +19 -0
- package/cdn/chunks/chunk.6VGVAUYK.js +256 -0
- package/cdn/chunks/chunk.6XBVIYCV.js +32 -0
- package/cdn/chunks/chunk.76VAMCFM.js +824 -0
- package/cdn/chunks/chunk.7FTE5V2B.js +19 -0
- package/cdn/chunks/chunk.7OFUJKBW.js +30 -0
- package/cdn/chunks/chunk.7RUFZ7VF.js +475 -0
- package/cdn/chunks/chunk.A4KWAYQH.js +4980 -0
- package/cdn/chunks/chunk.A63JCTKT.js +19 -0
- package/cdn/chunks/chunk.AQ5OKPLZ.js +19 -0
- package/cdn/chunks/chunk.AQ5T22QG.js +41 -0
- package/cdn/chunks/chunk.ASGNUKTS.js +1131 -0
- package/cdn/chunks/chunk.AUWT3HKD.js +940 -0
- package/cdn/chunks/chunk.BD5JLOM4.js +357 -0
- package/cdn/chunks/chunk.BL2T5FVE.js +10 -0
- package/cdn/chunks/chunk.BNIVIVSF.js +2544 -0
- package/cdn/chunks/chunk.BPTXUG3W.js +35 -0
- package/cdn/chunks/chunk.BQPBQZFS.js +360 -0
- package/cdn/chunks/chunk.BYBKLA6W.js +255 -0
- package/cdn/chunks/chunk.CHNYNA6A.js +19 -0
- package/cdn/chunks/chunk.CISSBK6B.js +1820 -0
- package/cdn/chunks/chunk.CN3HAOBC.js +83 -0
- package/cdn/chunks/chunk.CO3P3PQN.js +19 -0
- package/cdn/chunks/chunk.CSF2PMFW.js +1075 -0
- package/cdn/chunks/chunk.CT6JWWV2.js +93 -0
- package/cdn/chunks/chunk.CY2NA7DX.js +1040 -0
- package/cdn/chunks/chunk.D2OCF56Z.js +74 -0
- package/cdn/chunks/chunk.D3WDJ4SS.js +149 -0
- package/cdn/chunks/chunk.D52LQ4J3.js +19 -0
- package/cdn/chunks/chunk.D5OYZFRL.js +134 -0
- package/cdn/chunks/chunk.D6W64PXN.js +19 -0
- package/cdn/chunks/chunk.D7YRDTVS.js +134 -0
- package/cdn/chunks/chunk.DLBLZUXI.js +19 -0
- package/cdn/chunks/chunk.DMAOIRXE.js +19 -0
- package/cdn/chunks/chunk.E2RZP3XA.js +19 -0
- package/cdn/chunks/chunk.E6423VVS.js +47 -0
- package/cdn/chunks/chunk.EAUBUUN5.js +32 -0
- package/cdn/chunks/chunk.EBGQWXBG.js +19 -0
- package/cdn/chunks/chunk.EDPOC2S3.js +29 -0
- package/cdn/chunks/chunk.EH63H56Z.js +333 -0
- package/cdn/chunks/chunk.EIAV6I5D.js +600 -0
- package/cdn/chunks/chunk.EOTDTPZM.js +259 -0
- package/cdn/chunks/chunk.EP6PSBZE.js +100 -0
- package/cdn/chunks/chunk.EVAUERXR.js +431 -0
- package/cdn/chunks/chunk.F2DLSNNG.js +625 -0
- package/cdn/chunks/chunk.F6FVKFVH.js +60 -0
- package/cdn/chunks/chunk.FEIRWXAI.js +34 -0
- package/cdn/chunks/chunk.FK5JYFNX.js +29 -0
- package/cdn/chunks/chunk.FP2ISOJN.js +106 -0
- package/cdn/chunks/chunk.FRGR3SUX.js +19 -0
- package/cdn/chunks/chunk.G2FP3NMR.js +32 -0
- package/cdn/chunks/chunk.G4RHOTZM.js +19 -0
- package/cdn/chunks/chunk.G56LMKFK.js +190 -0
- package/cdn/chunks/chunk.GAYO2WF7.js +810 -0
- package/cdn/chunks/chunk.GGKAPJYB.js +4089 -0
- package/cdn/chunks/chunk.GGRHSJRY.js +278 -0
- package/cdn/chunks/chunk.GMXOAOYE.js +897 -0
- package/cdn/chunks/chunk.GPTTHV22.js +19 -0
- package/cdn/chunks/chunk.GSM3UO7L.js +125 -0
- package/cdn/chunks/chunk.GUDMVVPM.js +29 -0
- package/cdn/chunks/chunk.GWGONIHM.js +621 -0
- package/cdn/chunks/chunk.GXLMJLQN.js +19 -0
- package/cdn/chunks/chunk.H3M3UFJW.js +225 -0
- package/cdn/chunks/chunk.H4CIEYCI.js +274 -0
- package/cdn/chunks/chunk.HAMWPWKH.js +536 -0
- package/cdn/chunks/chunk.HJX5NP2U.js +49 -0
- package/cdn/chunks/chunk.HUS54CD5.js +152 -0
- package/cdn/chunks/chunk.HV7OZEJM.js +37 -0
- package/cdn/chunks/chunk.HVZFV4RK.js +271 -0
- package/cdn/chunks/chunk.I2EO4UEA.js +128 -0
- package/cdn/chunks/chunk.I2S4BY2H.js +19 -0
- package/cdn/chunks/chunk.IBOPN3BA.js +74 -0
- package/cdn/chunks/chunk.IIVOE5EV.js +34 -0
- package/cdn/chunks/chunk.ILWTJYAG.js +19 -0
- package/cdn/chunks/chunk.IMCWFOML.js +132 -0
- package/cdn/chunks/chunk.IPQAZBW5.js +33 -0
- package/cdn/chunks/chunk.IWKAVEX2.js +521 -0
- package/cdn/chunks/chunk.IXCWTH7X.js +19 -0
- package/cdn/chunks/chunk.J2O5J6LC.js +33 -0
- package/cdn/chunks/chunk.J665CST2.js +32 -0
- package/cdn/chunks/chunk.J7VOBHYB.js +29 -0
- package/cdn/chunks/chunk.JRHREVZG.js +195 -0
- package/cdn/chunks/chunk.JRT7GG7P.js +193 -0
- package/cdn/chunks/chunk.JZBAAUKG.js +37 -0
- package/cdn/chunks/chunk.K6JQEUEF.js +855 -0
- package/cdn/chunks/chunk.KBU6MR53.js +19 -0
- package/cdn/chunks/chunk.KH6TDNWG.js +32 -0
- package/cdn/chunks/chunk.KKACL6TT.js +19 -0
- package/cdn/chunks/chunk.KORCC6ZC.js +136 -0
- package/cdn/chunks/chunk.KOZYPVDG.js +29 -0
- package/cdn/chunks/chunk.KRVDOVGU.js +27 -0
- package/cdn/chunks/chunk.KVNYSD7J.js +35 -0
- package/cdn/chunks/chunk.KVY6HP36.js +504 -0
- package/cdn/chunks/chunk.KYTQLAV4.js +33 -0
- package/cdn/chunks/chunk.L2JTE4GG.js +29 -0
- package/cdn/chunks/chunk.L3IVPHBN.js +29 -0
- package/cdn/chunks/chunk.L3RRPSVD.js +310 -0
- package/cdn/chunks/chunk.LA6TV4TX.js +231 -0
- package/cdn/chunks/chunk.LFASDJBV.js +19 -0
- package/cdn/chunks/chunk.LFKTPFJU.js +19 -0
- package/cdn/chunks/chunk.LFL3PUXL.js +78 -0
- package/cdn/chunks/chunk.LI42WZVM.js +19 -0
- package/cdn/chunks/chunk.LNONJFUN.js +19 -0
- package/cdn/chunks/chunk.LUKHK72N.js +1038 -0
- package/cdn/chunks/chunk.M3QGLBMX.js +256 -0
- package/cdn/chunks/chunk.M57M7AQ5.js +19 -0
- package/cdn/chunks/chunk.MC7GK7JH.js +36 -0
- package/cdn/chunks/chunk.MC7JQJRG.js +32 -0
- package/cdn/chunks/chunk.ML5BEAMW.js +276 -0
- package/cdn/chunks/chunk.MMF6FZHE.js +19 -0
- package/cdn/chunks/chunk.MO4YNF4J.js +29 -0
- package/cdn/chunks/chunk.MUSKX3GU.js +138 -0
- package/cdn/chunks/chunk.N7GDICRN.js +568 -0
- package/cdn/chunks/chunk.NDYEK3K4.js +19 -0
- package/cdn/chunks/chunk.NHZJYK2Q.js +111 -0
- package/cdn/chunks/chunk.NRLNKN7I.js +17 -0
- package/cdn/chunks/chunk.NSKILA2A.js +29 -0
- package/cdn/chunks/chunk.NWO2MF5T.js +375 -0
- package/cdn/chunks/chunk.NX7VOYQH.js +610 -0
- package/cdn/chunks/chunk.NZA757GX.js +60 -0
- package/cdn/chunks/chunk.O2NOKPSY.js +169 -0
- package/cdn/chunks/chunk.OIOVBL5M.js +32 -0
- package/cdn/chunks/chunk.OSNWOWQ2.js +2337 -0
- package/cdn/chunks/chunk.OSRGCUJJ.js +891 -0
- package/cdn/chunks/chunk.OVC7EVR4.js +32 -0
- package/cdn/chunks/chunk.PEGHDN3D.js +32 -0
- package/cdn/chunks/chunk.PKU5OUHL.js +19 -0
- package/cdn/chunks/chunk.PVAQWFRB.js +224 -0
- package/cdn/chunks/chunk.PVNZZZCV.js +1307 -0
- package/cdn/chunks/chunk.QBDCDA3E.js +754 -0
- package/cdn/chunks/chunk.QDRW3JBM.js +113 -0
- package/cdn/chunks/chunk.QFRFT4W5.js +19 -0
- package/cdn/chunks/chunk.QJPYGHSA.js +29 -0
- package/cdn/chunks/chunk.QN4G5N5L.js +591 -0
- package/cdn/chunks/chunk.QQYFIC2N.js +19 -0
- package/cdn/chunks/chunk.QR6SCWOR.js +19 -0
- package/cdn/chunks/chunk.QRGGKLJQ.js +29 -0
- package/cdn/chunks/chunk.QSX2ASPV.js +36 -0
- package/cdn/chunks/chunk.QV7MGHUO.js +32 -0
- package/cdn/chunks/chunk.QYLVSRAZ.js +442 -0
- package/cdn/chunks/chunk.R6TDRJ2T.js +28 -0
- package/cdn/chunks/chunk.RRQO6C7V.js +208 -0
- package/cdn/chunks/chunk.RRT5M4B3.js +104 -0
- package/cdn/chunks/chunk.RZNXY5DA.js +85 -0
- package/cdn/chunks/chunk.S2MHJ2BL.js +529 -0
- package/cdn/chunks/chunk.S2P2KBX3.js +19 -0
- package/cdn/chunks/chunk.S5UFNVHZ.js +1768 -0
- package/cdn/chunks/chunk.SAMOMNBR.js +32 -0
- package/cdn/chunks/chunk.SPWHG3FQ.js +36 -0
- package/cdn/chunks/chunk.SRIL2GZR.js +19 -0
- package/cdn/chunks/chunk.T32DCJPK.js +33 -0
- package/cdn/chunks/chunk.T3YLYNOF.js +2977 -0
- package/cdn/chunks/chunk.T7754SP4.js +33 -0
- package/cdn/chunks/chunk.T7KRTL2U.js +19 -0
- package/cdn/chunks/chunk.TAY4BUTR.js +92 -0
- package/cdn/chunks/chunk.TBU3QGJR.js +29 -0
- package/cdn/chunks/chunk.TEEU5HFN.js +284 -0
- package/cdn/chunks/chunk.TFRA4ITH.js +32 -0
- package/cdn/chunks/chunk.TFRHDABM.js +19 -0
- package/cdn/chunks/chunk.THX4K42R.js +19 -0
- package/cdn/chunks/chunk.TKLGXW34.js +19 -0
- package/cdn/chunks/chunk.TMAJCFSJ.js +19 -0
- package/cdn/chunks/chunk.TMPSEY4M.js +876 -0
- package/cdn/chunks/chunk.TULXWHMT.js +19 -0
- package/cdn/chunks/chunk.U42UGPIF.js +34 -0
- package/cdn/chunks/chunk.U7RFQUL4.js +117 -0
- package/cdn/chunks/chunk.UHSY6WVZ.js +19 -0
- package/cdn/chunks/chunk.UI7YLIQD.js +19 -0
- package/cdn/chunks/chunk.UK5FWG26.js +621 -0
- package/cdn/chunks/chunk.UMPFH3IG.js +32 -0
- package/cdn/chunks/chunk.UW4VQ2ZT.js +29 -0
- package/cdn/chunks/chunk.UWQGPSGJ.js +123 -0
- package/cdn/chunks/chunk.UYISI6DV.js +161 -0
- package/cdn/chunks/chunk.VBP6ZZXJ.js +104 -0
- package/cdn/chunks/chunk.VNSMUAG2.js +19 -0
- package/cdn/chunks/chunk.VQFDZZR5.js +64743 -0
- package/cdn/chunks/chunk.VTJ45MEV.js +68 -0
- package/cdn/chunks/chunk.VXTFCFJP.js +29 -0
- package/cdn/chunks/chunk.VYRHCJMA.js +19 -0
- package/cdn/chunks/chunk.W5BKCYRV.js +19 -0
- package/cdn/chunks/chunk.W7NVJUQD.js +42 -0
- package/cdn/chunks/chunk.WAIMZWDO.js +32 -0
- package/cdn/chunks/chunk.WCOQW5IP.js +29 -0
- package/cdn/chunks/chunk.WENZIKZU.js +37 -0
- package/cdn/chunks/chunk.WLIBRD3E.js +36 -0
- package/cdn/chunks/chunk.WMGJ3MAP.js +415 -0
- package/cdn/chunks/chunk.WT45RB6M.js +86 -0
- package/cdn/chunks/chunk.WVIQ74WP.js +29 -0
- package/cdn/chunks/chunk.WVKE7GDV.js +82 -0
- package/cdn/chunks/chunk.X6V5UTEC.js +19 -0
- package/cdn/chunks/chunk.XE7NSCVW.js +35 -0
- package/cdn/chunks/chunk.XEPXVSXX.js +19 -0
- package/cdn/chunks/chunk.XFTU6F75.js +19 -0
- package/cdn/chunks/chunk.XGGJLW76.js +19 -0
- package/cdn/chunks/chunk.XIPDYSFN.js +32 -0
- package/cdn/chunks/chunk.XIY5GTZR.js +19 -0
- package/cdn/chunks/chunk.XLUZ67JF.js +11763 -0
- package/cdn/chunks/chunk.Y7SR4L5C.js +19 -0
- package/cdn/chunks/chunk.YJ7H7EYL.js +71 -0
- package/cdn/chunks/chunk.YKDCWNZE.js +17319 -0
- package/cdn/chunks/chunk.YMH7U2K5.js +29 -0
- package/cdn/chunks/chunk.YU5KVALN.js +29 -0
- package/cdn/chunks/chunk.Z6ZRFFCE.js +35 -0
- package/cdn/chunks/chunk.ZG6QTQKO.js +162 -0
- package/cdn/chunks/chunk.ZL4AGGZE.js +35 -0
- package/cdn/chunks/chunk.ZL6COYU6.js +19 -0
- package/cdn/chunks/chunk.ZNSSJSKK.js +158 -0
- package/cdn/chunks/lerc.IIII5MJ5.js +2099 -0
- package/cdn/components/accordion/accordion.component.js +5 -5
- package/cdn/components/accordion/accordion.js +6 -6
- package/cdn/components/alert/alert.component.js +4 -4
- package/cdn/components/alert/alert.js +5 -5
- package/cdn/components/avatar/avatar.component.js +5 -5
- package/cdn/components/avatar/avatar.js +6 -6
- package/cdn/components/badge/badge.component.js +3 -3
- package/cdn/components/badge/badge.js +4 -4
- package/cdn/components/banner/banner.component.js +3 -3
- package/cdn/components/banner/banner.js +4 -4
- package/cdn/components/breadcrumb/breadcrumb.component.js +2 -2
- package/cdn/components/breadcrumb/breadcrumb.js +3 -3
- package/cdn/components/breadcrumbs/breadcrumbs.component.js +2 -2
- package/cdn/components/breadcrumbs/breadcrumbs.js +3 -3
- package/cdn/components/browse-variables/browse-variables.component.d.ts +1 -1
- package/cdn/components/browse-variables/browse-variables.component.js +21 -21
- package/cdn/components/browse-variables/browse-variables.controller.js +2 -2
- package/cdn/components/browse-variables/browse-variables.js +22 -22
- package/cdn/components/button/button.component.js +6 -6
- package/cdn/components/button/button.js +7 -7
- package/cdn/components/button-group/button-group.component.js +2 -2
- package/cdn/components/button-group/button-group.js +3 -3
- package/cdn/components/caption/caption.component.js +2 -2
- package/cdn/components/caption/caption.js +3 -3
- package/cdn/components/card/card.component.js +2 -2
- package/cdn/components/card/card.js +3 -3
- package/cdn/components/checkbox/checkbox.component.js +5 -5
- package/cdn/components/checkbox/checkbox.js +6 -6
- package/cdn/components/chip/chip.component.js +2 -2
- package/cdn/components/chip/chip.js +3 -3
- package/cdn/components/combobox/combobox.component.js +5 -5
- package/cdn/components/combobox/combobox.js +6 -6
- package/cdn/components/data-access/data-access.component.d.ts +11 -11
- package/cdn/components/data-access/data-access.component.js +69 -56
- package/cdn/components/data-access/data-access.js +70 -57
- package/cdn/components/data-grid/data-grid.component.js +3 -3
- package/cdn/components/data-grid/data-grid.js +4 -4
- package/cdn/components/data-rods/data-rods.component.d.ts +7 -11
- package/cdn/components/data-rods/data-rods.component.js +79 -67
- package/cdn/components/data-rods/data-rods.js +80 -68
- package/cdn/components/data-subsetter/data-subsetter.component.d.ts +8 -5
- package/cdn/components/data-subsetter/data-subsetter.component.js +83 -72
- package/cdn/components/data-subsetter/data-subsetter.js +84 -73
- package/cdn/components/data-subsetter/data-subsetter.styles.js +1 -1
- package/cdn/components/data-subsetter/notebooks/subsetter-notebook.js +1 -1
- package/cdn/components/data-subsetter-history/data-subsetter-history.component.d.ts +4 -7
- package/cdn/components/data-subsetter-history/data-subsetter-history.component.js +84 -73
- package/cdn/components/data-subsetter-history/data-subsetter-history.js +85 -74
- package/cdn/components/date-picker/date-picker.component.d.ts +3 -4
- package/cdn/components/date-picker/date-picker.component.js +14 -14
- package/cdn/components/date-picker/date-picker.js +15 -15
- package/cdn/components/date-range-slider/date-range-slider.component.js +3 -3
- package/cdn/components/date-range-slider/date-range-slider.js +4 -4
- package/cdn/components/dialog/dialog.component.js +8 -8
- package/cdn/components/dialog/dialog.js +9 -9
- package/cdn/components/divider/divider.component.js +2 -2
- package/cdn/components/divider/divider.js +3 -3
- package/cdn/components/dropdown/dropdown.component.js +4 -4
- package/cdn/components/dropdown/dropdown.js +5 -5
- package/cdn/components/earthdata-login/earthdata-login.component.d.ts +3 -1
- package/cdn/components/earthdata-login/earthdata-login.component.js +16 -17
- package/cdn/components/earthdata-login/earthdata-login.js +17 -18
- package/cdn/components/file-upload/file-upload.component.js +2 -2
- package/cdn/components/file-upload/file-upload.js +3 -3
- package/cdn/components/harmony-history/harmony-history.component.d.ts +3 -6
- package/cdn/components/harmony-history/harmony-history.component.js +12 -13
- package/cdn/components/harmony-history/harmony-history.js +13 -14
- package/cdn/components/icon/icon.component.js +3 -3
- package/cdn/components/icon/icon.js +4 -4
- package/cdn/components/input/input.component.js +5 -5
- package/cdn/components/input/input.js +6 -6
- package/cdn/components/loader/loader.component.js +2 -2
- package/cdn/components/loader/loader.js +3 -3
- package/cdn/components/login/login.component.d.ts +3 -1
- package/cdn/components/login/login.component.js +12 -13
- package/cdn/components/login/login.js +13 -14
- package/cdn/components/map/controls/draw-toolbar.control.d.ts +5 -2
- package/cdn/components/map/controls/draw-toolbar.control.js +18 -8
- package/cdn/components/map/controls/layer-picker.control.d.ts +16 -0
- package/cdn/components/map/controls/layer-picker.control.js +13 -0
- package/cdn/components/map/layers/base.layer.d.ts +10 -0
- package/cdn/components/map/layers/base.layer.js +25 -14
- package/cdn/components/map/layers/borders.layer.js +21 -13
- package/cdn/components/map/layers/boundary.d.ts +30 -0
- package/cdn/components/map/layers/boundary.js +20 -0
- package/cdn/components/map/layers/common.d.ts +2 -0
- package/cdn/components/map/layers/geotiff.layer.js +12 -7
- package/cdn/components/map/layers/gibs-vector.layer.js +26 -18
- package/cdn/components/map/layers/gibs.layer.d.ts +6 -0
- package/cdn/components/map/layers/gibs.layer.js +26 -18
- package/cdn/components/map/layers/labels.layer.js +21 -13
- package/cdn/components/map/layers/layer.js +28 -20
- package/cdn/components/map/layers/xyz.layer.js +17 -12
- package/cdn/components/map/map.component.d.ts +73 -21
- package/cdn/components/map/map.component.js +43 -29
- package/cdn/components/map/map.js +44 -30
- package/cdn/components/map/map.service.d.ts +92 -9
- package/cdn/components/map/map.service.js +33 -19
- package/cdn/components/map/map.styles.js +1 -1
- package/cdn/components/map/projections.js +4 -3
- package/cdn/components/map/type.d.ts +7 -0
- package/cdn/components/menu/menu.component.js +2 -2
- package/cdn/components/menu/menu.js +3 -3
- package/cdn/components/menu-item/menu-item.component.js +7 -7
- package/cdn/components/menu-item/menu-item.js +8 -8
- package/cdn/components/option/option.component.js +4 -4
- package/cdn/components/option/option.js +5 -5
- package/cdn/components/pagination/pagination.component.js +4 -4
- package/cdn/components/pagination/pagination.js +5 -5
- package/cdn/components/plot/plot.component.js +2 -2
- package/cdn/components/plot/plot.js +3 -3
- package/cdn/components/plot-toolbar/notebooks/time-averaged-map-notebook.js +1 -1
- package/cdn/components/plot-toolbar/notebooks/time-series-notebook.js +1 -1
- package/cdn/components/plot-toolbar/plot-toolbar.component.d.ts +4 -4
- package/cdn/components/plot-toolbar/plot-toolbar.component.js +54 -42
- package/cdn/components/plot-toolbar/plot-toolbar.js +55 -43
- package/cdn/components/popup/popup.component.js +2 -2
- package/cdn/components/popup/popup.js +3 -3
- package/cdn/components/progress-bar/progress-bar.component.js +2 -2
- package/cdn/components/progress-bar/progress-bar.js +3 -3
- package/cdn/components/radio/radio.component.js +3 -3
- package/cdn/components/radio/radio.js +4 -4
- package/cdn/components/radio-group/radio-group.component.js +3 -3
- package/cdn/components/radio-group/radio-group.js +4 -4
- package/cdn/components/scroll-hint/scroll-hint.component.js +4 -4
- package/cdn/components/scroll-hint/scroll-hint.js +5 -5
- package/cdn/components/select/select.component.js +8 -8
- package/cdn/components/select/select.js +9 -9
- package/cdn/components/site-header/site-header.component.js +5 -5
- package/cdn/components/site-header/site-header.js +5 -5
- package/cdn/components/site-navigation/site-navigation.component.js +2 -2
- package/cdn/components/site-navigation/site-navigation.js +2 -2
- package/cdn/components/skeleton/skeleton.component.js +2 -2
- package/cdn/components/skeleton/skeleton.js +3 -3
- package/cdn/components/slider/slider.component.js +2 -2
- package/cdn/components/slider/slider.js +3 -3
- package/cdn/components/spatial-picker/spatial-picker.component.d.ts +0 -10
- package/cdn/components/spatial-picker/spatial-picker.component.js +53 -39
- package/cdn/components/spatial-picker/spatial-picker.js +54 -40
- package/cdn/components/status-indicator/status-indicator.component.js +2 -2
- package/cdn/components/status-indicator/status-indicator.js +3 -3
- package/cdn/components/stepper/stepper.component.js +2 -2
- package/cdn/components/stepper/stepper.js +3 -3
- package/cdn/components/stepper-step/stepper-step.component.js +4 -4
- package/cdn/components/stepper-step/stepper-step.js +5 -5
- package/cdn/components/tab/tab.component.js +4 -4
- package/cdn/components/tab/tab.js +5 -5
- package/cdn/components/tab-panel/tab-panel.component.js +3 -3
- package/cdn/components/tab-panel/tab-panel.js +4 -4
- package/cdn/components/tabs/tabs.component.d.ts +2 -1
- package/cdn/components/tabs/tabs.component.js +4 -4
- package/cdn/components/tabs/tabs.js +5 -5
- package/cdn/components/tag/tag.component.js +4 -4
- package/cdn/components/tag/tag.js +5 -5
- package/cdn/components/textarea/textarea.component.js +4 -4
- package/cdn/components/textarea/textarea.js +5 -5
- package/cdn/components/time-average-map/time-average-map.component.d.ts +10 -14
- package/cdn/components/time-average-map/time-average-map.component.js +66 -54
- package/cdn/components/time-average-map/time-average-map.controller.js +7 -7
- package/cdn/components/time-average-map/time-average-map.js +67 -55
- package/cdn/components/time-series/time-series.component.d.ts +2 -10
- package/cdn/components/time-series/time-series.component.js +66 -54
- package/cdn/components/time-series/time-series.controller.js +7 -7
- package/cdn/components/time-series/time-series.js +67 -55
- package/cdn/components/toast/toast.component.js +5 -5
- package/cdn/components/toast/toast.js +6 -6
- package/cdn/components/toggle/toggle.component.js +4 -4
- package/cdn/components/toggle/toggle.js +5 -5
- package/cdn/components/tooltip/tooltip.component.js +4 -4
- package/cdn/components/tooltip/tooltip.js +5 -5
- package/cdn/components/variable-combobox/variable-combobox.component.d.ts +5 -9
- package/cdn/components/variable-combobox/variable-combobox.component.js +14 -12
- package/cdn/components/variable-combobox/variable-combobox.js +15 -13
- package/cdn/components/variable-keyword-search/variable-keyword-search.component.d.ts +2 -2
- package/cdn/components/variable-keyword-search/variable-keyword-search.component.js +10 -10
- package/cdn/components/variable-keyword-search/variable-keyword-search.js +11 -11
- package/cdn/custom-elements.json +10670 -8582
- package/cdn/events/events.d.ts +2 -2
- package/cdn/events/terra-map.d.ts +55 -0
- package/cdn/mixins/auth.mixin.d.ts +23 -0
- package/cdn/mixins/mixin.types.d.ts +1 -0
- package/cdn/mixins/query-client.mixin.d.ts +1 -1
- package/cdn/react/accordion/index.js +6 -6
- package/cdn/react/alert/index.js +5 -5
- package/cdn/react/avatar/index.js +6 -6
- package/cdn/react/badge/index.js +4 -4
- package/cdn/react/banner/index.js +4 -4
- package/cdn/react/breadcrumb/index.js +3 -3
- package/cdn/react/breadcrumbs/index.js +3 -3
- package/cdn/react/browse-variables/index.js +22 -22
- package/cdn/react/button/index.js +7 -7
- package/cdn/react/button-group/index.js +3 -3
- package/cdn/react/caption/index.js +3 -3
- package/cdn/react/card/index.js +3 -3
- package/cdn/react/checkbox/index.js +6 -6
- package/cdn/react/chip/index.js +3 -3
- package/cdn/react/combobox/index.js +6 -6
- package/cdn/react/data-access/index.js +70 -57
- package/cdn/react/data-grid/index.js +4 -4
- package/cdn/react/data-rods/index.d.ts +6 -1
- package/cdn/react/data-rods/index.js +80 -68
- package/cdn/react/data-subsetter/index.d.ts +3 -0
- package/cdn/react/data-subsetter/index.js +84 -73
- package/cdn/react/data-subsetter-history/index.d.ts +6 -1
- package/cdn/react/data-subsetter-history/index.js +85 -74
- package/cdn/react/date-picker/index.js +15 -15
- package/cdn/react/date-range-slider/index.js +4 -4
- package/cdn/react/dialog/index.js +9 -9
- package/cdn/react/divider/index.js +3 -3
- package/cdn/react/dropdown/index.js +5 -5
- package/cdn/react/earthdata-login/index.js +17 -18
- package/cdn/react/file-upload/index.js +3 -3
- package/cdn/react/harmony-history/index.d.ts +3 -0
- package/cdn/react/harmony-history/index.js +13 -14
- package/cdn/react/icon/index.js +4 -4
- package/cdn/react/index.d.ts +24 -24
- package/cdn/react/index.js +277 -265
- package/cdn/react/input/index.js +6 -6
- package/cdn/react/loader/index.js +3 -3
- package/cdn/react/login/index.js +13 -14
- package/cdn/react/map/index.d.ts +32 -1
- package/cdn/react/map/index.js +44 -30
- package/cdn/react/menu/index.js +3 -3
- package/cdn/react/menu-item/index.js +8 -8
- package/cdn/react/option/index.js +5 -5
- package/cdn/react/pagination/index.js +5 -5
- package/cdn/react/plot/index.js +3 -3
- package/cdn/react/plot-toolbar/index.d.ts +6 -1
- package/cdn/react/plot-toolbar/index.js +55 -43
- package/cdn/react/popup/index.js +3 -3
- package/cdn/react/progress-bar/index.js +3 -3
- package/cdn/react/radio/index.js +4 -4
- package/cdn/react/radio-group/index.js +4 -4
- package/cdn/react/scroll-hint/index.js +5 -5
- package/cdn/react/select/index.js +9 -9
- package/cdn/react/site-header/index.js +6 -6
- package/cdn/react/site-navigation/index.js +3 -3
- package/cdn/react/skeleton/index.js +3 -3
- package/cdn/react/slider/index.js +3 -3
- package/cdn/react/spatial-picker/index.js +54 -40
- package/cdn/react/status-indicator/index.js +3 -3
- package/cdn/react/stepper/index.js +3 -3
- package/cdn/react/stepper-step/index.js +5 -5
- package/cdn/react/tab/index.js +5 -5
- package/cdn/react/tab-panel/index.js +4 -4
- package/cdn/react/tabs/index.js +5 -5
- package/cdn/react/tag/index.js +5 -5
- package/cdn/react/textarea/index.js +5 -5
- package/cdn/react/time-average-map/index.d.ts +6 -1
- package/cdn/react/time-average-map/index.js +67 -55
- package/cdn/react/time-series/index.d.ts +3 -0
- package/cdn/react/time-series/index.js +67 -55
- package/cdn/react/toast/index.js +6 -6
- package/cdn/react/toggle/index.js +5 -5
- package/cdn/react/tooltip/index.js +5 -5
- package/cdn/react/variable-combobox/index.d.ts +4 -1
- package/cdn/react/variable-combobox/index.js +15 -13
- package/cdn/react/variable-keyword-search/index.d.ts +1 -1
- package/cdn/react/variable-keyword-search/index.js +11 -11
- package/cdn/terra-ui-components.js +278 -266
- package/cdn/types/vue/index.d.ts +1037 -870
- package/cdn/utilities/date.d.ts +4 -0
- package/cdn/utilities/date.js +3 -1
- package/cdn/utilities/variable-task.js +2 -2
- package/cdn/vscode.html-custom-data.json +692 -661
- package/cdn/web-types.json +2243 -2077
- package/dist/apis/harmony.api.d.ts +5 -0
- package/dist/chunks/chunk.25A7KRDN.js +19 -0
- package/dist/chunks/chunk.2C5HNR5L.js +4 -0
- package/dist/chunks/chunk.2O3IOB3J.js +1 -0
- package/dist/chunks/chunk.33OXTI3O.js +22 -0
- package/dist/chunks/chunk.345LFJWT.js +1 -0
- package/dist/chunks/chunk.3D65L7Z7.js +1 -0
- package/dist/chunks/chunk.3GAETZS7.js +12 -0
- package/dist/chunks/chunk.3IH7Q4YU.js +1 -0
- package/dist/chunks/chunk.424PTQE6.js +1 -0
- package/dist/chunks/chunk.43YXC3BX.js +1 -0
- package/dist/chunks/chunk.45H2PNH4.js +1 -0
- package/dist/chunks/chunk.47YM7IJH.js +1 -0
- package/dist/chunks/chunk.4A2YMU2A.js +1 -0
- package/dist/chunks/chunk.4BU5K6UJ.js +1 -0
- package/dist/chunks/chunk.4HQHKAPL.js +1 -0
- package/dist/chunks/chunk.4POG3VJI.js +148 -0
- package/dist/chunks/chunk.4QRZ7ROR.js +299 -0
- package/dist/chunks/chunk.4WJQSWQN.js +1 -0
- package/dist/chunks/chunk.52VRTKYJ.js +1 -0
- package/dist/chunks/chunk.55FJVUS6.js +43 -0
- package/dist/chunks/chunk.55S45QN4.js +1 -0
- package/dist/chunks/chunk.574Z2YXE.js +1 -0
- package/dist/chunks/chunk.5EE4HG2I.js +1 -0
- package/dist/chunks/chunk.5SZGFRLL.js +1 -0
- package/dist/chunks/chunk.5TJN4Z3R.js +1 -0
- package/dist/chunks/chunk.5TYJPHW2.js +1 -0
- package/dist/chunks/chunk.5UYKLBWJ.js +8 -0
- package/dist/chunks/chunk.5VNCJX27.js +55 -0
- package/dist/chunks/chunk.64725NP3.js +1 -0
- package/dist/chunks/chunk.6HO3MVIP.js +1 -0
- package/dist/chunks/chunk.6I57S7FR.js +27 -0
- package/dist/chunks/chunk.6XHCRR5R.js +9 -0
- package/dist/chunks/chunk.73HKAO6V.js +11 -0
- package/dist/chunks/chunk.7COB35MT.js +75 -0
- package/dist/chunks/chunk.7NCUNKBE.js +1 -0
- package/dist/chunks/chunk.7NXWYAIR.js +1 -0
- package/dist/chunks/chunk.7SLU543S.js +1 -0
- package/dist/chunks/chunk.7XQG4HG3.js +1 -0
- package/dist/chunks/chunk.A2ZTVI45.js +154 -0
- package/dist/chunks/chunk.AAUFO4KA.js +1 -0
- package/dist/chunks/chunk.AFNS7NIK.js +1 -0
- package/dist/chunks/chunk.AHL4S3IT.js +1 -0
- package/dist/chunks/chunk.AHS4Q35I.js +1 -0
- package/dist/chunks/chunk.AIWYS7YQ.js +1 -0
- package/dist/chunks/chunk.ALIRA2AC.js +1 -0
- package/dist/chunks/chunk.ATILEODB.js +18 -0
- package/dist/chunks/chunk.B3X6VXDL.js +1 -0
- package/dist/chunks/chunk.B4BXOMMQ.js +1 -0
- package/dist/chunks/chunk.BCGQKSR6.js +1 -0
- package/dist/chunks/chunk.BOZFOR5U.js +1 -0
- package/dist/chunks/chunk.BQB6XWSY.js +1 -0
- package/dist/chunks/chunk.BW5OZ5PS.js +1 -0
- package/dist/chunks/chunk.BXPTMVQE.js +1 -0
- package/dist/chunks/chunk.C6OX4NX6.js +74 -0
- package/dist/chunks/chunk.C7VEVA2Y.js +20 -0
- package/dist/chunks/chunk.CEOBCS56.js +1 -0
- package/dist/chunks/chunk.CGTXCYPM.js +41 -0
- package/dist/chunks/chunk.CH2PWIJD.js +5 -0
- package/dist/chunks/chunk.CLY6HMJZ.js +121 -0
- package/dist/chunks/chunk.CNGZOMLD.js +1 -0
- package/dist/chunks/chunk.CPFON5LM.js +1 -0
- package/dist/chunks/chunk.CQUQVS3M.js +1 -0
- package/dist/chunks/chunk.CRHOUQZH.js +1023 -0
- package/dist/chunks/chunk.CVKACFML.js +1 -0
- package/dist/chunks/chunk.D3JQRTEL.js +1 -0
- package/dist/chunks/chunk.DH5QWPH3.js +126 -0
- package/dist/chunks/chunk.DJ5BXB5G.js +48 -0
- package/dist/chunks/chunk.DKBGIHHD.js +1 -0
- package/dist/chunks/chunk.DOT4H7LX.js +2 -0
- package/dist/chunks/chunk.DTKNWAYL.js +62 -0
- package/dist/chunks/chunk.DWQMS6BC.js +1 -0
- package/dist/chunks/chunk.E477TJOR.js +1 -0
- package/dist/chunks/chunk.E4ELJE6I.js +35 -0
- package/dist/chunks/chunk.EB3ZPXT6.js +1 -0
- package/dist/chunks/chunk.EP2O3QZD.js +1 -0
- package/dist/chunks/chunk.EP5CSYKQ.js +1 -0
- package/dist/chunks/chunk.EQV2PFSY.js +1 -0
- package/dist/chunks/chunk.ER2IYY3T.js +1 -0
- package/dist/chunks/chunk.EV5P56DN.js +1 -0
- package/dist/chunks/chunk.F3NCEQ7X.js +1 -0
- package/dist/chunks/chunk.FSZCT7LX.js +26 -0
- package/dist/chunks/chunk.G3ZRWDDX.js +1 -0
- package/dist/chunks/chunk.G57LF47A.js +1 -0
- package/dist/chunks/chunk.GABTYKJH.js +1 -0
- package/dist/chunks/chunk.GHAZYRJA.js +1 -0
- package/dist/chunks/chunk.GP5SO7WB.js +43 -0
- package/dist/chunks/chunk.GQKEZMI5.js +64 -0
- package/dist/chunks/chunk.GUCJK7CQ.js +1 -0
- package/dist/chunks/chunk.GVVBO4QC.js +30 -0
- package/dist/chunks/chunk.H57KVCKB.js +4 -0
- package/dist/chunks/chunk.HCPPIK6X.js +1 -0
- package/dist/chunks/chunk.HDBWSDNO.js +1 -0
- package/dist/chunks/chunk.HDQVEOLO.js +1 -0
- package/dist/chunks/chunk.HKOYW5P7.js +1 -0
- package/dist/chunks/chunk.HPJUOBS5.js +1 -0
- package/dist/chunks/chunk.HTEGCYSS.js +2 -0
- package/dist/chunks/chunk.I2766Z6G.js +1 -0
- package/dist/chunks/chunk.I6OSLDVJ.js +1 -0
- package/dist/chunks/chunk.I6WZHDJR.js +1 -0
- package/dist/chunks/chunk.ID6GATFM.js +1 -0
- package/dist/chunks/chunk.IDQKGC62.js +1 -0
- package/dist/chunks/chunk.IRLLX53J.js +47 -0
- package/dist/chunks/chunk.IS2NEHYI.js +1 -0
- package/dist/chunks/chunk.IS4IX5PC.js +1 -0
- package/dist/chunks/chunk.J6W2UPV5.js +1 -0
- package/dist/chunks/chunk.JBNOA3A2.js +1 -0
- package/dist/chunks/chunk.JDM4WI4S.js +20 -0
- package/dist/chunks/chunk.JIF57YBB.js +1 -0
- package/dist/chunks/chunk.JM33IYJC.js +1 -0
- package/dist/chunks/chunk.JMLZNWOP.js +14 -0
- package/dist/chunks/chunk.JRCA2SKL.js +145 -0
- package/dist/chunks/chunk.JVSJPJIU.js +5 -0
- package/dist/chunks/chunk.JZKLCWMN.js +1 -0
- package/dist/chunks/chunk.JZLGMRZU.js +157 -0
- package/dist/chunks/chunk.K5BRJBGT.js +1 -0
- package/dist/chunks/chunk.KACJAQNX.js +6 -0
- package/dist/chunks/chunk.KEJYVX6V.js +55 -0
- package/dist/chunks/chunk.KF3WZUJB.js +1 -0
- package/dist/chunks/chunk.KGWY64U3.js +1 -0
- package/dist/chunks/chunk.KHUTJ2EC.js +1 -0
- package/dist/chunks/chunk.KOQ6WD4F.js +1 -0
- package/dist/chunks/chunk.KPNLEIXC.js +99 -0
- package/dist/chunks/chunk.KZAPYGJP.js +1 -0
- package/dist/chunks/chunk.L5QDGGS7.js +1 -0
- package/dist/chunks/chunk.LCYI63EA.js +20 -0
- package/dist/chunks/chunk.LEZEAL23.js +1 -0
- package/dist/chunks/chunk.LM6MTY2M.js +37 -0
- package/dist/chunks/chunk.LOLJACKL.js +1 -0
- package/dist/chunks/chunk.LQU34HVZ.js +1 -0
- package/dist/chunks/chunk.LVAET76P.js +1 -0
- package/dist/chunks/chunk.LXFMQAKV.js +1 -0
- package/dist/chunks/chunk.LYEGL5BZ.js +1 -0
- package/dist/chunks/chunk.LZZE65EN.js +1 -0
- package/dist/chunks/chunk.MCJ2GX4A.js +30 -0
- package/dist/chunks/chunk.MDKK4AJV.js +17 -0
- package/dist/chunks/chunk.MF67H5JA.js +1 -0
- package/dist/chunks/chunk.MGU32BIU.js +59 -0
- package/dist/chunks/chunk.MK3X5JIU.js +65 -0
- package/dist/chunks/chunk.MLR4ZKRU.js +1 -0
- package/dist/chunks/chunk.MQIO6BEA.js +1 -0
- package/dist/chunks/chunk.MU4BRZ5R.js +1 -0
- package/dist/chunks/chunk.MWPFFGL3.js +1 -0
- package/dist/chunks/chunk.MXMEA7TP.js +1 -0
- package/dist/chunks/chunk.N3V2FL7Q.js +1 -0
- package/dist/chunks/chunk.NARLVFIQ.js +33 -0
- package/dist/chunks/chunk.NK753QCZ.js +1 -0
- package/dist/chunks/chunk.NOXPOPPM.js +1 -0
- package/dist/chunks/chunk.NTZXYW2X.js +1 -0
- package/dist/chunks/chunk.NV3ZCWPP.js +1 -0
- package/dist/chunks/chunk.O2UN3QQG.js +1 -0
- package/dist/chunks/chunk.O47BMDEV.js +1 -0
- package/dist/chunks/chunk.OJM5RA3G.js +1 -0
- package/dist/chunks/chunk.OM4YQXHL.js +1 -0
- package/dist/chunks/chunk.OVTNI4H2.js +1 -0
- package/dist/chunks/chunk.OWXS5GVL.js +1 -0
- package/dist/chunks/chunk.OZSD4QYB.js +1 -0
- package/dist/chunks/chunk.PIKCG752.js +1 -0
- package/dist/chunks/chunk.PLSGWBX4.js +42 -0
- package/dist/chunks/chunk.PP6KREF2.js +5 -0
- package/dist/chunks/chunk.PQVZB2P2.js +67 -0
- package/dist/chunks/chunk.PRUHQ3VS.js +1 -0
- package/dist/chunks/chunk.PWFX3VPM.js +1 -0
- package/dist/chunks/chunk.PXVAQ2MA.js +55 -0
- package/dist/chunks/chunk.Q6O6LV3R.js +1 -0
- package/dist/chunks/chunk.QB7E6R2H.js +1 -0
- package/dist/chunks/chunk.QJRLPQ4M.js +1 -0
- package/dist/chunks/chunk.QOQWXEK5.js +1 -0
- package/dist/chunks/chunk.QVDEJXKO.js +1 -0
- package/dist/chunks/chunk.RKMR7V7J.js +1 -0
- package/dist/chunks/chunk.RLTSECXU.js +1 -0
- package/dist/chunks/chunk.RQYBMFWH.js +25 -0
- package/dist/chunks/chunk.S6IY5EKN.js +1 -0
- package/dist/chunks/chunk.SD2Q7EO2.js +23 -0
- package/dist/chunks/chunk.SEBIDNZM.js +1 -0
- package/dist/chunks/chunk.SF2OZFKQ.js +26 -0
- package/dist/chunks/chunk.SFK6BRQV.js +16 -0
- package/dist/chunks/chunk.SJTIVT6P.js +1 -0
- package/dist/chunks/chunk.SKK3NN5J.js +129 -0
- package/dist/chunks/chunk.SXGO5MEK.js +100 -0
- package/dist/chunks/chunk.TANXPJFE.js +1 -0
- package/dist/chunks/chunk.TATIBHUA.js +1 -0
- package/dist/chunks/chunk.TOON2INB.js +39 -0
- package/dist/chunks/chunk.TPUQNE3A.js +1 -0
- package/dist/chunks/chunk.TUGWQPTL.js +1 -0
- package/dist/chunks/chunk.TVERDMGY.js +113 -0
- package/dist/chunks/chunk.TWRNH5K5.js +1 -0
- package/dist/chunks/chunk.UQ6BNK6J.js +1 -0
- package/dist/chunks/chunk.UR7PHRDS.js +345 -0
- package/dist/chunks/chunk.V4XJH6YL.js +80 -0
- package/dist/chunks/chunk.VEPO6QAD.js +1 -0
- package/dist/chunks/chunk.VGN6LMHA.js +1 -0
- package/dist/chunks/chunk.VGQNQREB.js +1 -0
- package/dist/chunks/chunk.VSYDUDNW.js +1286 -0
- package/dist/chunks/chunk.W2E2TLSM.js +176 -0
- package/dist/chunks/chunk.WQ6USVYL.js +1 -0
- package/dist/chunks/chunk.WSBH5HTI.js +1 -0
- package/dist/chunks/chunk.WVBRHYTU.js +1 -0
- package/dist/chunks/chunk.X66E247Y.js +1 -0
- package/dist/chunks/chunk.XAPKFJEL.js +1 -0
- package/dist/chunks/chunk.XCYCEX7B.js +1 -0
- package/dist/chunks/chunk.XYOSJOLJ.js +1 -0
- package/dist/chunks/chunk.XZJS7S7T.js +280 -0
- package/dist/chunks/chunk.Y6ESPBDJ.js +1 -0
- package/dist/chunks/chunk.Y6HSCFK2.js +1 -0
- package/dist/chunks/chunk.YA7JZZG4.js +1 -0
- package/dist/chunks/chunk.YBALUVPL.js +1 -0
- package/dist/chunks/chunk.YFCEZZRF.js +1 -0
- package/dist/chunks/chunk.YLGPGQY4.js +566 -0
- package/dist/chunks/chunk.YLNZLECF.js +9 -0
- package/dist/chunks/chunk.YMDGNLGV.js +1 -0
- package/dist/chunks/chunk.YNN3NBWK.js +1 -0
- package/dist/chunks/chunk.YO67MSZK.js +780 -0
- package/dist/chunks/chunk.YY3G7NCY.js +35 -0
- package/dist/chunks/chunk.YZJEAHZH.js +1 -0
- package/dist/chunks/chunk.YZXEYQ6F.js +1 -0
- package/dist/chunks/chunk.ZBHNSZBH.js +24 -0
- package/dist/chunks/chunk.ZCPIP5RL.js +774 -0
- package/dist/chunks/chunk.ZFCVEZXM.js +11 -0
- package/dist/components/accordion/accordion.component.js +1 -1
- package/dist/components/accordion/accordion.js +1 -1
- package/dist/components/alert/alert.component.js +1 -1
- package/dist/components/alert/alert.js +1 -1
- package/dist/components/avatar/avatar.component.js +1 -1
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/badge/badge.component.js +1 -1
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/banner/banner.component.js +1 -1
- package/dist/components/banner/banner.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.component.js +1 -1
- package/dist/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.component.js +1 -1
- package/dist/components/breadcrumbs/breadcrumbs.js +1 -1
- package/dist/components/browse-variables/browse-variables.component.d.ts +1 -1
- package/dist/components/browse-variables/browse-variables.component.js +1 -1
- package/dist/components/browse-variables/browse-variables.controller.js +1 -1
- package/dist/components/browse-variables/browse-variables.js +1 -1
- package/dist/components/button/button.component.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/button-group/button-group.component.js +1 -1
- package/dist/components/button-group/button-group.js +1 -1
- package/dist/components/caption/caption.component.js +1 -1
- package/dist/components/caption/caption.js +1 -1
- package/dist/components/card/card.component.js +1 -1
- package/dist/components/card/card.js +1 -1
- package/dist/components/checkbox/checkbox.component.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/chip/chip.component.js +1 -1
- package/dist/components/chip/chip.js +1 -1
- package/dist/components/combobox/combobox.component.js +1 -1
- package/dist/components/combobox/combobox.js +1 -1
- package/dist/components/data-access/data-access.component.d.ts +11 -11
- package/dist/components/data-access/data-access.component.js +1 -1
- package/dist/components/data-access/data-access.js +1 -1
- package/dist/components/data-grid/data-grid.component.js +1 -1
- package/dist/components/data-grid/data-grid.js +1 -1
- package/dist/components/data-rods/data-rods.component.d.ts +7 -11
- package/dist/components/data-rods/data-rods.component.js +1 -1
- package/dist/components/data-rods/data-rods.js +1 -1
- package/dist/components/data-subsetter/data-subsetter.component.d.ts +8 -5
- package/dist/components/data-subsetter/data-subsetter.component.js +1 -1
- package/dist/components/data-subsetter/data-subsetter.js +1 -1
- package/dist/components/data-subsetter/data-subsetter.styles.js +1 -1
- package/dist/components/data-subsetter/notebooks/subsetter-notebook.js +1 -1
- package/dist/components/data-subsetter-history/data-subsetter-history.component.d.ts +4 -7
- package/dist/components/data-subsetter-history/data-subsetter-history.component.js +1 -1
- package/dist/components/data-subsetter-history/data-subsetter-history.js +1 -1
- package/dist/components/date-picker/date-picker.component.d.ts +3 -4
- package/dist/components/date-picker/date-picker.component.js +1 -1
- package/dist/components/date-picker/date-picker.js +1 -1
- package/dist/components/date-range-slider/date-range-slider.component.js +1 -1
- package/dist/components/date-range-slider/date-range-slider.js +1 -1
- package/dist/components/dialog/dialog.component.js +1 -1
- package/dist/components/dialog/dialog.js +1 -1
- package/dist/components/divider/divider.component.js +1 -1
- package/dist/components/divider/divider.js +1 -1
- package/dist/components/dropdown/dropdown.component.js +1 -1
- package/dist/components/dropdown/dropdown.js +1 -1
- package/dist/components/earthdata-login/earthdata-login.component.d.ts +3 -1
- package/dist/components/earthdata-login/earthdata-login.component.js +1 -1
- package/dist/components/earthdata-login/earthdata-login.js +1 -1
- package/dist/components/file-upload/file-upload.component.js +1 -1
- package/dist/components/file-upload/file-upload.js +1 -1
- package/dist/components/harmony-history/harmony-history.component.d.ts +3 -6
- package/dist/components/harmony-history/harmony-history.component.js +1 -1
- package/dist/components/harmony-history/harmony-history.js +1 -1
- package/dist/components/icon/icon.component.js +1 -1
- package/dist/components/icon/icon.js +1 -1
- package/dist/components/input/input.component.js +1 -1
- package/dist/components/input/input.js +1 -1
- package/dist/components/loader/loader.component.js +1 -1
- package/dist/components/loader/loader.js +1 -1
- package/dist/components/login/login.component.d.ts +3 -1
- package/dist/components/login/login.component.js +1 -1
- package/dist/components/login/login.js +1 -1
- package/dist/components/map/controls/draw-toolbar.control.d.ts +5 -2
- package/dist/components/map/controls/draw-toolbar.control.js +1 -1
- package/dist/components/map/controls/layer-picker.control.d.ts +16 -0
- package/dist/components/map/controls/layer-picker.control.js +1 -0
- package/dist/components/map/layers/base.layer.d.ts +10 -0
- package/dist/components/map/layers/base.layer.js +1 -1
- package/dist/components/map/layers/boundary.d.ts +30 -0
- package/dist/components/map/layers/boundary.js +1 -0
- package/dist/components/map/layers/common.d.ts +2 -0
- package/dist/components/map/layers/gibs-vector.layer.js +1 -1
- package/dist/components/map/layers/gibs.layer.d.ts +6 -0
- package/dist/components/map/layers/gibs.layer.js +1 -1
- package/dist/components/map/layers/layer.js +1 -1
- package/dist/components/map/map.component.d.ts +73 -21
- package/dist/components/map/map.component.js +1 -1
- package/dist/components/map/map.js +1 -1
- package/dist/components/map/map.service.d.ts +92 -9
- package/dist/components/map/map.service.js +1 -1
- package/dist/components/map/map.styles.js +1 -1
- package/dist/components/map/type.d.ts +7 -0
- package/dist/components/map/type.js +1 -1
- package/dist/components/menu/menu.component.js +1 -1
- package/dist/components/menu/menu.js +1 -1
- package/dist/components/menu-item/menu-item.component.js +1 -1
- package/dist/components/menu-item/menu-item.js +1 -1
- package/dist/components/option/option.component.js +1 -1
- package/dist/components/option/option.js +1 -1
- package/dist/components/pagination/pagination.component.js +1 -1
- package/dist/components/pagination/pagination.js +1 -1
- package/dist/components/plot/plot.component.js +1 -1
- package/dist/components/plot/plot.js +1 -1
- package/dist/components/plot-toolbar/notebooks/time-averaged-map-notebook.js +1 -1
- package/dist/components/plot-toolbar/notebooks/time-series-notebook.js +1 -1
- package/dist/components/plot-toolbar/plot-toolbar.component.d.ts +4 -4
- package/dist/components/plot-toolbar/plot-toolbar.component.js +1 -1
- package/dist/components/plot-toolbar/plot-toolbar.js +1 -1
- package/dist/components/popup/popup.component.js +1 -1
- package/dist/components/popup/popup.js +1 -1
- package/dist/components/progress-bar/progress-bar.component.js +1 -1
- package/dist/components/progress-bar/progress-bar.js +1 -1
- package/dist/components/radio/radio.component.js +1 -1
- package/dist/components/radio/radio.js +1 -1
- package/dist/components/radio-group/radio-group.component.js +1 -1
- package/dist/components/radio-group/radio-group.js +1 -1
- package/dist/components/scroll-hint/scroll-hint.component.js +1 -1
- package/dist/components/scroll-hint/scroll-hint.js +1 -1
- package/dist/components/select/select.component.js +1 -1
- package/dist/components/select/select.js +1 -1
- package/dist/components/site-header/site-header.component.js +1 -1
- package/dist/components/site-header/site-header.js +1 -1
- package/dist/components/site-navigation/site-navigation.component.js +1 -1
- package/dist/components/site-navigation/site-navigation.js +1 -1
- package/dist/components/skeleton/skeleton.component.js +1 -1
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/slider/slider.component.js +1 -1
- package/dist/components/slider/slider.js +1 -1
- package/dist/components/spatial-picker/spatial-picker.component.d.ts +0 -10
- package/dist/components/spatial-picker/spatial-picker.component.js +1 -1
- package/dist/components/spatial-picker/spatial-picker.js +1 -1
- package/dist/components/status-indicator/status-indicator.component.js +1 -1
- package/dist/components/status-indicator/status-indicator.js +1 -1
- package/dist/components/stepper/stepper.component.js +1 -1
- package/dist/components/stepper/stepper.js +1 -1
- package/dist/components/stepper-step/stepper-step.component.js +1 -1
- package/dist/components/stepper-step/stepper-step.js +1 -1
- package/dist/components/tab/tab.component.js +1 -1
- package/dist/components/tab/tab.js +1 -1
- package/dist/components/tab-panel/tab-panel.component.js +1 -1
- package/dist/components/tab-panel/tab-panel.js +1 -1
- package/dist/components/tabs/tabs.component.d.ts +2 -1
- package/dist/components/tabs/tabs.component.js +1 -1
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/tag/tag.component.js +1 -1
- package/dist/components/tag/tag.js +1 -1
- package/dist/components/textarea/textarea.component.js +1 -1
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/time-average-map/time-average-map.component.d.ts +10 -14
- package/dist/components/time-average-map/time-average-map.component.js +1 -1
- package/dist/components/time-average-map/time-average-map.controller.js +1 -1
- package/dist/components/time-average-map/time-average-map.js +1 -1
- package/dist/components/time-series/time-series.component.d.ts +2 -10
- package/dist/components/time-series/time-series.component.js +1 -1
- package/dist/components/time-series/time-series.controller.js +1 -1
- package/dist/components/time-series/time-series.js +1 -1
- package/dist/components/toast/toast.component.js +1 -1
- package/dist/components/toast/toast.js +1 -1
- package/dist/components/toggle/toggle.component.js +1 -1
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/tooltip/tooltip.component.js +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/components/variable-combobox/variable-combobox.component.d.ts +5 -9
- package/dist/components/variable-combobox/variable-combobox.component.js +1 -1
- package/dist/components/variable-combobox/variable-combobox.js +1 -1
- package/dist/components/variable-keyword-search/variable-keyword-search.component.d.ts +2 -2
- package/dist/components/variable-keyword-search/variable-keyword-search.component.js +1 -1
- package/dist/components/variable-keyword-search/variable-keyword-search.js +1 -1
- package/dist/custom-elements.json +10670 -8582
- package/dist/events/events.d.ts +2 -2
- package/dist/events/terra-map.d.ts +55 -0
- package/dist/mixins/auth.mixin.d.ts +23 -0
- package/dist/mixins/mixin.types.d.ts +1 -0
- package/dist/mixins/query-client.mixin.d.ts +1 -1
- package/dist/react/accordion/index.js +1 -1
- package/dist/react/alert/index.js +1 -1
- package/dist/react/avatar/index.js +1 -1
- package/dist/react/badge/index.js +1 -1
- package/dist/react/banner/index.js +1 -1
- package/dist/react/breadcrumb/index.js +1 -1
- package/dist/react/breadcrumbs/index.js +1 -1
- package/dist/react/browse-variables/index.js +1 -1
- package/dist/react/button/index.js +1 -1
- package/dist/react/button-group/index.js +1 -1
- package/dist/react/caption/index.js +1 -1
- package/dist/react/card/index.js +1 -1
- package/dist/react/checkbox/index.js +1 -1
- package/dist/react/chip/index.js +1 -1
- package/dist/react/combobox/index.js +1 -1
- package/dist/react/data-access/index.js +1 -1
- package/dist/react/data-grid/index.js +1 -1
- package/dist/react/data-rods/index.d.ts +6 -1
- package/dist/react/data-rods/index.js +1 -1
- package/dist/react/data-subsetter/index.d.ts +3 -0
- package/dist/react/data-subsetter/index.js +1 -1
- package/dist/react/data-subsetter-history/index.d.ts +6 -1
- package/dist/react/data-subsetter-history/index.js +1 -1
- package/dist/react/date-picker/index.js +1 -1
- package/dist/react/date-range-slider/index.js +1 -1
- package/dist/react/dialog/index.js +1 -1
- package/dist/react/divider/index.js +1 -1
- package/dist/react/dropdown/index.js +1 -1
- package/dist/react/earthdata-login/index.js +1 -1
- package/dist/react/file-upload/index.js +1 -1
- package/dist/react/harmony-history/index.d.ts +3 -0
- package/dist/react/harmony-history/index.js +1 -1
- package/dist/react/icon/index.js +1 -1
- package/dist/react/index.d.ts +24 -24
- package/dist/react/index.js +1 -1
- package/dist/react/input/index.js +1 -1
- package/dist/react/loader/index.js +1 -1
- package/dist/react/login/index.js +1 -1
- package/dist/react/map/index.d.ts +32 -1
- package/dist/react/map/index.js +1 -1
- package/dist/react/menu/index.js +1 -1
- package/dist/react/menu-item/index.js +1 -1
- package/dist/react/option/index.js +1 -1
- package/dist/react/pagination/index.js +1 -1
- package/dist/react/plot/index.js +1 -1
- package/dist/react/plot-toolbar/index.d.ts +6 -1
- package/dist/react/plot-toolbar/index.js +1 -1
- package/dist/react/popup/index.js +1 -1
- package/dist/react/progress-bar/index.js +1 -1
- package/dist/react/radio/index.js +1 -1
- package/dist/react/radio-group/index.js +1 -1
- package/dist/react/scroll-hint/index.js +1 -1
- package/dist/react/select/index.js +1 -1
- package/dist/react/site-header/index.js +1 -1
- package/dist/react/site-navigation/index.js +1 -1
- package/dist/react/skeleton/index.js +1 -1
- package/dist/react/slider/index.js +1 -1
- package/dist/react/spatial-picker/index.js +1 -1
- package/dist/react/status-indicator/index.js +1 -1
- package/dist/react/stepper/index.js +1 -1
- package/dist/react/stepper-step/index.js +1 -1
- package/dist/react/tab/index.js +1 -1
- package/dist/react/tab-panel/index.js +1 -1
- package/dist/react/tabs/index.js +1 -1
- package/dist/react/tag/index.js +1 -1
- package/dist/react/textarea/index.js +1 -1
- package/dist/react/time-average-map/index.d.ts +6 -1
- package/dist/react/time-average-map/index.js +1 -1
- package/dist/react/time-series/index.d.ts +3 -0
- package/dist/react/time-series/index.js +1 -1
- package/dist/react/toast/index.js +1 -1
- package/dist/react/toggle/index.js +1 -1
- package/dist/react/tooltip/index.js +1 -1
- package/dist/react/variable-combobox/index.d.ts +4 -1
- package/dist/react/variable-combobox/index.js +1 -1
- package/dist/react/variable-keyword-search/index.d.ts +1 -1
- package/dist/react/variable-keyword-search/index.js +1 -1
- package/dist/terra-ui-components.js +1 -1
- package/dist/terra_ui_components-0.0.205-py3-none-any.whl +0 -0
- package/dist/terra_ui_components-0.0.205.tar.gz +0 -0
- package/dist/types/vue/index.d.ts +1037 -870
- package/dist/utilities/date.d.ts +4 -0
- package/dist/utilities/date.js +1 -1
- package/dist/utilities/variable-task.js +1 -1
- package/dist/vscode.html-custom-data.json +692 -661
- package/dist/web-types.json +2243 -2077
- package/package.json +6 -4
- package/cdn/auth/auth.controller.d.ts +0 -16
- package/cdn/chunks/GeoTIFF.KMHPSKO6.js +0 -19975
- package/cdn/chunks/chunk.27KCXEZH.js +0 -431
- package/cdn/chunks/chunk.2AFX3VCL.js +0 -125
- package/cdn/chunks/chunk.2DFPSVL6.js +0 -68
- package/cdn/chunks/chunk.2DPXUVUW.js +0 -357
- package/cdn/chunks/chunk.2EKGBKN2.js +0 -19
- package/cdn/chunks/chunk.2FSYZKPK.js +0 -29
- package/cdn/chunks/chunk.2HXJHNH3.js +0 -5339
- package/cdn/chunks/chunk.2IA6WV7R.js +0 -19
- package/cdn/chunks/chunk.2NRTTHOD.js +0 -30
- package/cdn/chunks/chunk.2PJPIGBI.js +0 -1122
- package/cdn/chunks/chunk.2RYJM2TF.js +0 -19
- package/cdn/chunks/chunk.2UATMVXP.js +0 -261
- package/cdn/chunks/chunk.2UUMIAXS.js +0 -19
- package/cdn/chunks/chunk.3A3QJT7L.js +0 -29
- package/cdn/chunks/chunk.3UXSNM76.js +0 -32
- package/cdn/chunks/chunk.4CVCW4V3.js +0 -32
- package/cdn/chunks/chunk.4HFZS2GO.js +0 -19
- package/cdn/chunks/chunk.4KCMI4UU.js +0 -1036
- package/cdn/chunks/chunk.4M7FMP7T.js +0 -442
- package/cdn/chunks/chunk.4OETFOY2.js +0 -71
- package/cdn/chunks/chunk.4UI7P3Y4.js +0 -19
- package/cdn/chunks/chunk.4VE4DO4N.js +0 -19
- package/cdn/chunks/chunk.4YE3LB3R.js +0 -19
- package/cdn/chunks/chunk.4ZBYMDD6.js +0 -189
- package/cdn/chunks/chunk.5CDWDWX5.js +0 -136
- package/cdn/chunks/chunk.5CLU2XHI.js +0 -29
- package/cdn/chunks/chunk.5G4MIKDW.js +0 -19
- package/cdn/chunks/chunk.5KHCLX4N.js +0 -64743
- package/cdn/chunks/chunk.5N76KCT4.js +0 -285
- package/cdn/chunks/chunk.5OEHZWXQ.js +0 -19
- package/cdn/chunks/chunk.5U22JWZL.js +0 -117
- package/cdn/chunks/chunk.5USXBJV5.js +0 -35
- package/cdn/chunks/chunk.5YQFC77E.js +0 -37
- package/cdn/chunks/chunk.6E7Z4C4E.js +0 -19
- package/cdn/chunks/chunk.6FWN6ZZC.js +0 -32
- package/cdn/chunks/chunk.6J2OCJ7J.js +0 -84
- package/cdn/chunks/chunk.6LOJQVYN.js +0 -36
- package/cdn/chunks/chunk.6OC7H5OH.js +0 -28
- package/cdn/chunks/chunk.6QEEVDUE.js +0 -427
- package/cdn/chunks/chunk.6SAM6SI7.js +0 -19
- package/cdn/chunks/chunk.6VTIK2C6.js +0 -19
- package/cdn/chunks/chunk.75FXMQOA.js +0 -19
- package/cdn/chunks/chunk.7HUACA54.js +0 -29
- package/cdn/chunks/chunk.7L2TSDLJ.js +0 -2028
- package/cdn/chunks/chunk.7N55EAUN.js +0 -17305
- package/cdn/chunks/chunk.7VOSRG7X.js +0 -19
- package/cdn/chunks/chunk.7WUVQEAR.js +0 -256
- package/cdn/chunks/chunk.7Y44JBIB.js +0 -550
- package/cdn/chunks/chunk.7ZI27RZO.js +0 -1136
- package/cdn/chunks/chunk.ACUUMB46.js +0 -33
- package/cdn/chunks/chunk.AFJMWE55.js +0 -29
- package/cdn/chunks/chunk.AH535OUT.js +0 -19
- package/cdn/chunks/chunk.AJTI5LZT.js +0 -60
- package/cdn/chunks/chunk.AL34JKBE.js +0 -19
- package/cdn/chunks/chunk.ANOS3OTE.js +0 -29
- package/cdn/chunks/chunk.AP5WCU4L.js +0 -134
- package/cdn/chunks/chunk.AQQD3TGI.js +0 -19
- package/cdn/chunks/chunk.AWU6UL7H.js +0 -19
- package/cdn/chunks/chunk.AYV43FGZ.js +0 -110
- package/cdn/chunks/chunk.B6MUHPWI.js +0 -19
- package/cdn/chunks/chunk.BHW5IL3I.js +0 -19
- package/cdn/chunks/chunk.BPRI6OGA.js +0 -29
- package/cdn/chunks/chunk.BPTWMSFM.js +0 -259
- package/cdn/chunks/chunk.BTPIPKWK.js +0 -29
- package/cdn/chunks/chunk.C2SRCC4M.js +0 -19
- package/cdn/chunks/chunk.C3SXIMJF.js +0 -29
- package/cdn/chunks/chunk.CDYBBCIE.js +0 -29
- package/cdn/chunks/chunk.CHKUZKW6.js +0 -19
- package/cdn/chunks/chunk.CJG6IYUQ.js +0 -699
- package/cdn/chunks/chunk.COA7ZPCF.js +0 -86
- package/cdn/chunks/chunk.CV4QCJYB.js +0 -29
- package/cdn/chunks/chunk.CV7V62DS.js +0 -33
- package/cdn/chunks/chunk.CWNNDPJR.js +0 -36
- package/cdn/chunks/chunk.CWVFOCEY.js +0 -123
- package/cdn/chunks/chunk.D6DZ2ABR.js +0 -19
- package/cdn/chunks/chunk.DAHT4D47.js +0 -19
- package/cdn/chunks/chunk.DDCWMDIC.js +0 -32
- package/cdn/chunks/chunk.DNVJF7IY.js +0 -39
- package/cdn/chunks/chunk.DOAEM5ON.js +0 -4083
- package/cdn/chunks/chunk.DOLQGIFG.js +0 -19
- package/cdn/chunks/chunk.DPKA4G53.js +0 -601
- package/cdn/chunks/chunk.DTUP6KDY.js +0 -19
- package/cdn/chunks/chunk.DXQUJESD.js +0 -8969
- package/cdn/chunks/chunk.E52YFLSL.js +0 -32
- package/cdn/chunks/chunk.E6S2GD5C.js +0 -31
- package/cdn/chunks/chunk.EQDMPPT6.js +0 -1413
- package/cdn/chunks/chunk.ERJEIORY.js +0 -36
- package/cdn/chunks/chunk.F26CV3RM.js +0 -32
- package/cdn/chunks/chunk.F5ATUIYK.js +0 -29
- package/cdn/chunks/chunk.FALB73Y2.js +0 -37
- package/cdn/chunks/chunk.FCQ22IGW.js +0 -104
- package/cdn/chunks/chunk.FQ6BZ3IY.js +0 -234
- package/cdn/chunks/chunk.FS3BAWIP.js +0 -19
- package/cdn/chunks/chunk.FUANKNNM.js +0 -19
- package/cdn/chunks/chunk.FVMOO5PZ.js +0 -111
- package/cdn/chunks/chunk.FWA7FNBM.js +0 -29
- package/cdn/chunks/chunk.FXGGRWLG.js +0 -106
- package/cdn/chunks/chunk.G5C4B32K.js +0 -32
- package/cdn/chunks/chunk.GAE7V6RB.js +0 -93
- package/cdn/chunks/chunk.GBGE6X2T.js +0 -1018
- package/cdn/chunks/chunk.GBR3XNSE.js +0 -19
- package/cdn/chunks/chunk.GDXZZBNN.js +0 -29
- package/cdn/chunks/chunk.GEZJ4HAT.js +0 -128
- package/cdn/chunks/chunk.GHYNGNCL.js +0 -19
- package/cdn/chunks/chunk.GVSCZXYP.js +0 -152
- package/cdn/chunks/chunk.H4THPLKV.js +0 -375
- package/cdn/chunks/chunk.H6DYN62P.js +0 -19
- package/cdn/chunks/chunk.H7ILJBVJ.js +0 -29
- package/cdn/chunks/chunk.HA24JYMN.js +0 -34
- package/cdn/chunks/chunk.HBVD5YDA.js +0 -19
- package/cdn/chunks/chunk.HDOVTS2Z.js +0 -333
- package/cdn/chunks/chunk.HE3V76OH.js +0 -29
- package/cdn/chunks/chunk.HSQJHXWN.js +0 -19
- package/cdn/chunks/chunk.HWXTC2NL.js +0 -475
- package/cdn/chunks/chunk.I3ZCGZPC.js +0 -629
- package/cdn/chunks/chunk.IDRFRYGU.js +0 -19
- package/cdn/chunks/chunk.IPAGICZN.js +0 -38
- package/cdn/chunks/chunk.IUV6CTRY.js +0 -231
- package/cdn/chunks/chunk.IW2V63Q4.js +0 -278
- package/cdn/chunks/chunk.J2QE6B7T.js +0 -158
- package/cdn/chunks/chunk.J5WVGYHM.js +0 -1071
- package/cdn/chunks/chunk.JGXF7ZXQ.js +0 -32
- package/cdn/chunks/chunk.JTDMKEVX.js +0 -19
- package/cdn/chunks/chunk.JU2BT7V3.js +0 -29
- package/cdn/chunks/chunk.JUAS37EG.js +0 -47
- package/cdn/chunks/chunk.KCLVMBYX.js +0 -19
- package/cdn/chunks/chunk.KLVTN4RA.js +0 -1780
- package/cdn/chunks/chunk.KNOXZXLV.js +0 -62
- package/cdn/chunks/chunk.KNWDEVCZ.js +0 -872
- package/cdn/chunks/chunk.KTH7B5P7.js +0 -32
- package/cdn/chunks/chunk.KVXAUKHU.js +0 -29
- package/cdn/chunks/chunk.L453DWOS.js +0 -162
- package/cdn/chunks/chunk.L4APEYLE.js +0 -33
- package/cdn/chunks/chunk.L6RUQB6F.js +0 -113
- package/cdn/chunks/chunk.LEJPCXRH.js +0 -575
- package/cdn/chunks/chunk.LGHXPOGX.js +0 -19
- package/cdn/chunks/chunk.LMFFT6QZ.js +0 -19
- package/cdn/chunks/chunk.LV52UGIG.js +0 -19
- package/cdn/chunks/chunk.LYTJDP4F.js +0 -528
- package/cdn/chunks/chunk.M6TNRFZO.js +0 -32
- package/cdn/chunks/chunk.MB55MNWI.js +0 -132
- package/cdn/chunks/chunk.MDV3HVPR.js +0 -82
- package/cdn/chunks/chunk.MKKKY7LJ.js +0 -17565
- package/cdn/chunks/chunk.ML6OFHI2.js +0 -60
- package/cdn/chunks/chunk.MMMP6IHT.js +0 -36
- package/cdn/chunks/chunk.MR7XEWMN.js +0 -29
- package/cdn/chunks/chunk.N26HWWE7.js +0 -92
- package/cdn/chunks/chunk.N6YZ3GGB.js +0 -19
- package/cdn/chunks/chunk.NKJ73Q6Z.js +0 -101
- package/cdn/chunks/chunk.NOJRNK7A.js +0 -1303
- package/cdn/chunks/chunk.O5KNCAFH.js +0 -29
- package/cdn/chunks/chunk.OHLWFMUZ.js +0 -19
- package/cdn/chunks/chunk.OK2PJLA4.js +0 -19
- package/cdn/chunks/chunk.OMERHZ7O.js +0 -1646
- package/cdn/chunks/chunk.OQR3DOIL.js +0 -29
- package/cdn/chunks/chunk.OVV6CMBK.js +0 -74
- package/cdn/chunks/chunk.OXFYKL76.js +0 -19
- package/cdn/chunks/chunk.P5MFJJGP.js +0 -195
- package/cdn/chunks/chunk.P6OHZPUZ.js +0 -2786
- package/cdn/chunks/chunk.PH3LKMHS.js +0 -32
- package/cdn/chunks/chunk.PIEU7GT4.js +0 -29
- package/cdn/chunks/chunk.PILGSWUJ.js +0 -29
- package/cdn/chunks/chunk.PLI3TNYY.js +0 -33
- package/cdn/chunks/chunk.PPCOW47J.js +0 -535
- package/cdn/chunks/chunk.PRI7AVJX.js +0 -19
- package/cdn/chunks/chunk.PWPIV2JK.js +0 -225
- package/cdn/chunks/chunk.QCEPDQ6M.js +0 -32
- package/cdn/chunks/chunk.QJUVJPT6.js +0 -19
- package/cdn/chunks/chunk.QP2APML5.js +0 -536
- package/cdn/chunks/chunk.QS7RKQGD.js +0 -19
- package/cdn/chunks/chunk.QZCCAT7W.js +0 -19
- package/cdn/chunks/chunk.QZIIYAVZ.js +0 -19
- package/cdn/chunks/chunk.QZQ7MTL4.js +0 -34
- package/cdn/chunks/chunk.RBBPG6SO.js +0 -621
- package/cdn/chunks/chunk.RL57R2DM.js +0 -37
- package/cdn/chunks/chunk.RMUH4JXF.js +0 -35
- package/cdn/chunks/chunk.RSH7CL7U.js +0 -310
- package/cdn/chunks/chunk.RXXY2DKG.js +0 -19
- package/cdn/chunks/chunk.S5BNWB7B.js +0 -185
- package/cdn/chunks/chunk.SDVBNJQZ.js +0 -19
- package/cdn/chunks/chunk.SIK75J6S.js +0 -35
- package/cdn/chunks/chunk.SJEEWCBY.js +0 -19
- package/cdn/chunks/chunk.SQWR5Y2X.js +0 -134
- package/cdn/chunks/chunk.SWNYIRFX.js +0 -19
- package/cdn/chunks/chunk.SZJZTSTJ.js +0 -36
- package/cdn/chunks/chunk.T35HK4YD.js +0 -83
- package/cdn/chunks/chunk.T4QHXOJU.js +0 -29
- package/cdn/chunks/chunk.T7A4P7JA.js +0 -19
- package/cdn/chunks/chunk.TA7CFXHM.js +0 -276
- package/cdn/chunks/chunk.TBL6KAUU.js +0 -19
- package/cdn/chunks/chunk.TDCXTEE4.js +0 -29
- package/cdn/chunks/chunk.TFX7LPOA.js +0 -29
- package/cdn/chunks/chunk.TTKS7OPN.js +0 -49
- package/cdn/chunks/chunk.TW72W3FG.js +0 -41
- package/cdn/chunks/chunk.TZ7K6LRZ.js +0 -29
- package/cdn/chunks/chunk.U64UG2NF.js +0 -897
- package/cdn/chunks/chunk.UCGET3OV.js +0 -610
- package/cdn/chunks/chunk.UFODDLBF.js +0 -190
- package/cdn/chunks/chunk.UI7I6F4E.js +0 -29
- package/cdn/chunks/chunk.UL6GPUWY.js +0 -169
- package/cdn/chunks/chunk.UNE5PGU3.js +0 -149
- package/cdn/chunks/chunk.USSOPHIF.js +0 -161
- package/cdn/chunks/chunk.UVQGTCUS.js +0 -621
- package/cdn/chunks/chunk.VAS4SJTV.js +0 -893
- package/cdn/chunks/chunk.VATEZWZS.js +0 -360
- package/cdn/chunks/chunk.VCKHZSH2.js +0 -19
- package/cdn/chunks/chunk.VHHZPEYC.js +0 -29
- package/cdn/chunks/chunk.VM6WPB7T.js +0 -32
- package/cdn/chunks/chunk.VNCKECHZ.js +0 -853
- package/cdn/chunks/chunk.VPMAHEJA.js +0 -32
- package/cdn/chunks/chunk.VQF367DL.js +0 -35
- package/cdn/chunks/chunk.VUXL5UGT.js +0 -2574
- package/cdn/chunks/chunk.W5FQPPPY.js +0 -19
- package/cdn/chunks/chunk.WCBO7P6T.js +0 -34
- package/cdn/chunks/chunk.WO24QJYS.js +0 -1005
- package/cdn/chunks/chunk.WSRDV4NV.js +0 -19
- package/cdn/chunks/chunk.WTGU6E45.js +0 -224
- package/cdn/chunks/chunk.XDVFVONG.js +0 -1945
- package/cdn/chunks/chunk.XNJGPB57.js +0 -35
- package/cdn/chunks/chunk.XXLSM7RI.js +0 -138
- package/cdn/chunks/chunk.Y6OCTUUR.js +0 -19
- package/cdn/chunks/chunk.YAWLOXFX.js +0 -271
- package/cdn/chunks/chunk.YJHDQGK3.js +0 -19
- package/cdn/chunks/chunk.YN7XE2VP.js +0 -940
- package/cdn/chunks/chunk.YTKNBCBF.js +0 -19
- package/cdn/chunks/chunk.Z3PZC46D.js +0 -33
- package/cdn/chunks/chunk.Z5U6BAQK.js +0 -292
- package/cdn/chunks/chunk.ZAS2SUGL.js +0 -19
- package/cdn/chunks/chunk.ZI2LY2UP.js +0 -524
- package/cdn/chunks/chunk.ZRSUDLUY.js +0 -754
- package/cdn/chunks/chunk.ZWUG6EZN.js +0 -544
- package/cdn/chunks/chunk.ZYF3AML6.js +0 -521
- package/cdn/chunks/chunk.ZYGBGEUR.js +0 -48
- package/cdn/chunks/chunk.ZYYDEEKW.js +0 -19
- package/cdn/chunks/lerc.OJS5YQI3.js +0 -2099
- package/cdn/events/terra-map-change.d.ts +0 -14
- package/dist/auth/auth.controller.d.ts +0 -16
- package/dist/chunks/chunk.24QTPUF2.js +0 -6
- package/dist/chunks/chunk.2A67CXHH.js +0 -5
- package/dist/chunks/chunk.2PQNGBP2.js +0 -1
- package/dist/chunks/chunk.2SYEDAOV.js +0 -1
- package/dist/chunks/chunk.2UREYJJ6.js +0 -65
- package/dist/chunks/chunk.2URJIUFD.js +0 -1
- package/dist/chunks/chunk.2VLYWQGB.js +0 -1
- package/dist/chunks/chunk.2XENK37L.js +0 -20
- package/dist/chunks/chunk.33ZH43TV.js +0 -1
- package/dist/chunks/chunk.345UCNEF.js +0 -1
- package/dist/chunks/chunk.347H65MH.js +0 -1
- package/dist/chunks/chunk.3BGJ2Y4W.js +0 -1
- package/dist/chunks/chunk.3OSNYXIB.js +0 -37
- package/dist/chunks/chunk.3SBCV5YV.js +0 -74
- package/dist/chunks/chunk.4AODHTLA.js +0 -1
- package/dist/chunks/chunk.4JUNRLEC.js +0 -1
- package/dist/chunks/chunk.4O6EGUET.js +0 -6
- package/dist/chunks/chunk.4PNNISNN.js +0 -12
- package/dist/chunks/chunk.4PXK26WC.js +0 -1
- package/dist/chunks/chunk.4RJ73FTA.js +0 -1
- package/dist/chunks/chunk.5DG6GZR2.js +0 -1
- package/dist/chunks/chunk.5OFG6SIJ.js +0 -1
- package/dist/chunks/chunk.5UIZ5N7P.js +0 -345
- package/dist/chunks/chunk.5WH5YKQV.js +0 -129
- package/dist/chunks/chunk.5WXBL2P4.js +0 -299
- package/dist/chunks/chunk.5YTPWERZ.js +0 -1
- package/dist/chunks/chunk.67VTCJF4.js +0 -527
- package/dist/chunks/chunk.6DD3MA2P.js +0 -1
- package/dist/chunks/chunk.6J72MJEC.js +0 -1
- package/dist/chunks/chunk.6OCFGLDL.js +0 -1
- package/dist/chunks/chunk.6Q54KXMC.js +0 -157
- package/dist/chunks/chunk.6R6NM245.js +0 -39
- package/dist/chunks/chunk.6SHAP35V.js +0 -55
- package/dist/chunks/chunk.6SW4NJHL.js +0 -42
- package/dist/chunks/chunk.6TALLYX6.js +0 -1
- package/dist/chunks/chunk.6ZIINXUV.js +0 -1
- package/dist/chunks/chunk.7D3QWHPQ.js +0 -1
- package/dist/chunks/chunk.7DGA6X4U.js +0 -23
- package/dist/chunks/chunk.7KZSDLA2.js +0 -11
- package/dist/chunks/chunk.7LR6X6Z6.js +0 -1
- package/dist/chunks/chunk.7TW5XUJL.js +0 -1
- package/dist/chunks/chunk.7V4HIKGV.js +0 -20
- package/dist/chunks/chunk.A3VSFB3O.js +0 -1
- package/dist/chunks/chunk.ADGVYX3D.js +0 -1
- package/dist/chunks/chunk.ALYHNSZZ.js +0 -30
- package/dist/chunks/chunk.AMKSX4J2.js +0 -1
- package/dist/chunks/chunk.AVBBSQQN.js +0 -26
- package/dist/chunks/chunk.BCBEL5J3.js +0 -1
- package/dist/chunks/chunk.BFSQRKZP.js +0 -67
- package/dist/chunks/chunk.BIMQKSIE.js +0 -1
- package/dist/chunks/chunk.BJFYPKRH.js +0 -1
- package/dist/chunks/chunk.BK22YUL3.js +0 -1
- package/dist/chunks/chunk.BMUYWCSS.js +0 -1
- package/dist/chunks/chunk.BRHNY634.js +0 -1
- package/dist/chunks/chunk.BVNNUSMK.js +0 -1
- package/dist/chunks/chunk.C6CZYR3X.js +0 -1
- package/dist/chunks/chunk.C6YOBRFC.js +0 -1
- package/dist/chunks/chunk.CO3YFDGB.js +0 -27
- package/dist/chunks/chunk.CQK6QHLB.js +0 -1
- package/dist/chunks/chunk.CQPFMW2K.js +0 -1
- package/dist/chunks/chunk.CRDPEWYE.js +0 -1
- package/dist/chunks/chunk.CS4EGLGP.js +0 -1
- package/dist/chunks/chunk.CSXC6DPV.js +0 -280
- package/dist/chunks/chunk.DH6S4SMY.js +0 -9
- package/dist/chunks/chunk.DKS4TU3H.js +0 -1
- package/dist/chunks/chunk.DTISX46U.js +0 -1
- package/dist/chunks/chunk.DWB7WY2B.js +0 -1
- package/dist/chunks/chunk.DYY5ZEGD.js +0 -8
- package/dist/chunks/chunk.E264AGUB.js +0 -1
- package/dist/chunks/chunk.E2LODYPF.js +0 -1
- package/dist/chunks/chunk.E36ROOQP.js +0 -1
- package/dist/chunks/chunk.E6SYKRYA.js +0 -18
- package/dist/chunks/chunk.E7D32WNL.js +0 -99
- package/dist/chunks/chunk.EAIG3OAM.js +0 -1
- package/dist/chunks/chunk.EPJM7OIN.js +0 -1
- package/dist/chunks/chunk.EYLQFCG6.js +0 -1
- package/dist/chunks/chunk.F2LSSWTW.js +0 -1
- package/dist/chunks/chunk.F2OOGC7E.js +0 -1
- package/dist/chunks/chunk.F463ZO54.js +0 -26
- package/dist/chunks/chunk.F4QJ3AAN.js +0 -1
- package/dist/chunks/chunk.FCLASTZJ.js +0 -59
- package/dist/chunks/chunk.FEUU6PRO.js +0 -1231
- package/dist/chunks/chunk.FFJ4LVA4.js +0 -1
- package/dist/chunks/chunk.FLY7SZ43.js +0 -1
- package/dist/chunks/chunk.FTSUICBL.js +0 -5
- package/dist/chunks/chunk.FU4VAT7K.js +0 -126
- package/dist/chunks/chunk.FY5MRGO2.js +0 -4
- package/dist/chunks/chunk.G2RBM77C.js +0 -80
- package/dist/chunks/chunk.G5WS7EAO.js +0 -1
- package/dist/chunks/chunk.GCVZMOL6.js +0 -1
- package/dist/chunks/chunk.GFJZ3U6O.js +0 -1
- package/dist/chunks/chunk.GVQ3ULCA.js +0 -1
- package/dist/chunks/chunk.GVWKFBDB.js +0 -1
- package/dist/chunks/chunk.GZC4MHZL.js +0 -1
- package/dist/chunks/chunk.GZJI67IH.js +0 -1
- package/dist/chunks/chunk.HBM2PGPH.js +0 -1
- package/dist/chunks/chunk.HFNSDYFF.js +0 -1
- package/dist/chunks/chunk.HJ7H55BL.js +0 -1
- package/dist/chunks/chunk.HMGPFX2Y.js +0 -1
- package/dist/chunks/chunk.IGXIZYGS.js +0 -1
- package/dist/chunks/chunk.IKZERRE2.js +0 -1
- package/dist/chunks/chunk.IL752DKI.js +0 -1
- package/dist/chunks/chunk.ILG3LGC7.js +0 -1
- package/dist/chunks/chunk.ILLKI5UT.js +0 -1
- package/dist/chunks/chunk.IT5GSXLK.js +0 -1
- package/dist/chunks/chunk.IX7TDXLM.js +0 -1
- package/dist/chunks/chunk.J74HQDC4.js +0 -113
- package/dist/chunks/chunk.JDUDVTGM.js +0 -33
- package/dist/chunks/chunk.JER3EYSI.js +0 -43
- package/dist/chunks/chunk.JFQVCD2G.js +0 -1
- package/dist/chunks/chunk.JJDVDIMZ.js +0 -1
- package/dist/chunks/chunk.JUCYMLNQ.js +0 -24
- package/dist/chunks/chunk.JWV3256S.js +0 -1
- package/dist/chunks/chunk.K3JWAUPW.js +0 -1
- package/dist/chunks/chunk.K7EEMK7S.js +0 -1
- package/dist/chunks/chunk.KQQP67QH.js +0 -1
- package/dist/chunks/chunk.L7LZXSLB.js +0 -1
- package/dist/chunks/chunk.L7TU4EE7.js +0 -1
- package/dist/chunks/chunk.LBQFMWHH.js +0 -1
- package/dist/chunks/chunk.LHS2JI5C.js +0 -1
- package/dist/chunks/chunk.LRB2T4C6.js +0 -1
- package/dist/chunks/chunk.LSBA65NF.js +0 -55
- package/dist/chunks/chunk.LVJYASQH.js +0 -41
- package/dist/chunks/chunk.M5IM24X6.js +0 -1
- package/dist/chunks/chunk.M7GAVBP4.js +0 -1
- package/dist/chunks/chunk.MRAFQ6FC.js +0 -1
- package/dist/chunks/chunk.MSEAPM5O.js +0 -43
- package/dist/chunks/chunk.MXJCFEZ4.js +0 -780
- package/dist/chunks/chunk.NFGRTKHK.js +0 -35
- package/dist/chunks/chunk.NM6S6YGL.js +0 -30
- package/dist/chunks/chunk.NNGAFMYS.js +0 -1
- package/dist/chunks/chunk.NS34WRBV.js +0 -154
- package/dist/chunks/chunk.NZ4QJK47.js +0 -176
- package/dist/chunks/chunk.NZERF5GE.js +0 -1
- package/dist/chunks/chunk.O36CSOQK.js +0 -11
- package/dist/chunks/chunk.OAFIM27Q.js +0 -1
- package/dist/chunks/chunk.OBJ27374.js +0 -1
- package/dist/chunks/chunk.ONZTNAIQ.js +0 -1
- package/dist/chunks/chunk.OQ4IT42W.js +0 -1
- package/dist/chunks/chunk.OSAQ45F4.js +0 -145
- package/dist/chunks/chunk.OSDEVN34.js +0 -1001
- package/dist/chunks/chunk.P23PNMO2.js +0 -1
- package/dist/chunks/chunk.PGC2LCDL.js +0 -1
- package/dist/chunks/chunk.PGUHY4NZ.js +0 -1
- package/dist/chunks/chunk.PHWB36E5.js +0 -4
- package/dist/chunks/chunk.PIP3HL2S.js +0 -1
- package/dist/chunks/chunk.PM3RUTRJ.js +0 -1
- package/dist/chunks/chunk.PNRCW5GH.js +0 -48
- package/dist/chunks/chunk.PO5EHL4Q.js +0 -1
- package/dist/chunks/chunk.PSNV3IQZ.js +0 -1
- package/dist/chunks/chunk.Q6CVPPFA.js +0 -1
- package/dist/chunks/chunk.QDFHF7LY.js +0 -1
- package/dist/chunks/chunk.QEKPRA6B.js +0 -1
- package/dist/chunks/chunk.QGXUQL5S.js +0 -1
- package/dist/chunks/chunk.QGZOQXT5.js +0 -148
- package/dist/chunks/chunk.QH3KZBRJ.js +0 -1
- package/dist/chunks/chunk.QK5M4OHI.js +0 -1
- package/dist/chunks/chunk.R6RTP7QP.js +0 -1
- package/dist/chunks/chunk.RBPNA4JU.js +0 -22
- package/dist/chunks/chunk.REIUDVA3.js +0 -1
- package/dist/chunks/chunk.RH76C7M7.js +0 -1
- package/dist/chunks/chunk.RHDTWIMS.js +0 -1
- package/dist/chunks/chunk.RKLTK3FR.js +0 -1
- package/dist/chunks/chunk.RLOQMCKP.js +0 -1
- package/dist/chunks/chunk.S65R5GMI.js +0 -1
- package/dist/chunks/chunk.S6AD3O5Y.js +0 -2
- package/dist/chunks/chunk.S6UNY7TY.js +0 -1
- package/dist/chunks/chunk.SAVXAZC3.js +0 -1
- package/dist/chunks/chunk.SDFUXOW6.js +0 -47
- package/dist/chunks/chunk.SM2LJQQZ.js +0 -1
- package/dist/chunks/chunk.SN4M25TW.js +0 -1
- package/dist/chunks/chunk.SP4US3KC.js +0 -1
- package/dist/chunks/chunk.SP7J3EGR.js +0 -1
- package/dist/chunks/chunk.ST6Y273B.js +0 -1
- package/dist/chunks/chunk.SW4EXLIK.js +0 -100
- package/dist/chunks/chunk.SYA4MGC4.js +0 -1
- package/dist/chunks/chunk.T3RRBLSI.js +0 -1
- package/dist/chunks/chunk.T5MMUQEM.js +0 -2
- package/dist/chunks/chunk.T5UOTK5T.js +0 -14
- package/dist/chunks/chunk.TCJYR6XR.js +0 -75
- package/dist/chunks/chunk.TEJABDMI.js +0 -1
- package/dist/chunks/chunk.TOUSLOQP.js +0 -19
- package/dist/chunks/chunk.TWL4OKWI.js +0 -1
- package/dist/chunks/chunk.TXJOFCEB.js +0 -20
- package/dist/chunks/chunk.U5DWDLRH.js +0 -25
- package/dist/chunks/chunk.UBXADY37.js +0 -566
- package/dist/chunks/chunk.UJUBD5K6.js +0 -1
- package/dist/chunks/chunk.UMIX7BEK.js +0 -1
- package/dist/chunks/chunk.UNPFONVM.js +0 -121
- package/dist/chunks/chunk.VM42BF4S.js +0 -1
- package/dist/chunks/chunk.VO2NGMYX.js +0 -1
- package/dist/chunks/chunk.VPEIRF5L.js +0 -1
- package/dist/chunks/chunk.VQBTIXTR.js +0 -1
- package/dist/chunks/chunk.VRGYQH3V.js +0 -1
- package/dist/chunks/chunk.W22Z5NC6.js +0 -1
- package/dist/chunks/chunk.W2AIXOEB.js +0 -1
- package/dist/chunks/chunk.W37YFNFN.js +0 -1
- package/dist/chunks/chunk.W7LK5SL4.js +0 -1
- package/dist/chunks/chunk.WHM6GYCJ.js +0 -1
- package/dist/chunks/chunk.WSK5WSL4.js +0 -1
- package/dist/chunks/chunk.X3J4I27U.js +0 -1
- package/dist/chunks/chunk.XD4664TI.js +0 -16
- package/dist/chunks/chunk.XIGVC4SV.js +0 -62
- package/dist/chunks/chunk.XS3KPVEZ.js +0 -1
- package/dist/chunks/chunk.XX7TMK7N.js +0 -1
- package/dist/chunks/chunk.Y5DJ2TIT.js +0 -1
- package/dist/chunks/chunk.YH36XKHI.js +0 -1
- package/dist/chunks/chunk.YJCP5H5H.js +0 -1
- package/dist/chunks/chunk.YUFCED44.js +0 -64
- package/dist/chunks/chunk.Z5WR5G6V.js +0 -35
- package/dist/chunks/chunk.ZAO2ZNCW.js +0 -1
- package/dist/chunks/chunk.ZCO5H22U.js +0 -1
- package/dist/chunks/chunk.ZJRSMGBD.js +0 -1
- package/dist/chunks/chunk.ZOFZPC6S.js +0 -9
- package/dist/chunks/chunk.ZWQ5GUBX.js +0 -55
- package/dist/chunks/chunk.ZZDDQ567.js +0 -1
- package/dist/events/terra-map-change.d.ts +0 -14
- package/dist/terra_ui_components-0.0.203-py3-none-any.whl +0 -0
- package/dist/terra_ui_components-0.0.203.tar.gz +0 -0
|
@@ -0,0 +1,4980 @@
|
|
|
1
|
+
import {
|
|
2
|
+
fontWeights,
|
|
3
|
+
getFontParameters
|
|
4
|
+
} from "./chunk.D2OCF56Z.js";
|
|
5
|
+
import {
|
|
6
|
+
Geometry_default,
|
|
7
|
+
ImageState_default,
|
|
8
|
+
Point_default,
|
|
9
|
+
Polygon_default,
|
|
10
|
+
SimpleGeometry_default,
|
|
11
|
+
arrayMaxSquaredDelta,
|
|
12
|
+
asArray,
|
|
13
|
+
asString,
|
|
14
|
+
assignClosestArrayPoint,
|
|
15
|
+
assignClosestMultiArrayPoint,
|
|
16
|
+
assignClosestPoint,
|
|
17
|
+
decodeFallback,
|
|
18
|
+
deflateCoordinates,
|
|
19
|
+
deflateCoordinatesArray,
|
|
20
|
+
deflateMultiCoordinatesArray,
|
|
21
|
+
douglasPeucker,
|
|
22
|
+
douglasPeuckerArray,
|
|
23
|
+
getInteriorPointsOfMultiArray,
|
|
24
|
+
inflateCoordinates,
|
|
25
|
+
inflateCoordinatesArray,
|
|
26
|
+
inflateMultiCoordinatesArray,
|
|
27
|
+
linearRingss,
|
|
28
|
+
linearRingssAreOriented,
|
|
29
|
+
maxSquaredDelta,
|
|
30
|
+
multiArrayMaxSquaredDelta,
|
|
31
|
+
orientLinearRingsArray,
|
|
32
|
+
quantizeMultiArray,
|
|
33
|
+
toString
|
|
34
|
+
} from "./chunk.OSNWOWQ2.js";
|
|
35
|
+
import {
|
|
36
|
+
assert,
|
|
37
|
+
forEach,
|
|
38
|
+
intersectsLineString,
|
|
39
|
+
intersectsLineStringArray,
|
|
40
|
+
intersectsLinearRingMultiArray,
|
|
41
|
+
linearRingssContainsXY,
|
|
42
|
+
toSize
|
|
43
|
+
} from "./chunk.WMGJ3MAP.js";
|
|
44
|
+
import {
|
|
45
|
+
EventType_default,
|
|
46
|
+
Object_default,
|
|
47
|
+
Target_default,
|
|
48
|
+
WORKER_OFFSCREEN_CANVAS,
|
|
49
|
+
abstract,
|
|
50
|
+
binarySearch,
|
|
51
|
+
createCanvasContext2D,
|
|
52
|
+
extend,
|
|
53
|
+
getSharedCanvasContext2D,
|
|
54
|
+
getUid,
|
|
55
|
+
listen,
|
|
56
|
+
unlistenByKey
|
|
57
|
+
} from "./chunk.2B2TSVNY.js";
|
|
58
|
+
import {
|
|
59
|
+
closestSquaredDistanceXY,
|
|
60
|
+
containsXY,
|
|
61
|
+
createEmpty,
|
|
62
|
+
createOrUpdateEmpty,
|
|
63
|
+
createOrUpdateFromFlatCoordinates,
|
|
64
|
+
extend as extend2,
|
|
65
|
+
getCenter,
|
|
66
|
+
lerp,
|
|
67
|
+
squaredDistance
|
|
68
|
+
} from "./chunk.S5UFNVHZ.js";
|
|
69
|
+
import {
|
|
70
|
+
clear
|
|
71
|
+
} from "./chunk.KRVDOVGU.js";
|
|
72
|
+
import {
|
|
73
|
+
init_buffer,
|
|
74
|
+
init_dirname,
|
|
75
|
+
init_process
|
|
76
|
+
} from "./chunk.IIJBAEGD.js";
|
|
77
|
+
|
|
78
|
+
// node_modules/ol/style/Circle.js
|
|
79
|
+
init_dirname();
|
|
80
|
+
init_buffer();
|
|
81
|
+
init_process();
|
|
82
|
+
|
|
83
|
+
// node_modules/ol/style/RegularShape.js
|
|
84
|
+
init_dirname();
|
|
85
|
+
init_buffer();
|
|
86
|
+
init_process();
|
|
87
|
+
|
|
88
|
+
// node_modules/ol/colorlike.js
|
|
89
|
+
init_dirname();
|
|
90
|
+
init_buffer();
|
|
91
|
+
init_process();
|
|
92
|
+
|
|
93
|
+
// node_modules/ol/style/IconImage.js
|
|
94
|
+
init_dirname();
|
|
95
|
+
init_buffer();
|
|
96
|
+
init_process();
|
|
97
|
+
|
|
98
|
+
// node_modules/ol/style/IconImageCache.js
|
|
99
|
+
init_dirname();
|
|
100
|
+
init_buffer();
|
|
101
|
+
init_process();
|
|
102
|
+
var IconImageCache = class {
|
|
103
|
+
constructor() {
|
|
104
|
+
this.cache_ = {};
|
|
105
|
+
this.patternCache_ = {};
|
|
106
|
+
this.cacheSize_ = 0;
|
|
107
|
+
this.maxCacheSize_ = 1024;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* FIXME empty description for jsdoc
|
|
111
|
+
*/
|
|
112
|
+
clear() {
|
|
113
|
+
this.cache_ = {};
|
|
114
|
+
this.patternCache_ = {};
|
|
115
|
+
this.cacheSize_ = 0;
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* @return {boolean} Can expire cache.
|
|
119
|
+
*/
|
|
120
|
+
canExpireCache() {
|
|
121
|
+
return this.cacheSize_ > this.maxCacheSize_;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* FIXME empty description for jsdoc
|
|
125
|
+
*/
|
|
126
|
+
expire() {
|
|
127
|
+
if (this.canExpireCache()) {
|
|
128
|
+
let i = 0;
|
|
129
|
+
for (const key in this.cache_) {
|
|
130
|
+
const iconImage = this.cache_[key];
|
|
131
|
+
if ((i++ & 3) === 0 && !iconImage.hasListener()) {
|
|
132
|
+
delete this.cache_[key];
|
|
133
|
+
delete this.patternCache_[key];
|
|
134
|
+
--this.cacheSize_;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* @param {string} src Src.
|
|
141
|
+
* @param {import("../color.js").Color|string|null} color Color.
|
|
142
|
+
* @return {import("./IconImage.js").default|null} Icon image.
|
|
143
|
+
*/
|
|
144
|
+
get(src, color) {
|
|
145
|
+
const key = getCacheKey(src, color);
|
|
146
|
+
const icon = key in this.cache_ ? this.cache_[key] : null;
|
|
147
|
+
return icon;
|
|
148
|
+
}
|
|
149
|
+
/**
|
|
150
|
+
* @param {string} src Src.
|
|
151
|
+
* @param {import("../color.js").Color|string|null} color Color.
|
|
152
|
+
* @return {CanvasPattern|null} Icon image.
|
|
153
|
+
*/
|
|
154
|
+
getPattern(src, color) {
|
|
155
|
+
const key = getCacheKey(src, color);
|
|
156
|
+
return key in this.patternCache_ ? this.patternCache_[key] : null;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* @param {string} src Src.
|
|
160
|
+
* @param {import("../color.js").Color|string|null} color Color.
|
|
161
|
+
* @param {import("./IconImage.js").default|null} iconImage Icon image.
|
|
162
|
+
* @param {boolean} [pattern] Also cache a `'repeat'` pattern with this `iconImage`.
|
|
163
|
+
*/
|
|
164
|
+
set(src, color, iconImage, pattern) {
|
|
165
|
+
const key = getCacheKey(src, color);
|
|
166
|
+
const update = key in this.cache_;
|
|
167
|
+
if (iconImage) {
|
|
168
|
+
this.cache_[key] = iconImage;
|
|
169
|
+
}
|
|
170
|
+
if (pattern && iconImage) {
|
|
171
|
+
if (iconImage.getImageState() === ImageState_default.IDLE) {
|
|
172
|
+
iconImage.load();
|
|
173
|
+
}
|
|
174
|
+
if (iconImage.getImageState() === ImageState_default.LOADING) {
|
|
175
|
+
iconImage.ready().then(() => {
|
|
176
|
+
const patternFill = getSharedCanvasContext2D().createPattern(
|
|
177
|
+
iconImage.getImage(1),
|
|
178
|
+
"repeat"
|
|
179
|
+
);
|
|
180
|
+
if (patternFill) {
|
|
181
|
+
this.patternCache_[key] = patternFill;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
} else {
|
|
185
|
+
const patternFill = getSharedCanvasContext2D().createPattern(
|
|
186
|
+
iconImage.getImage(1),
|
|
187
|
+
"repeat"
|
|
188
|
+
);
|
|
189
|
+
if (patternFill) {
|
|
190
|
+
this.patternCache_[key] = patternFill;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (!update) {
|
|
195
|
+
++this.cacheSize_;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Set the cache size of the icon cache. Default is `1024`. Change this value when
|
|
200
|
+
* your map uses more than 1024 different icon images and you are not caching icon
|
|
201
|
+
* styles on the application level.
|
|
202
|
+
* @param {number} maxCacheSize Cache max size.
|
|
203
|
+
* @api
|
|
204
|
+
*/
|
|
205
|
+
setSize(maxCacheSize) {
|
|
206
|
+
this.maxCacheSize_ = maxCacheSize;
|
|
207
|
+
this.expire();
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
function getCacheKey(src, color) {
|
|
211
|
+
const colorString = color ? asArray(color) : "null";
|
|
212
|
+
return src + ":" + colorString;
|
|
213
|
+
}
|
|
214
|
+
var shared = new IconImageCache();
|
|
215
|
+
|
|
216
|
+
// node_modules/ol/style/IconImage.js
|
|
217
|
+
var taintedTestContext = null;
|
|
218
|
+
var IconImage = class extends Target_default {
|
|
219
|
+
/**
|
|
220
|
+
* @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap|null} image Image.
|
|
221
|
+
* @param {string|undefined} src Src.
|
|
222
|
+
* @param {import('../dom.js').ImageAttributes} imageAttributes Image attributes options.
|
|
223
|
+
* @param {import("../ImageState.js").default|undefined} imageState Image state.
|
|
224
|
+
* @param {import("../color.js").Color|string|null} color Color.
|
|
225
|
+
*/
|
|
226
|
+
constructor(image, src, imageAttributes, imageState, color) {
|
|
227
|
+
var _a;
|
|
228
|
+
super();
|
|
229
|
+
this.hitDetectionImage_ = null;
|
|
230
|
+
this.image_ = image;
|
|
231
|
+
this.crossOrigin_ = (_a = imageAttributes == null ? void 0 : imageAttributes.crossOrigin) != null ? _a : null;
|
|
232
|
+
this.referrerPolicy_ = imageAttributes == null ? void 0 : imageAttributes.referrerPolicy;
|
|
233
|
+
this.canvas_ = {};
|
|
234
|
+
this.color_ = color;
|
|
235
|
+
this.imageState_ = imageState === void 0 ? ImageState_default.IDLE : imageState;
|
|
236
|
+
this.size_ = image && image.width && image.height ? [image.width, image.height] : null;
|
|
237
|
+
this.src_ = src;
|
|
238
|
+
this.tainted_;
|
|
239
|
+
this.ready_ = null;
|
|
240
|
+
}
|
|
241
|
+
/**
|
|
242
|
+
* @private
|
|
243
|
+
*/
|
|
244
|
+
initializeImage_() {
|
|
245
|
+
this.image_ = new Image();
|
|
246
|
+
if (this.crossOrigin_ !== null) {
|
|
247
|
+
this.image_.crossOrigin = this.crossOrigin_;
|
|
248
|
+
}
|
|
249
|
+
if (this.referrerPolicy_ !== void 0) {
|
|
250
|
+
this.image_.referrerPolicy = this.referrerPolicy_;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
/**
|
|
254
|
+
* @private
|
|
255
|
+
* @return {boolean} The image canvas is tainted.
|
|
256
|
+
*/
|
|
257
|
+
isTainted_() {
|
|
258
|
+
if (this.tainted_ === void 0 && this.imageState_ === ImageState_default.LOADED) {
|
|
259
|
+
const image = this.image_;
|
|
260
|
+
if (!image) {
|
|
261
|
+
return false;
|
|
262
|
+
}
|
|
263
|
+
if (!taintedTestContext) {
|
|
264
|
+
taintedTestContext = createCanvasContext2D(1, 1, void 0, {
|
|
265
|
+
willReadFrequently: true
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
taintedTestContext.drawImage(
|
|
269
|
+
/** @type {CanvasImageSource} */
|
|
270
|
+
image,
|
|
271
|
+
0,
|
|
272
|
+
0
|
|
273
|
+
);
|
|
274
|
+
try {
|
|
275
|
+
taintedTestContext.getImageData(0, 0, 1, 1);
|
|
276
|
+
this.tainted_ = false;
|
|
277
|
+
} catch (e) {
|
|
278
|
+
taintedTestContext = null;
|
|
279
|
+
this.tainted_ = true;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return this.tainted_ === true;
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* @private
|
|
286
|
+
*/
|
|
287
|
+
dispatchChangeEvent_() {
|
|
288
|
+
this.dispatchEvent(EventType_default.CHANGE);
|
|
289
|
+
}
|
|
290
|
+
/**
|
|
291
|
+
* @private
|
|
292
|
+
*/
|
|
293
|
+
handleImageError_() {
|
|
294
|
+
this.imageState_ = ImageState_default.ERROR;
|
|
295
|
+
this.dispatchChangeEvent_();
|
|
296
|
+
}
|
|
297
|
+
/**
|
|
298
|
+
* @private
|
|
299
|
+
*/
|
|
300
|
+
handleImageLoad_() {
|
|
301
|
+
this.imageState_ = ImageState_default.LOADED;
|
|
302
|
+
const image = this.image_;
|
|
303
|
+
if (image && "width" in image && "height" in image) {
|
|
304
|
+
this.size_ = [image.width, image.height];
|
|
305
|
+
}
|
|
306
|
+
this.dispatchChangeEvent_();
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* @param {number} pixelRatio Pixel ratio.
|
|
310
|
+
* @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image or Canvas element or image bitmap.
|
|
311
|
+
*/
|
|
312
|
+
getImage(pixelRatio) {
|
|
313
|
+
if (!this.image_) {
|
|
314
|
+
this.initializeImage_();
|
|
315
|
+
}
|
|
316
|
+
this.replaceColor_(pixelRatio);
|
|
317
|
+
const image = this.image_;
|
|
318
|
+
return this.canvas_[pixelRatio] ? this.canvas_[pixelRatio] : (
|
|
319
|
+
/** @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} */
|
|
320
|
+
image
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
/**
|
|
324
|
+
* @param {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} image Image.
|
|
325
|
+
*/
|
|
326
|
+
setImage(image) {
|
|
327
|
+
this.image_ = image;
|
|
328
|
+
}
|
|
329
|
+
/**
|
|
330
|
+
* @param {number} pixelRatio Pixel ratio.
|
|
331
|
+
* @return {number} Image or Canvas element.
|
|
332
|
+
*/
|
|
333
|
+
getPixelRatio(pixelRatio) {
|
|
334
|
+
this.replaceColor_(pixelRatio);
|
|
335
|
+
return this.canvas_[pixelRatio] ? pixelRatio : 1;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* @return {import("../ImageState.js").default} Image state.
|
|
339
|
+
*/
|
|
340
|
+
getImageState() {
|
|
341
|
+
return this.imageState_;
|
|
342
|
+
}
|
|
343
|
+
/**
|
|
344
|
+
* @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image element.
|
|
345
|
+
*/
|
|
346
|
+
getHitDetectionImage() {
|
|
347
|
+
if (!this.image_) {
|
|
348
|
+
this.initializeImage_();
|
|
349
|
+
}
|
|
350
|
+
if (!this.hitDetectionImage_) {
|
|
351
|
+
if (this.isTainted_()) {
|
|
352
|
+
const size = this.size_;
|
|
353
|
+
if (!size) {
|
|
354
|
+
return (
|
|
355
|
+
/** @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} */
|
|
356
|
+
this.image_
|
|
357
|
+
);
|
|
358
|
+
}
|
|
359
|
+
const width = size[0];
|
|
360
|
+
const height = size[1];
|
|
361
|
+
const context = createCanvasContext2D(width, height);
|
|
362
|
+
context.fillRect(0, 0, width, height);
|
|
363
|
+
this.hitDetectionImage_ = context.canvas;
|
|
364
|
+
} else {
|
|
365
|
+
this.hitDetectionImage_ = this.image_;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
return (
|
|
369
|
+
/** @type {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} */
|
|
370
|
+
this.hitDetectionImage_
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
/**
|
|
374
|
+
* Get the size of the icon (in pixels).
|
|
375
|
+
* @return {import("../size.js").Size|null} Image size.
|
|
376
|
+
*/
|
|
377
|
+
getSize() {
|
|
378
|
+
return this.size_;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* @return {string|undefined} Image src.
|
|
382
|
+
*/
|
|
383
|
+
getSrc() {
|
|
384
|
+
return this.src_;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Load not yet loaded URI.
|
|
388
|
+
*/
|
|
389
|
+
load() {
|
|
390
|
+
if (this.imageState_ !== ImageState_default.IDLE) {
|
|
391
|
+
return;
|
|
392
|
+
}
|
|
393
|
+
if (!this.image_) {
|
|
394
|
+
this.initializeImage_();
|
|
395
|
+
}
|
|
396
|
+
this.imageState_ = ImageState_default.LOADING;
|
|
397
|
+
try {
|
|
398
|
+
if (this.src_ !== void 0) {
|
|
399
|
+
this.image_.src = this.src_;
|
|
400
|
+
}
|
|
401
|
+
} catch (e) {
|
|
402
|
+
this.handleImageError_();
|
|
403
|
+
}
|
|
404
|
+
if (this.image_ instanceof HTMLImageElement) {
|
|
405
|
+
decodeFallback(this.image_, this.src_).then((image) => {
|
|
406
|
+
this.image_ = image;
|
|
407
|
+
this.handleImageLoad_();
|
|
408
|
+
}).catch(this.handleImageError_.bind(this));
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
/**
|
|
412
|
+
* @param {number} pixelRatio Pixel ratio.
|
|
413
|
+
* @private
|
|
414
|
+
*/
|
|
415
|
+
replaceColor_(pixelRatio) {
|
|
416
|
+
if (!this.color_ || this.canvas_[pixelRatio] || this.imageState_ !== ImageState_default.LOADED) {
|
|
417
|
+
return;
|
|
418
|
+
}
|
|
419
|
+
const image = this.image_;
|
|
420
|
+
if (!image) {
|
|
421
|
+
return;
|
|
422
|
+
}
|
|
423
|
+
const ctx = createCanvasContext2D(
|
|
424
|
+
Math.ceil(image.width * pixelRatio),
|
|
425
|
+
Math.ceil(image.height * pixelRatio)
|
|
426
|
+
);
|
|
427
|
+
const canvas = ctx.canvas;
|
|
428
|
+
ctx.scale(pixelRatio, pixelRatio);
|
|
429
|
+
ctx.drawImage(
|
|
430
|
+
/** @type {CanvasImageSource} */
|
|
431
|
+
image,
|
|
432
|
+
0,
|
|
433
|
+
0
|
|
434
|
+
);
|
|
435
|
+
ctx.globalCompositeOperation = "multiply";
|
|
436
|
+
ctx.fillStyle = asString(this.color_);
|
|
437
|
+
ctx.fillRect(0, 0, canvas.width / pixelRatio, canvas.height / pixelRatio);
|
|
438
|
+
ctx.globalCompositeOperation = "destination-in";
|
|
439
|
+
ctx.drawImage(
|
|
440
|
+
/** @type {CanvasImageSource} */
|
|
441
|
+
image,
|
|
442
|
+
0,
|
|
443
|
+
0
|
|
444
|
+
);
|
|
445
|
+
this.canvas_[pixelRatio] = canvas;
|
|
446
|
+
}
|
|
447
|
+
/**
|
|
448
|
+
* @return {Promise<void>} Promise that resolves when the image is loaded.
|
|
449
|
+
*/
|
|
450
|
+
ready() {
|
|
451
|
+
if (!this.ready_) {
|
|
452
|
+
this.ready_ = new Promise((resolve) => {
|
|
453
|
+
if (this.imageState_ === ImageState_default.LOADED || this.imageState_ === ImageState_default.ERROR) {
|
|
454
|
+
resolve();
|
|
455
|
+
} else {
|
|
456
|
+
const onChange = () => {
|
|
457
|
+
if (this.imageState_ === ImageState_default.LOADED || this.imageState_ === ImageState_default.ERROR) {
|
|
458
|
+
this.removeEventListener(EventType_default.CHANGE, onChange);
|
|
459
|
+
resolve();
|
|
460
|
+
}
|
|
461
|
+
};
|
|
462
|
+
this.addEventListener(EventType_default.CHANGE, onChange);
|
|
463
|
+
}
|
|
464
|
+
});
|
|
465
|
+
}
|
|
466
|
+
return this.ready_;
|
|
467
|
+
}
|
|
468
|
+
};
|
|
469
|
+
function get(image, src, imageAttributes, imageState, color, pattern) {
|
|
470
|
+
let iconImage = src === void 0 ? void 0 : shared.get(src, color);
|
|
471
|
+
if (!iconImage) {
|
|
472
|
+
iconImage = new IconImage(
|
|
473
|
+
image,
|
|
474
|
+
image && "src" in image ? image.src || void 0 : src,
|
|
475
|
+
imageAttributes,
|
|
476
|
+
imageState,
|
|
477
|
+
color
|
|
478
|
+
);
|
|
479
|
+
if (src !== void 0) {
|
|
480
|
+
shared.set(src, color, iconImage, pattern);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
if (pattern && iconImage && src !== void 0 && !shared.getPattern(src, color)) {
|
|
484
|
+
shared.set(src, color, iconImage, pattern);
|
|
485
|
+
}
|
|
486
|
+
return iconImage;
|
|
487
|
+
}
|
|
488
|
+
var IconImage_default = IconImage;
|
|
489
|
+
|
|
490
|
+
// node_modules/ol/colorlike.js
|
|
491
|
+
function asColorLike(color) {
|
|
492
|
+
if (!color) {
|
|
493
|
+
return null;
|
|
494
|
+
}
|
|
495
|
+
if (Array.isArray(color)) {
|
|
496
|
+
return toString(color);
|
|
497
|
+
}
|
|
498
|
+
if (typeof color === "object" && "src" in color) {
|
|
499
|
+
return asCanvasPattern(color);
|
|
500
|
+
}
|
|
501
|
+
return color;
|
|
502
|
+
}
|
|
503
|
+
function asCanvasPattern(pattern) {
|
|
504
|
+
var _a, _b, _c, _d;
|
|
505
|
+
if (!pattern.offset || !pattern.size) {
|
|
506
|
+
return shared.getPattern(pattern.src, (_a = pattern.color) != null ? _a : null);
|
|
507
|
+
}
|
|
508
|
+
const cacheKey = pattern.src + ":" + pattern.offset;
|
|
509
|
+
const canvasPattern = shared.getPattern(cacheKey, (_b = pattern.color) != null ? _b : null);
|
|
510
|
+
if (canvasPattern) {
|
|
511
|
+
return canvasPattern;
|
|
512
|
+
}
|
|
513
|
+
const iconImage = shared.get(pattern.src, null);
|
|
514
|
+
if (!iconImage || iconImage.getImageState() !== ImageState_default.LOADED) {
|
|
515
|
+
return null;
|
|
516
|
+
}
|
|
517
|
+
const patternCanvasContext = createCanvasContext2D(
|
|
518
|
+
pattern.size[0],
|
|
519
|
+
pattern.size[1]
|
|
520
|
+
);
|
|
521
|
+
patternCanvasContext.drawImage(
|
|
522
|
+
iconImage.getImage(1),
|
|
523
|
+
pattern.offset[0],
|
|
524
|
+
pattern.offset[1],
|
|
525
|
+
pattern.size[0],
|
|
526
|
+
pattern.size[1],
|
|
527
|
+
0,
|
|
528
|
+
0,
|
|
529
|
+
pattern.size[0],
|
|
530
|
+
pattern.size[1]
|
|
531
|
+
);
|
|
532
|
+
get(
|
|
533
|
+
patternCanvasContext.canvas,
|
|
534
|
+
cacheKey,
|
|
535
|
+
{},
|
|
536
|
+
ImageState_default.LOADED,
|
|
537
|
+
(_c = pattern.color) != null ? _c : null,
|
|
538
|
+
true
|
|
539
|
+
);
|
|
540
|
+
return shared.getPattern(cacheKey, (_d = pattern.color) != null ? _d : null);
|
|
541
|
+
}
|
|
542
|
+
|
|
543
|
+
// node_modules/ol/render/canvas.js
|
|
544
|
+
init_dirname();
|
|
545
|
+
init_buffer();
|
|
546
|
+
init_process();
|
|
547
|
+
var defaultFont = "10px sans-serif";
|
|
548
|
+
var defaultFillStyle = "#000";
|
|
549
|
+
var defaultLineCap = "round";
|
|
550
|
+
var defaultLineDash = [];
|
|
551
|
+
var defaultLineDashOffset = 0;
|
|
552
|
+
var defaultLineJoin = "round";
|
|
553
|
+
var defaultMiterLimit = 10;
|
|
554
|
+
var defaultStrokeOffset = 0;
|
|
555
|
+
var defaultStrokeStyle = "#000";
|
|
556
|
+
var defaultTextAlign = "center";
|
|
557
|
+
var defaultTextBaseline = "middle";
|
|
558
|
+
var defaultPadding = [0, 0, 0, 0];
|
|
559
|
+
var defaultLineWidth = 1;
|
|
560
|
+
var checkedFonts = new Object_default();
|
|
561
|
+
var measureContext = null;
|
|
562
|
+
var measureFont;
|
|
563
|
+
var textHeights = {};
|
|
564
|
+
var genericFontFamilies = /* @__PURE__ */ new Set([
|
|
565
|
+
"serif",
|
|
566
|
+
"sans-serif",
|
|
567
|
+
"monospace",
|
|
568
|
+
"cursive",
|
|
569
|
+
"fantasy",
|
|
570
|
+
"system-ui",
|
|
571
|
+
"ui-serif",
|
|
572
|
+
"ui-sans-serif",
|
|
573
|
+
"ui-monospace",
|
|
574
|
+
"ui-rounded",
|
|
575
|
+
"emoji",
|
|
576
|
+
"math",
|
|
577
|
+
"fangsong"
|
|
578
|
+
]);
|
|
579
|
+
function getFontKey(style, weight, family) {
|
|
580
|
+
return `${style} ${weight} 16px "${family}"`;
|
|
581
|
+
}
|
|
582
|
+
var registerFont = /* @__PURE__ */ (function() {
|
|
583
|
+
const retries = 100;
|
|
584
|
+
let timeout;
|
|
585
|
+
let fontFaceSet;
|
|
586
|
+
async function isAvailable(fontSpec) {
|
|
587
|
+
await fontFaceSet.ready;
|
|
588
|
+
const fontParams = getFontParameters(fontSpec);
|
|
589
|
+
if (!fontParams) {
|
|
590
|
+
return false;
|
|
591
|
+
}
|
|
592
|
+
const checkFamily = fontParams.families[0].toLowerCase();
|
|
593
|
+
const checkWeight = fontParams.weight;
|
|
594
|
+
const matching = [];
|
|
595
|
+
fontFaceSet.forEach(
|
|
596
|
+
/**
|
|
597
|
+
* @param {FontFace} f Font face.
|
|
598
|
+
*/
|
|
599
|
+
(f) => {
|
|
600
|
+
const family = f.family.replace(/^['"]|['"]$/g, "").toLowerCase();
|
|
601
|
+
const weight = fontWeights[f.weight] || f.weight;
|
|
602
|
+
if (family === checkFamily && f.style === fontParams.style && weight == checkWeight) {
|
|
603
|
+
matching.push(f);
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
);
|
|
607
|
+
if (matching.length === 0) {
|
|
608
|
+
return false;
|
|
609
|
+
}
|
|
610
|
+
const loaded = await Promise.all(
|
|
611
|
+
matching.map(
|
|
612
|
+
(f) => f.load().then(
|
|
613
|
+
() => true,
|
|
614
|
+
// available
|
|
615
|
+
() => false
|
|
616
|
+
// not available
|
|
617
|
+
)
|
|
618
|
+
)
|
|
619
|
+
);
|
|
620
|
+
return loaded.some((available) => available);
|
|
621
|
+
}
|
|
622
|
+
async function check() {
|
|
623
|
+
await fontFaceSet.ready;
|
|
624
|
+
let done = true;
|
|
625
|
+
const checkedFontsProperties = checkedFonts.getProperties();
|
|
626
|
+
const fonts = Object.keys(checkedFontsProperties).filter(
|
|
627
|
+
(key) => checkedFontsProperties[key] < retries
|
|
628
|
+
);
|
|
629
|
+
for (let i = fonts.length - 1; i >= 0; --i) {
|
|
630
|
+
const font = fonts[i];
|
|
631
|
+
let currentRetries = checkedFontsProperties[font];
|
|
632
|
+
if (currentRetries < retries) {
|
|
633
|
+
if (await isAvailable(font)) {
|
|
634
|
+
clear(textHeights);
|
|
635
|
+
checkedFonts.set(font, retries);
|
|
636
|
+
} else {
|
|
637
|
+
currentRetries += 10;
|
|
638
|
+
checkedFonts.set(font, currentRetries, true);
|
|
639
|
+
if (currentRetries < retries) {
|
|
640
|
+
done = false;
|
|
641
|
+
}
|
|
642
|
+
}
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
timeout = void 0;
|
|
646
|
+
if (!done) {
|
|
647
|
+
timeout = setTimeout(check, 100);
|
|
648
|
+
}
|
|
649
|
+
}
|
|
650
|
+
return async function(fontSpec) {
|
|
651
|
+
if (!fontFaceSet) {
|
|
652
|
+
fontFaceSet = WORKER_OFFSCREEN_CANVAS ? self.fonts : document.fonts;
|
|
653
|
+
}
|
|
654
|
+
const fontParams = getFontParameters(fontSpec);
|
|
655
|
+
if (!fontParams) {
|
|
656
|
+
return;
|
|
657
|
+
}
|
|
658
|
+
const families = fontParams.families;
|
|
659
|
+
let needCheck = false;
|
|
660
|
+
for (const family of families) {
|
|
661
|
+
if (genericFontFamilies.has(family)) {
|
|
662
|
+
continue;
|
|
663
|
+
}
|
|
664
|
+
const key = getFontKey(fontParams.style, fontParams.weight, family);
|
|
665
|
+
if (checkedFonts.get(key) !== void 0) {
|
|
666
|
+
continue;
|
|
667
|
+
}
|
|
668
|
+
checkedFonts.set(key, 0, true);
|
|
669
|
+
needCheck = true;
|
|
670
|
+
}
|
|
671
|
+
if (needCheck) {
|
|
672
|
+
clearTimeout(timeout);
|
|
673
|
+
timeout = setTimeout(check, 100);
|
|
674
|
+
}
|
|
675
|
+
};
|
|
676
|
+
})();
|
|
677
|
+
var measureTextHeight = /* @__PURE__ */ (function() {
|
|
678
|
+
let measureElement;
|
|
679
|
+
return function(fontSpec) {
|
|
680
|
+
let height = textHeights[fontSpec];
|
|
681
|
+
if (height == void 0) {
|
|
682
|
+
if (WORKER_OFFSCREEN_CANVAS) {
|
|
683
|
+
const fontParams = getFontParameters(fontSpec);
|
|
684
|
+
const metrics = measureText(fontSpec, "\u017Dg");
|
|
685
|
+
const lineHeight = !fontParams || isNaN(Number(fontParams.lineHeight)) ? 1.2 : Number(fontParams.lineHeight);
|
|
686
|
+
height = lineHeight * (metrics.actualBoundingBoxAscent + metrics.actualBoundingBoxDescent);
|
|
687
|
+
} else {
|
|
688
|
+
if (!measureElement) {
|
|
689
|
+
measureElement = document.createElement("div");
|
|
690
|
+
measureElement.innerHTML = "M";
|
|
691
|
+
measureElement.style.minHeight = "0";
|
|
692
|
+
measureElement.style.maxHeight = "none";
|
|
693
|
+
measureElement.style.height = "auto";
|
|
694
|
+
measureElement.style.padding = "0";
|
|
695
|
+
measureElement.style.border = "none";
|
|
696
|
+
measureElement.style.position = "absolute";
|
|
697
|
+
measureElement.style.display = "block";
|
|
698
|
+
measureElement.style.left = "-99999px";
|
|
699
|
+
}
|
|
700
|
+
measureElement.style.font = fontSpec;
|
|
701
|
+
document.body.appendChild(measureElement);
|
|
702
|
+
height = measureElement.offsetHeight;
|
|
703
|
+
document.body.removeChild(measureElement);
|
|
704
|
+
}
|
|
705
|
+
textHeights[fontSpec] = height;
|
|
706
|
+
}
|
|
707
|
+
return height;
|
|
708
|
+
};
|
|
709
|
+
})();
|
|
710
|
+
function measureText(font, text) {
|
|
711
|
+
if (!measureContext) {
|
|
712
|
+
measureContext = createCanvasContext2D(1, 1);
|
|
713
|
+
}
|
|
714
|
+
if (font != measureFont) {
|
|
715
|
+
measureContext.font = font;
|
|
716
|
+
measureFont = measureContext.font;
|
|
717
|
+
}
|
|
718
|
+
return measureContext.measureText(text);
|
|
719
|
+
}
|
|
720
|
+
function measureTextWidth(font, text) {
|
|
721
|
+
return measureText(font, text).width;
|
|
722
|
+
}
|
|
723
|
+
function measureAndCacheTextWidth(font, text, cache) {
|
|
724
|
+
if (text in cache) {
|
|
725
|
+
return cache[text];
|
|
726
|
+
}
|
|
727
|
+
const width = text.split("\n").reduce((prev, curr) => Math.max(prev, measureTextWidth(font, curr)), 0);
|
|
728
|
+
cache[text] = width;
|
|
729
|
+
return width;
|
|
730
|
+
}
|
|
731
|
+
function getTextDimensions(baseStyle, chunks) {
|
|
732
|
+
const widths = [];
|
|
733
|
+
const heights = [];
|
|
734
|
+
const lineWidths = [];
|
|
735
|
+
let width = 0;
|
|
736
|
+
let lineWidth = 0;
|
|
737
|
+
let height = 0;
|
|
738
|
+
let lineHeight = 0;
|
|
739
|
+
for (let i = 0, ii = chunks.length; i <= ii; i += 2) {
|
|
740
|
+
const text = chunks[i];
|
|
741
|
+
if (text === "\n" || i === ii) {
|
|
742
|
+
width = Math.max(width, lineWidth);
|
|
743
|
+
lineWidths.push(lineWidth);
|
|
744
|
+
lineWidth = 0;
|
|
745
|
+
height += lineHeight;
|
|
746
|
+
lineHeight = 0;
|
|
747
|
+
continue;
|
|
748
|
+
}
|
|
749
|
+
const font = chunks[i + 1] || baseStyle.font;
|
|
750
|
+
const currentWidth = measureTextWidth(font, text);
|
|
751
|
+
widths.push(currentWidth);
|
|
752
|
+
lineWidth += currentWidth;
|
|
753
|
+
const currentHeight = measureTextHeight(font);
|
|
754
|
+
heights.push(currentHeight);
|
|
755
|
+
lineHeight = Math.max(lineHeight, currentHeight);
|
|
756
|
+
}
|
|
757
|
+
return { width, height, widths, heights, lineWidths };
|
|
758
|
+
}
|
|
759
|
+
function drawImageOrLabel(context, transform, opacity, labelOrImage, originX, originY, w, h, x, y, scale) {
|
|
760
|
+
context.save();
|
|
761
|
+
if (opacity !== 1) {
|
|
762
|
+
if (context.globalAlpha === void 0) {
|
|
763
|
+
context.globalAlpha = function(ctx) {
|
|
764
|
+
return ctx.globalAlpha *= opacity;
|
|
765
|
+
};
|
|
766
|
+
} else {
|
|
767
|
+
context.globalAlpha *= opacity;
|
|
768
|
+
}
|
|
769
|
+
}
|
|
770
|
+
if (transform) {
|
|
771
|
+
context.transform.apply(
|
|
772
|
+
context,
|
|
773
|
+
/** @type {[number, number, number, number, number, number]} */
|
|
774
|
+
transform
|
|
775
|
+
);
|
|
776
|
+
}
|
|
777
|
+
if (
|
|
778
|
+
/** @type {*} */
|
|
779
|
+
labelOrImage.contextInstructions
|
|
780
|
+
) {
|
|
781
|
+
context.translate(x, y);
|
|
782
|
+
context.scale(scale[0], scale[1]);
|
|
783
|
+
executeLabelInstructions(
|
|
784
|
+
/** @type {Label} */
|
|
785
|
+
labelOrImage,
|
|
786
|
+
context
|
|
787
|
+
);
|
|
788
|
+
} else if (scale[0] < 0 || scale[1] < 0) {
|
|
789
|
+
context.translate(x, y);
|
|
790
|
+
context.scale(scale[0], scale[1]);
|
|
791
|
+
context.drawImage(
|
|
792
|
+
/** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */
|
|
793
|
+
labelOrImage,
|
|
794
|
+
originX,
|
|
795
|
+
originY,
|
|
796
|
+
w,
|
|
797
|
+
h,
|
|
798
|
+
0,
|
|
799
|
+
0,
|
|
800
|
+
w,
|
|
801
|
+
h
|
|
802
|
+
);
|
|
803
|
+
} else {
|
|
804
|
+
context.drawImage(
|
|
805
|
+
/** @type {HTMLCanvasElement|HTMLImageElement|HTMLVideoElement} */
|
|
806
|
+
labelOrImage,
|
|
807
|
+
originX,
|
|
808
|
+
originY,
|
|
809
|
+
w,
|
|
810
|
+
h,
|
|
811
|
+
x,
|
|
812
|
+
y,
|
|
813
|
+
w * scale[0],
|
|
814
|
+
h * scale[1]
|
|
815
|
+
);
|
|
816
|
+
}
|
|
817
|
+
context.restore();
|
|
818
|
+
}
|
|
819
|
+
function executeLabelInstructions(label, context) {
|
|
820
|
+
const ctx = (
|
|
821
|
+
/** @type {CanvasRenderingContext2D} */
|
|
822
|
+
context
|
|
823
|
+
);
|
|
824
|
+
const contextInstructions = label.contextInstructions;
|
|
825
|
+
for (let i = 0, ii = contextInstructions.length; i < ii; i += 2) {
|
|
826
|
+
if (Array.isArray(contextInstructions[i + 1])) {
|
|
827
|
+
const method = (
|
|
828
|
+
/** @type {string} */
|
|
829
|
+
contextInstructions[i]
|
|
830
|
+
);
|
|
831
|
+
/** @type {Object<string, *>} */
|
|
832
|
+
ctx[method].apply(ctx, contextInstructions[i + 1]);
|
|
833
|
+
} else {
|
|
834
|
+
const property = (
|
|
835
|
+
/** @type {string} */
|
|
836
|
+
contextInstructions[i]
|
|
837
|
+
);
|
|
838
|
+
ctx[property] = contextInstructions[i + 1];
|
|
839
|
+
}
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
|
|
843
|
+
// node_modules/ol/style/Image.js
|
|
844
|
+
init_dirname();
|
|
845
|
+
init_buffer();
|
|
846
|
+
init_process();
|
|
847
|
+
var ImageStyle = class _ImageStyle {
|
|
848
|
+
/**
|
|
849
|
+
* @param {Options} options Options.
|
|
850
|
+
*/
|
|
851
|
+
constructor(options) {
|
|
852
|
+
this.opacity_ = options.opacity;
|
|
853
|
+
this.rotateWithView_ = options.rotateWithView;
|
|
854
|
+
this.rotation_ = options.rotation;
|
|
855
|
+
this.scale_ = options.scale;
|
|
856
|
+
this.scaleArray_ = toSize(options.scale);
|
|
857
|
+
this.displacement_ = options.displacement;
|
|
858
|
+
this.declutterMode_ = options.declutterMode;
|
|
859
|
+
}
|
|
860
|
+
/**
|
|
861
|
+
* Clones the style.
|
|
862
|
+
* @return {ImageStyle} The cloned style.
|
|
863
|
+
* @api
|
|
864
|
+
*/
|
|
865
|
+
clone() {
|
|
866
|
+
const scale = this.getScale();
|
|
867
|
+
return new _ImageStyle({
|
|
868
|
+
opacity: this.getOpacity(),
|
|
869
|
+
scale: Array.isArray(scale) ? scale.slice() : scale,
|
|
870
|
+
rotation: this.getRotation(),
|
|
871
|
+
rotateWithView: this.getRotateWithView(),
|
|
872
|
+
displacement: this.getDisplacement().slice(),
|
|
873
|
+
declutterMode: this.getDeclutterMode()
|
|
874
|
+
});
|
|
875
|
+
}
|
|
876
|
+
/**
|
|
877
|
+
* Get the symbolizer opacity.
|
|
878
|
+
* @return {number} Opacity.
|
|
879
|
+
* @api
|
|
880
|
+
*/
|
|
881
|
+
getOpacity() {
|
|
882
|
+
return this.opacity_;
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Determine whether the symbolizer rotates with the map.
|
|
886
|
+
* @return {boolean} Rotate with map.
|
|
887
|
+
* @api
|
|
888
|
+
*/
|
|
889
|
+
getRotateWithView() {
|
|
890
|
+
return this.rotateWithView_;
|
|
891
|
+
}
|
|
892
|
+
/**
|
|
893
|
+
* Get the symoblizer rotation.
|
|
894
|
+
* @return {number} Rotation.
|
|
895
|
+
* @api
|
|
896
|
+
*/
|
|
897
|
+
getRotation() {
|
|
898
|
+
return this.rotation_;
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
901
|
+
* Get the symbolizer scale.
|
|
902
|
+
* @return {number|import("../size.js").Size} Scale.
|
|
903
|
+
* @api
|
|
904
|
+
*/
|
|
905
|
+
getScale() {
|
|
906
|
+
return this.scale_;
|
|
907
|
+
}
|
|
908
|
+
/**
|
|
909
|
+
* Get the symbolizer scale array.
|
|
910
|
+
* @return {import("../size.js").Size} Scale array.
|
|
911
|
+
*/
|
|
912
|
+
getScaleArray() {
|
|
913
|
+
return this.scaleArray_;
|
|
914
|
+
}
|
|
915
|
+
/**
|
|
916
|
+
* Get the displacement of the shape
|
|
917
|
+
* @return {Array<number>} Shape's center displacement
|
|
918
|
+
* @api
|
|
919
|
+
*/
|
|
920
|
+
getDisplacement() {
|
|
921
|
+
return this.displacement_;
|
|
922
|
+
}
|
|
923
|
+
/**
|
|
924
|
+
* Get the declutter mode of the shape
|
|
925
|
+
* @return {import("./Style.js").DeclutterMode|undefined} Shape's declutter mode
|
|
926
|
+
* @api
|
|
927
|
+
*/
|
|
928
|
+
getDeclutterMode() {
|
|
929
|
+
return this.declutterMode_;
|
|
930
|
+
}
|
|
931
|
+
/**
|
|
932
|
+
* Get the anchor point in pixels. The anchor determines the center point for the
|
|
933
|
+
* symbolizer.
|
|
934
|
+
* @abstract
|
|
935
|
+
* @return {Array<number>|null} Anchor.
|
|
936
|
+
*/
|
|
937
|
+
getAnchor() {
|
|
938
|
+
return abstract();
|
|
939
|
+
}
|
|
940
|
+
/**
|
|
941
|
+
* Get the image element for the symbolizer.
|
|
942
|
+
* @abstract
|
|
943
|
+
* @param {number} pixelRatio Pixel ratio.
|
|
944
|
+
* @return {import('../DataTile.js').ImageLike} Image element.
|
|
945
|
+
*/
|
|
946
|
+
getImage(pixelRatio) {
|
|
947
|
+
return abstract();
|
|
948
|
+
}
|
|
949
|
+
/**
|
|
950
|
+
* @abstract
|
|
951
|
+
* @return {import('../DataTile.js').ImageLike} Image element.
|
|
952
|
+
*/
|
|
953
|
+
getHitDetectionImage() {
|
|
954
|
+
return abstract();
|
|
955
|
+
}
|
|
956
|
+
/**
|
|
957
|
+
* Get the image pixel ratio.
|
|
958
|
+
* @param {number} pixelRatio Pixel ratio.
|
|
959
|
+
* @return {number} Pixel ratio.
|
|
960
|
+
*/
|
|
961
|
+
getPixelRatio(pixelRatio) {
|
|
962
|
+
return 1;
|
|
963
|
+
}
|
|
964
|
+
/**
|
|
965
|
+
* @abstract
|
|
966
|
+
* @return {import("../ImageState.js").default} Image state.
|
|
967
|
+
*/
|
|
968
|
+
getImageState() {
|
|
969
|
+
return abstract();
|
|
970
|
+
}
|
|
971
|
+
/**
|
|
972
|
+
* @abstract
|
|
973
|
+
* @return {import("../size.js").Size|null} Image size.
|
|
974
|
+
*/
|
|
975
|
+
getImageSize() {
|
|
976
|
+
return abstract();
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* Get the origin of the symbolizer.
|
|
980
|
+
* @abstract
|
|
981
|
+
* @return {Array<number>|null} Origin.
|
|
982
|
+
*/
|
|
983
|
+
getOrigin() {
|
|
984
|
+
return abstract();
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* Get the size of the symbolizer (in pixels).
|
|
988
|
+
* @abstract
|
|
989
|
+
* @return {import("../size.js").Size|null} Size.
|
|
990
|
+
*/
|
|
991
|
+
getSize() {
|
|
992
|
+
return abstract();
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* Set the displacement.
|
|
996
|
+
*
|
|
997
|
+
* @param {Array<number>} displacement Displacement.
|
|
998
|
+
* @api
|
|
999
|
+
*/
|
|
1000
|
+
setDisplacement(displacement) {
|
|
1001
|
+
this.displacement_ = displacement;
|
|
1002
|
+
}
|
|
1003
|
+
/**
|
|
1004
|
+
* Set the opacity.
|
|
1005
|
+
*
|
|
1006
|
+
* @param {number} opacity Opacity.
|
|
1007
|
+
* @api
|
|
1008
|
+
*/
|
|
1009
|
+
setOpacity(opacity) {
|
|
1010
|
+
this.opacity_ = opacity;
|
|
1011
|
+
}
|
|
1012
|
+
/**
|
|
1013
|
+
* Set whether to rotate the style with the view.
|
|
1014
|
+
*
|
|
1015
|
+
* @param {boolean} rotateWithView Rotate with map.
|
|
1016
|
+
* @api
|
|
1017
|
+
*/
|
|
1018
|
+
setRotateWithView(rotateWithView) {
|
|
1019
|
+
this.rotateWithView_ = rotateWithView;
|
|
1020
|
+
}
|
|
1021
|
+
/**
|
|
1022
|
+
* Set the rotation.
|
|
1023
|
+
*
|
|
1024
|
+
* @param {number} rotation Rotation.
|
|
1025
|
+
* @api
|
|
1026
|
+
*/
|
|
1027
|
+
setRotation(rotation) {
|
|
1028
|
+
this.rotation_ = rotation;
|
|
1029
|
+
}
|
|
1030
|
+
/**
|
|
1031
|
+
* Set the scale.
|
|
1032
|
+
*
|
|
1033
|
+
* @param {number|import("../size.js").Size} scale Scale.
|
|
1034
|
+
* @api
|
|
1035
|
+
*/
|
|
1036
|
+
setScale(scale) {
|
|
1037
|
+
this.scale_ = scale;
|
|
1038
|
+
this.scaleArray_ = toSize(scale);
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* @abstract
|
|
1042
|
+
* @param {function(import("../events/Event.js").default): void} listener Listener function.
|
|
1043
|
+
*/
|
|
1044
|
+
listenImageChange(listener) {
|
|
1045
|
+
abstract();
|
|
1046
|
+
}
|
|
1047
|
+
/**
|
|
1048
|
+
* Load not yet loaded URI.
|
|
1049
|
+
* @abstract
|
|
1050
|
+
*/
|
|
1051
|
+
load() {
|
|
1052
|
+
abstract();
|
|
1053
|
+
}
|
|
1054
|
+
/**
|
|
1055
|
+
* @abstract
|
|
1056
|
+
* @param {function(import("../events/Event.js").default): void} listener Listener function.
|
|
1057
|
+
*/
|
|
1058
|
+
unlistenImageChange(listener) {
|
|
1059
|
+
abstract();
|
|
1060
|
+
}
|
|
1061
|
+
/**
|
|
1062
|
+
* @return {Promise<void>} `false` or Promise that resolves when the style is ready to use.
|
|
1063
|
+
*/
|
|
1064
|
+
ready() {
|
|
1065
|
+
return Promise.resolve();
|
|
1066
|
+
}
|
|
1067
|
+
};
|
|
1068
|
+
var Image_default = ImageStyle;
|
|
1069
|
+
|
|
1070
|
+
// node_modules/ol/style/RegularShape.js
|
|
1071
|
+
var RegularShape = class _RegularShape extends Image_default {
|
|
1072
|
+
/**
|
|
1073
|
+
* @param {Options} options Options.
|
|
1074
|
+
*/
|
|
1075
|
+
constructor(options) {
|
|
1076
|
+
super({
|
|
1077
|
+
opacity: 1,
|
|
1078
|
+
rotateWithView: options.rotateWithView !== void 0 ? options.rotateWithView : false,
|
|
1079
|
+
rotation: options.rotation !== void 0 ? options.rotation : 0,
|
|
1080
|
+
scale: options.scale !== void 0 ? options.scale : 1,
|
|
1081
|
+
displacement: options.displacement !== void 0 ? options.displacement : [0, 0],
|
|
1082
|
+
declutterMode: options.declutterMode
|
|
1083
|
+
});
|
|
1084
|
+
this.hitDetectionCanvas_ = null;
|
|
1085
|
+
this.fill_ = options.fill !== void 0 ? options.fill : null;
|
|
1086
|
+
this.origin_ = [0, 0];
|
|
1087
|
+
this.points_ = options.points;
|
|
1088
|
+
this.radius = options.radius;
|
|
1089
|
+
this.radius2_ = options.radius2;
|
|
1090
|
+
this.angle_ = options.angle !== void 0 ? options.angle : 0;
|
|
1091
|
+
this.stroke_ = options.stroke !== void 0 ? options.stroke : null;
|
|
1092
|
+
this.size_;
|
|
1093
|
+
this.renderOptions_;
|
|
1094
|
+
this.imageState_ = this.fill_ && this.fill_.loading() ? ImageState_default.LOADING : ImageState_default.LOADED;
|
|
1095
|
+
if (this.imageState_ === ImageState_default.LOADING) {
|
|
1096
|
+
this.ready().then(() => this.imageState_ = ImageState_default.LOADED);
|
|
1097
|
+
}
|
|
1098
|
+
this.render();
|
|
1099
|
+
}
|
|
1100
|
+
/**
|
|
1101
|
+
* Clones the style.
|
|
1102
|
+
* @return {RegularShape} The cloned style.
|
|
1103
|
+
* @api
|
|
1104
|
+
* @override
|
|
1105
|
+
*/
|
|
1106
|
+
clone() {
|
|
1107
|
+
var _a, _b;
|
|
1108
|
+
const scale = this.getScale();
|
|
1109
|
+
const style = new _RegularShape({
|
|
1110
|
+
fill: (_a = this.getFill()) == null ? void 0 : _a.clone(),
|
|
1111
|
+
points: this.getPoints(),
|
|
1112
|
+
radius: this.getRadius(),
|
|
1113
|
+
radius2: this.getRadius2(),
|
|
1114
|
+
angle: this.getAngle(),
|
|
1115
|
+
stroke: (_b = this.getStroke()) == null ? void 0 : _b.clone(),
|
|
1116
|
+
rotation: this.getRotation(),
|
|
1117
|
+
rotateWithView: this.getRotateWithView(),
|
|
1118
|
+
scale: Array.isArray(scale) ? scale.slice() : scale,
|
|
1119
|
+
displacement: this.getDisplacement().slice(),
|
|
1120
|
+
declutterMode: this.getDeclutterMode()
|
|
1121
|
+
});
|
|
1122
|
+
style.setOpacity(this.getOpacity());
|
|
1123
|
+
return style;
|
|
1124
|
+
}
|
|
1125
|
+
/**
|
|
1126
|
+
* Get the anchor point in pixels. The anchor determines the center point for the
|
|
1127
|
+
* symbolizer.
|
|
1128
|
+
* @return {Array<number>} Anchor.
|
|
1129
|
+
* @api
|
|
1130
|
+
* @override
|
|
1131
|
+
*/
|
|
1132
|
+
getAnchor() {
|
|
1133
|
+
const size = this.size_;
|
|
1134
|
+
const displacement = this.getDisplacement();
|
|
1135
|
+
const scale = this.getScaleArray();
|
|
1136
|
+
return [
|
|
1137
|
+
size[0] / 2 - displacement[0] / scale[0],
|
|
1138
|
+
size[1] / 2 + displacement[1] / scale[1]
|
|
1139
|
+
];
|
|
1140
|
+
}
|
|
1141
|
+
/**
|
|
1142
|
+
* Get the angle used in generating the shape.
|
|
1143
|
+
* @return {number} Shape's rotation in radians.
|
|
1144
|
+
* @api
|
|
1145
|
+
*/
|
|
1146
|
+
getAngle() {
|
|
1147
|
+
return this.angle_;
|
|
1148
|
+
}
|
|
1149
|
+
/**
|
|
1150
|
+
* Get the fill style for the shape.
|
|
1151
|
+
* @return {import("./Fill.js").default|null} Fill style.
|
|
1152
|
+
* @api
|
|
1153
|
+
*/
|
|
1154
|
+
getFill() {
|
|
1155
|
+
return this.fill_;
|
|
1156
|
+
}
|
|
1157
|
+
/**
|
|
1158
|
+
* Set the fill style.
|
|
1159
|
+
* @param {import("./Fill.js").default|null} fill Fill style.
|
|
1160
|
+
* @api
|
|
1161
|
+
*/
|
|
1162
|
+
setFill(fill) {
|
|
1163
|
+
this.fill_ = fill;
|
|
1164
|
+
this.render();
|
|
1165
|
+
}
|
|
1166
|
+
/**
|
|
1167
|
+
* @return {HTMLCanvasElement|OffscreenCanvas} Image element.
|
|
1168
|
+
* @override
|
|
1169
|
+
*/
|
|
1170
|
+
getHitDetectionImage() {
|
|
1171
|
+
if (!this.hitDetectionCanvas_) {
|
|
1172
|
+
this.hitDetectionCanvas_ = this.createHitDetectionCanvas_(
|
|
1173
|
+
this.renderOptions_
|
|
1174
|
+
);
|
|
1175
|
+
}
|
|
1176
|
+
return this.hitDetectionCanvas_;
|
|
1177
|
+
}
|
|
1178
|
+
/**
|
|
1179
|
+
* Get the image icon.
|
|
1180
|
+
* @param {number} pixelRatio Pixel ratio.
|
|
1181
|
+
* @return {HTMLCanvasElement|OffscreenCanvas} Image or Canvas element.
|
|
1182
|
+
* @api
|
|
1183
|
+
* @override
|
|
1184
|
+
*/
|
|
1185
|
+
getImage(pixelRatio) {
|
|
1186
|
+
var _a, _b;
|
|
1187
|
+
const fillKey = (_a = this.fill_) == null ? void 0 : _a.getKey();
|
|
1188
|
+
const cacheKey = `${pixelRatio},${this.angle_},${this.radius},${this.radius2_},${this.points_},${fillKey}` + Object.values(this.renderOptions_).join(",");
|
|
1189
|
+
let image = (
|
|
1190
|
+
/** @type {HTMLCanvasElement|OffscreenCanvas} */
|
|
1191
|
+
(_b = shared.get(cacheKey, null)) == null ? void 0 : _b.getImage(1)
|
|
1192
|
+
);
|
|
1193
|
+
if (!image) {
|
|
1194
|
+
const renderOptions = this.renderOptions_;
|
|
1195
|
+
const size = Math.ceil(renderOptions.size * pixelRatio);
|
|
1196
|
+
const context = createCanvasContext2D(size, size);
|
|
1197
|
+
this.draw_(renderOptions, context, pixelRatio);
|
|
1198
|
+
image = context.canvas;
|
|
1199
|
+
const iconImage = new IconImage_default(
|
|
1200
|
+
image,
|
|
1201
|
+
void 0,
|
|
1202
|
+
{},
|
|
1203
|
+
ImageState_default.LOADED,
|
|
1204
|
+
null
|
|
1205
|
+
);
|
|
1206
|
+
shared.set(cacheKey, null, iconImage);
|
|
1207
|
+
createImageBitmap(image).then((imageBitmap) => {
|
|
1208
|
+
iconImage.setImage(imageBitmap);
|
|
1209
|
+
});
|
|
1210
|
+
}
|
|
1211
|
+
return image;
|
|
1212
|
+
}
|
|
1213
|
+
/**
|
|
1214
|
+
* Get the image pixel ratio.
|
|
1215
|
+
* @param {number} pixelRatio Pixel ratio.
|
|
1216
|
+
* @return {number} Pixel ratio.
|
|
1217
|
+
* @override
|
|
1218
|
+
*/
|
|
1219
|
+
getPixelRatio(pixelRatio) {
|
|
1220
|
+
return pixelRatio;
|
|
1221
|
+
}
|
|
1222
|
+
/**
|
|
1223
|
+
* @return {import("../size.js").Size} Image size.
|
|
1224
|
+
* @override
|
|
1225
|
+
*/
|
|
1226
|
+
getImageSize() {
|
|
1227
|
+
return this.size_;
|
|
1228
|
+
}
|
|
1229
|
+
/**
|
|
1230
|
+
* @return {import("../ImageState.js").default} Image state.
|
|
1231
|
+
* @override
|
|
1232
|
+
*/
|
|
1233
|
+
getImageState() {
|
|
1234
|
+
return this.imageState_;
|
|
1235
|
+
}
|
|
1236
|
+
/**
|
|
1237
|
+
* Get the origin of the symbolizer.
|
|
1238
|
+
* @return {Array<number>} Origin.
|
|
1239
|
+
* @api
|
|
1240
|
+
* @override
|
|
1241
|
+
*/
|
|
1242
|
+
getOrigin() {
|
|
1243
|
+
return this.origin_;
|
|
1244
|
+
}
|
|
1245
|
+
/**
|
|
1246
|
+
* Get the number of points for generating the shape.
|
|
1247
|
+
* @return {number} Number of points for stars and regular polygons.
|
|
1248
|
+
* @api
|
|
1249
|
+
*/
|
|
1250
|
+
getPoints() {
|
|
1251
|
+
return this.points_;
|
|
1252
|
+
}
|
|
1253
|
+
/**
|
|
1254
|
+
* Get the (primary) radius for the shape.
|
|
1255
|
+
* @return {number} Radius.
|
|
1256
|
+
* @api
|
|
1257
|
+
*/
|
|
1258
|
+
getRadius() {
|
|
1259
|
+
return this.radius;
|
|
1260
|
+
}
|
|
1261
|
+
/**
|
|
1262
|
+
* Set the (primary) radius for the shape.
|
|
1263
|
+
* @param {number} radius Radius.
|
|
1264
|
+
* @api
|
|
1265
|
+
*/
|
|
1266
|
+
setRadius(radius) {
|
|
1267
|
+
if (this.radius === radius) {
|
|
1268
|
+
return;
|
|
1269
|
+
}
|
|
1270
|
+
this.radius = radius;
|
|
1271
|
+
this.render();
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Get the secondary radius for the shape.
|
|
1275
|
+
* @return {number|undefined} Radius2.
|
|
1276
|
+
* @api
|
|
1277
|
+
*/
|
|
1278
|
+
getRadius2() {
|
|
1279
|
+
return this.radius2_;
|
|
1280
|
+
}
|
|
1281
|
+
/**
|
|
1282
|
+
* Set the secondary radius for the shape.
|
|
1283
|
+
* @param {number|undefined} radius2 Radius2.
|
|
1284
|
+
* @api
|
|
1285
|
+
*/
|
|
1286
|
+
setRadius2(radius2) {
|
|
1287
|
+
if (this.radius2_ === radius2) {
|
|
1288
|
+
return;
|
|
1289
|
+
}
|
|
1290
|
+
this.radius2_ = radius2;
|
|
1291
|
+
this.render();
|
|
1292
|
+
}
|
|
1293
|
+
/**
|
|
1294
|
+
* Get the size of the symbolizer (in pixels).
|
|
1295
|
+
* @return {import("../size.js").Size} Size.
|
|
1296
|
+
* @api
|
|
1297
|
+
* @override
|
|
1298
|
+
*/
|
|
1299
|
+
getSize() {
|
|
1300
|
+
return this.size_;
|
|
1301
|
+
}
|
|
1302
|
+
/**
|
|
1303
|
+
* Get the stroke style for the shape.
|
|
1304
|
+
* @return {import("./Stroke.js").default|null} Stroke style.
|
|
1305
|
+
* @api
|
|
1306
|
+
*/
|
|
1307
|
+
getStroke() {
|
|
1308
|
+
return this.stroke_;
|
|
1309
|
+
}
|
|
1310
|
+
/**
|
|
1311
|
+
* Set the stroke style.
|
|
1312
|
+
* @param {import("./Stroke.js").default|null} stroke Stroke style.
|
|
1313
|
+
* @api
|
|
1314
|
+
*/
|
|
1315
|
+
setStroke(stroke) {
|
|
1316
|
+
this.stroke_ = stroke;
|
|
1317
|
+
this.render();
|
|
1318
|
+
}
|
|
1319
|
+
/**
|
|
1320
|
+
* @param {function(import("../events/Event.js").default): void} listener Listener function.
|
|
1321
|
+
* @override
|
|
1322
|
+
*/
|
|
1323
|
+
listenImageChange(listener) {
|
|
1324
|
+
}
|
|
1325
|
+
/**
|
|
1326
|
+
* Load not yet loaded URI.
|
|
1327
|
+
* @override
|
|
1328
|
+
*/
|
|
1329
|
+
load() {
|
|
1330
|
+
}
|
|
1331
|
+
/**
|
|
1332
|
+
* @param {function(import("../events/Event.js").default): void} listener Listener function.
|
|
1333
|
+
* @override
|
|
1334
|
+
*/
|
|
1335
|
+
unlistenImageChange(listener) {
|
|
1336
|
+
}
|
|
1337
|
+
/**
|
|
1338
|
+
* Calculate additional canvas size needed for the miter.
|
|
1339
|
+
* @param {string} lineJoin Line join
|
|
1340
|
+
* @param {number} strokeWidth Stroke width
|
|
1341
|
+
* @param {number} miterLimit Miter limit
|
|
1342
|
+
* @return {number} Additional canvas size needed
|
|
1343
|
+
* @private
|
|
1344
|
+
*/
|
|
1345
|
+
calculateLineJoinSize_(lineJoin, strokeWidth, miterLimit) {
|
|
1346
|
+
if (strokeWidth === 0 || this.points_ === Infinity || lineJoin !== "bevel" && lineJoin !== "miter") {
|
|
1347
|
+
return strokeWidth;
|
|
1348
|
+
}
|
|
1349
|
+
let r1 = this.radius;
|
|
1350
|
+
let r2 = this.radius2_ === void 0 ? r1 : this.radius2_;
|
|
1351
|
+
if (r1 < r2) {
|
|
1352
|
+
const tmp = r1;
|
|
1353
|
+
r1 = r2;
|
|
1354
|
+
r2 = tmp;
|
|
1355
|
+
}
|
|
1356
|
+
const points = this.radius2_ === void 0 ? this.points_ : this.points_ * 2;
|
|
1357
|
+
const alpha = 2 * Math.PI / points;
|
|
1358
|
+
const a = r2 * Math.sin(alpha);
|
|
1359
|
+
const b = Math.sqrt(r2 * r2 - a * a);
|
|
1360
|
+
const d = r1 - b;
|
|
1361
|
+
const e = Math.sqrt(a * a + d * d);
|
|
1362
|
+
const miterRatio = e / a;
|
|
1363
|
+
if (lineJoin === "miter" && miterRatio <= miterLimit) {
|
|
1364
|
+
return miterRatio * strokeWidth;
|
|
1365
|
+
}
|
|
1366
|
+
const k = strokeWidth / 2 / miterRatio;
|
|
1367
|
+
const l = strokeWidth / 2 * (d / e);
|
|
1368
|
+
const maxr = Math.sqrt((r1 + k) * (r1 + k) + l * l);
|
|
1369
|
+
const bevelAdd = maxr - r1;
|
|
1370
|
+
if (this.radius2_ === void 0 || lineJoin === "bevel") {
|
|
1371
|
+
return bevelAdd * 2;
|
|
1372
|
+
}
|
|
1373
|
+
const aa = r1 * Math.sin(alpha);
|
|
1374
|
+
const bb = Math.sqrt(r1 * r1 - aa * aa);
|
|
1375
|
+
const dd = r2 - bb;
|
|
1376
|
+
const ee = Math.sqrt(aa * aa + dd * dd);
|
|
1377
|
+
const innerMiterRatio = ee / aa;
|
|
1378
|
+
if (innerMiterRatio <= miterLimit) {
|
|
1379
|
+
const innerLength = innerMiterRatio * strokeWidth / 2 - r2 - r1;
|
|
1380
|
+
return 2 * Math.max(bevelAdd, innerLength);
|
|
1381
|
+
}
|
|
1382
|
+
return bevelAdd * 2;
|
|
1383
|
+
}
|
|
1384
|
+
/**
|
|
1385
|
+
* @return {RenderOptions} The render options
|
|
1386
|
+
* @protected
|
|
1387
|
+
*/
|
|
1388
|
+
createRenderOptions() {
|
|
1389
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1390
|
+
let lineCap = defaultLineCap;
|
|
1391
|
+
let lineJoin = defaultLineJoin;
|
|
1392
|
+
let miterLimit = 0;
|
|
1393
|
+
let lineDash = null;
|
|
1394
|
+
let lineDashOffset = 0;
|
|
1395
|
+
let strokeStyle;
|
|
1396
|
+
let strokeWidth = 0;
|
|
1397
|
+
if (this.stroke_) {
|
|
1398
|
+
strokeStyle = asColorLike((_a = this.stroke_.getColor()) != null ? _a : defaultStrokeStyle);
|
|
1399
|
+
strokeWidth = (_b = this.stroke_.getWidth()) != null ? _b : defaultLineWidth;
|
|
1400
|
+
lineDash = this.stroke_.getLineDash();
|
|
1401
|
+
lineDashOffset = (_c = this.stroke_.getLineDashOffset()) != null ? _c : 0;
|
|
1402
|
+
lineJoin = (_d = this.stroke_.getLineJoin()) != null ? _d : defaultLineJoin;
|
|
1403
|
+
lineCap = (_e = this.stroke_.getLineCap()) != null ? _e : defaultLineCap;
|
|
1404
|
+
miterLimit = (_f = this.stroke_.getMiterLimit()) != null ? _f : defaultMiterLimit;
|
|
1405
|
+
}
|
|
1406
|
+
const add = this.calculateLineJoinSize_(lineJoin, strokeWidth, miterLimit);
|
|
1407
|
+
const maxRadius = Math.max(this.radius, this.radius2_ || 0);
|
|
1408
|
+
const size = Math.ceil(2 * maxRadius + add);
|
|
1409
|
+
return {
|
|
1410
|
+
strokeStyle,
|
|
1411
|
+
strokeWidth,
|
|
1412
|
+
size,
|
|
1413
|
+
lineCap,
|
|
1414
|
+
lineDash,
|
|
1415
|
+
lineDashOffset,
|
|
1416
|
+
lineJoin,
|
|
1417
|
+
miterLimit
|
|
1418
|
+
};
|
|
1419
|
+
}
|
|
1420
|
+
/**
|
|
1421
|
+
* @protected
|
|
1422
|
+
*/
|
|
1423
|
+
render() {
|
|
1424
|
+
this.renderOptions_ = this.createRenderOptions();
|
|
1425
|
+
const size = this.renderOptions_.size;
|
|
1426
|
+
this.hitDetectionCanvas_ = null;
|
|
1427
|
+
this.size_ = [size, size];
|
|
1428
|
+
}
|
|
1429
|
+
/**
|
|
1430
|
+
* @private
|
|
1431
|
+
* @param {RenderOptions} renderOptions Render options.
|
|
1432
|
+
* @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The rendering context.
|
|
1433
|
+
* @param {number} pixelRatio The pixel ratio.
|
|
1434
|
+
*/
|
|
1435
|
+
draw_(renderOptions, context, pixelRatio) {
|
|
1436
|
+
context.scale(pixelRatio, pixelRatio);
|
|
1437
|
+
context.translate(renderOptions.size / 2, renderOptions.size / 2);
|
|
1438
|
+
this.createPath_(context);
|
|
1439
|
+
if (this.fill_) {
|
|
1440
|
+
let color = this.fill_.getColor();
|
|
1441
|
+
if (color === null) {
|
|
1442
|
+
color = defaultFillStyle;
|
|
1443
|
+
}
|
|
1444
|
+
context.fillStyle = /** @type {string|CanvasGradient|CanvasPattern} */
|
|
1445
|
+
asColorLike(color);
|
|
1446
|
+
context.fill();
|
|
1447
|
+
}
|
|
1448
|
+
if (renderOptions.strokeStyle) {
|
|
1449
|
+
context.strokeStyle = renderOptions.strokeStyle;
|
|
1450
|
+
context.lineWidth = renderOptions.strokeWidth;
|
|
1451
|
+
if (renderOptions.lineDash) {
|
|
1452
|
+
context.setLineDash(renderOptions.lineDash);
|
|
1453
|
+
context.lineDashOffset = renderOptions.lineDashOffset;
|
|
1454
|
+
}
|
|
1455
|
+
context.lineCap = renderOptions.lineCap;
|
|
1456
|
+
context.lineJoin = renderOptions.lineJoin;
|
|
1457
|
+
context.miterLimit = renderOptions.miterLimit;
|
|
1458
|
+
context.stroke();
|
|
1459
|
+
}
|
|
1460
|
+
}
|
|
1461
|
+
/**
|
|
1462
|
+
* @private
|
|
1463
|
+
* @param {RenderOptions} renderOptions Render options.
|
|
1464
|
+
* @return {HTMLCanvasElement|OffscreenCanvas} Canvas containing the icon
|
|
1465
|
+
*/
|
|
1466
|
+
createHitDetectionCanvas_(renderOptions) {
|
|
1467
|
+
let context;
|
|
1468
|
+
if (this.fill_) {
|
|
1469
|
+
let color = this.fill_.getColor();
|
|
1470
|
+
let opacity = 0;
|
|
1471
|
+
if (typeof color === "string") {
|
|
1472
|
+
color = asArray(color);
|
|
1473
|
+
}
|
|
1474
|
+
if (color === null) {
|
|
1475
|
+
opacity = 1;
|
|
1476
|
+
} else if (Array.isArray(color)) {
|
|
1477
|
+
opacity = color.length === 4 ? color[3] : 1;
|
|
1478
|
+
}
|
|
1479
|
+
if (opacity === 0) {
|
|
1480
|
+
context = createCanvasContext2D(renderOptions.size, renderOptions.size);
|
|
1481
|
+
this.drawHitDetectionCanvas_(renderOptions, context);
|
|
1482
|
+
}
|
|
1483
|
+
}
|
|
1484
|
+
return context ? context.canvas : this.getImage(1);
|
|
1485
|
+
}
|
|
1486
|
+
/**
|
|
1487
|
+
* @private
|
|
1488
|
+
* @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The context to draw in.
|
|
1489
|
+
*/
|
|
1490
|
+
createPath_(context) {
|
|
1491
|
+
let points = this.points_;
|
|
1492
|
+
const radius = this.radius;
|
|
1493
|
+
if (points === Infinity) {
|
|
1494
|
+
context.arc(0, 0, radius, 0, 2 * Math.PI);
|
|
1495
|
+
} else {
|
|
1496
|
+
const radius2 = this.radius2_ === void 0 ? radius : this.radius2_;
|
|
1497
|
+
if (this.radius2_ !== void 0) {
|
|
1498
|
+
points *= 2;
|
|
1499
|
+
}
|
|
1500
|
+
const startAngle = this.angle_ - Math.PI / 2;
|
|
1501
|
+
const step = 2 * Math.PI / points;
|
|
1502
|
+
for (let i = 0; i < points; i++) {
|
|
1503
|
+
const angle0 = startAngle + i * step;
|
|
1504
|
+
const radiusC = i % 2 === 0 ? radius : radius2;
|
|
1505
|
+
context.lineTo(radiusC * Math.cos(angle0), radiusC * Math.sin(angle0));
|
|
1506
|
+
}
|
|
1507
|
+
context.closePath();
|
|
1508
|
+
}
|
|
1509
|
+
}
|
|
1510
|
+
/**
|
|
1511
|
+
* @private
|
|
1512
|
+
* @param {RenderOptions} renderOptions Render options.
|
|
1513
|
+
* @param {CanvasRenderingContext2D|OffscreenCanvasRenderingContext2D} context The context.
|
|
1514
|
+
*/
|
|
1515
|
+
drawHitDetectionCanvas_(renderOptions, context) {
|
|
1516
|
+
context.translate(renderOptions.size / 2, renderOptions.size / 2);
|
|
1517
|
+
this.createPath_(context);
|
|
1518
|
+
context.fillStyle = defaultFillStyle;
|
|
1519
|
+
context.fill();
|
|
1520
|
+
if (renderOptions.strokeStyle) {
|
|
1521
|
+
context.strokeStyle = renderOptions.strokeStyle;
|
|
1522
|
+
context.lineWidth = renderOptions.strokeWidth;
|
|
1523
|
+
if (renderOptions.lineDash) {
|
|
1524
|
+
context.setLineDash(renderOptions.lineDash);
|
|
1525
|
+
context.lineDashOffset = renderOptions.lineDashOffset;
|
|
1526
|
+
}
|
|
1527
|
+
context.lineJoin = renderOptions.lineJoin;
|
|
1528
|
+
context.miterLimit = renderOptions.miterLimit;
|
|
1529
|
+
context.stroke();
|
|
1530
|
+
}
|
|
1531
|
+
}
|
|
1532
|
+
/**
|
|
1533
|
+
* @override
|
|
1534
|
+
*/
|
|
1535
|
+
ready() {
|
|
1536
|
+
return this.fill_ ? this.fill_.ready() : Promise.resolve();
|
|
1537
|
+
}
|
|
1538
|
+
};
|
|
1539
|
+
var RegularShape_default = RegularShape;
|
|
1540
|
+
|
|
1541
|
+
// node_modules/ol/style/Circle.js
|
|
1542
|
+
var CircleStyle = class _CircleStyle extends RegularShape_default {
|
|
1543
|
+
/**
|
|
1544
|
+
* @param {Options} [options] Options.
|
|
1545
|
+
*/
|
|
1546
|
+
constructor(options) {
|
|
1547
|
+
options = options ? options : { radius: 5 };
|
|
1548
|
+
super({
|
|
1549
|
+
points: Infinity,
|
|
1550
|
+
fill: options.fill,
|
|
1551
|
+
radius: options.radius,
|
|
1552
|
+
stroke: options.stroke,
|
|
1553
|
+
scale: options.scale !== void 0 ? options.scale : 1,
|
|
1554
|
+
rotation: options.rotation !== void 0 ? options.rotation : 0,
|
|
1555
|
+
rotateWithView: options.rotateWithView !== void 0 ? options.rotateWithView : false,
|
|
1556
|
+
displacement: options.displacement !== void 0 ? options.displacement : [0, 0],
|
|
1557
|
+
declutterMode: options.declutterMode
|
|
1558
|
+
});
|
|
1559
|
+
}
|
|
1560
|
+
/**
|
|
1561
|
+
* Clones the style.
|
|
1562
|
+
* @return {CircleStyle} The cloned style.
|
|
1563
|
+
* @api
|
|
1564
|
+
* @override
|
|
1565
|
+
*/
|
|
1566
|
+
clone() {
|
|
1567
|
+
var _a, _b;
|
|
1568
|
+
const scale = this.getScale();
|
|
1569
|
+
const style = new _CircleStyle({
|
|
1570
|
+
fill: (_a = this.getFill()) == null ? void 0 : _a.clone(),
|
|
1571
|
+
stroke: (_b = this.getStroke()) == null ? void 0 : _b.clone(),
|
|
1572
|
+
radius: this.getRadius(),
|
|
1573
|
+
scale: Array.isArray(scale) ? scale.slice() : scale,
|
|
1574
|
+
rotation: this.getRotation(),
|
|
1575
|
+
rotateWithView: this.getRotateWithView(),
|
|
1576
|
+
displacement: this.getDisplacement().slice(),
|
|
1577
|
+
declutterMode: this.getDeclutterMode()
|
|
1578
|
+
});
|
|
1579
|
+
style.setOpacity(this.getOpacity());
|
|
1580
|
+
return style;
|
|
1581
|
+
}
|
|
1582
|
+
};
|
|
1583
|
+
var Circle_default = CircleStyle;
|
|
1584
|
+
|
|
1585
|
+
// node_modules/ol/style/Fill.js
|
|
1586
|
+
init_dirname();
|
|
1587
|
+
init_buffer();
|
|
1588
|
+
init_process();
|
|
1589
|
+
var Fill = class _Fill {
|
|
1590
|
+
/**
|
|
1591
|
+
* @param {Options} [options] Options.
|
|
1592
|
+
*/
|
|
1593
|
+
constructor(options) {
|
|
1594
|
+
options = options || {};
|
|
1595
|
+
this.patternImage_ = null;
|
|
1596
|
+
this.color_ = null;
|
|
1597
|
+
if (options.color !== void 0) {
|
|
1598
|
+
this.setColor(options.color);
|
|
1599
|
+
}
|
|
1600
|
+
}
|
|
1601
|
+
/**
|
|
1602
|
+
* Clones the style. The color is not cloned if it is a {@link module:ol/colorlike~ColorLike}.
|
|
1603
|
+
* @return {Fill} The cloned style.
|
|
1604
|
+
* @api
|
|
1605
|
+
*/
|
|
1606
|
+
clone() {
|
|
1607
|
+
const color = this.getColor();
|
|
1608
|
+
return new _Fill({
|
|
1609
|
+
color: Array.isArray(color) ? color.slice() : color || void 0
|
|
1610
|
+
});
|
|
1611
|
+
}
|
|
1612
|
+
/**
|
|
1613
|
+
* Get the fill color.
|
|
1614
|
+
* @return {import("../color.js").Color|import("../colorlike.js").ColorLike|import('../colorlike.js').PatternDescriptor|null} Color.
|
|
1615
|
+
* @api
|
|
1616
|
+
*/
|
|
1617
|
+
getColor() {
|
|
1618
|
+
return this.color_;
|
|
1619
|
+
}
|
|
1620
|
+
/**
|
|
1621
|
+
* Set the color.
|
|
1622
|
+
*
|
|
1623
|
+
* @param {import("../color.js").Color|import("../colorlike.js").ColorLike|import('../colorlike.js').PatternDescriptor|null} color Color.
|
|
1624
|
+
* @api
|
|
1625
|
+
*/
|
|
1626
|
+
setColor(color) {
|
|
1627
|
+
if (color !== null && typeof color === "object" && "src" in color) {
|
|
1628
|
+
const patternImage = get(
|
|
1629
|
+
null,
|
|
1630
|
+
color.src,
|
|
1631
|
+
{ crossOrigin: "anonymous" },
|
|
1632
|
+
void 0,
|
|
1633
|
+
color.offset ? null : color.color ? color.color : null,
|
|
1634
|
+
!(color.offset && color.size)
|
|
1635
|
+
);
|
|
1636
|
+
patternImage.ready().then(() => {
|
|
1637
|
+
this.patternImage_ = null;
|
|
1638
|
+
});
|
|
1639
|
+
if (patternImage.getImageState() === ImageState_default.IDLE) {
|
|
1640
|
+
patternImage.load();
|
|
1641
|
+
}
|
|
1642
|
+
if (patternImage.getImageState() === ImageState_default.LOADING) {
|
|
1643
|
+
this.patternImage_ = patternImage;
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
this.color_ = color;
|
|
1647
|
+
}
|
|
1648
|
+
/**
|
|
1649
|
+
* @return {string} Key of the fill for cache lookup.
|
|
1650
|
+
*/
|
|
1651
|
+
getKey() {
|
|
1652
|
+
const fill = this.getColor();
|
|
1653
|
+
if (!fill) {
|
|
1654
|
+
return "";
|
|
1655
|
+
}
|
|
1656
|
+
return fill instanceof CanvasPattern || fill instanceof CanvasGradient ? getUid(
|
|
1657
|
+
/** @type {Object} */
|
|
1658
|
+
fill
|
|
1659
|
+
) : typeof fill === "object" && "src" in fill ? fill.src + ":" + fill.offset : asArray(fill).toString();
|
|
1660
|
+
}
|
|
1661
|
+
/**
|
|
1662
|
+
* @return {boolean} The fill style is loading an image pattern.
|
|
1663
|
+
*/
|
|
1664
|
+
loading() {
|
|
1665
|
+
return !!this.patternImage_;
|
|
1666
|
+
}
|
|
1667
|
+
/**
|
|
1668
|
+
* @return {Promise<void>} `false` or a promise that resolves when the style is ready to use.
|
|
1669
|
+
*/
|
|
1670
|
+
ready() {
|
|
1671
|
+
return this.patternImage_ ? this.patternImage_.ready() : Promise.resolve();
|
|
1672
|
+
}
|
|
1673
|
+
};
|
|
1674
|
+
var Fill_default = Fill;
|
|
1675
|
+
|
|
1676
|
+
// node_modules/ol/style/Stroke.js
|
|
1677
|
+
init_dirname();
|
|
1678
|
+
init_buffer();
|
|
1679
|
+
init_process();
|
|
1680
|
+
var Stroke = class _Stroke {
|
|
1681
|
+
/**
|
|
1682
|
+
* @param {Options} [options] Options.
|
|
1683
|
+
*/
|
|
1684
|
+
constructor(options) {
|
|
1685
|
+
options = options || {};
|
|
1686
|
+
this.color_ = options.color !== void 0 ? options.color : null;
|
|
1687
|
+
this.lineCap_ = options.lineCap;
|
|
1688
|
+
this.lineDash_ = options.lineDash !== void 0 ? options.lineDash : null;
|
|
1689
|
+
this.lineDashOffset_ = options.lineDashOffset;
|
|
1690
|
+
this.lineJoin_ = options.lineJoin;
|
|
1691
|
+
this.miterLimit_ = options.miterLimit;
|
|
1692
|
+
this.offset_ = options.offset;
|
|
1693
|
+
this.width_ = options.width;
|
|
1694
|
+
}
|
|
1695
|
+
/**
|
|
1696
|
+
* Clones the style.
|
|
1697
|
+
* @return {Stroke} The cloned style.
|
|
1698
|
+
* @api
|
|
1699
|
+
*/
|
|
1700
|
+
clone() {
|
|
1701
|
+
var _a;
|
|
1702
|
+
const color = this.getColor();
|
|
1703
|
+
return new _Stroke({
|
|
1704
|
+
color: Array.isArray(color) ? color.slice() : color || void 0,
|
|
1705
|
+
lineCap: this.getLineCap(),
|
|
1706
|
+
lineDash: (_a = this.getLineDash()) == null ? void 0 : _a.slice(),
|
|
1707
|
+
lineDashOffset: this.getLineDashOffset(),
|
|
1708
|
+
lineJoin: this.getLineJoin(),
|
|
1709
|
+
miterLimit: this.getMiterLimit(),
|
|
1710
|
+
offset: this.getOffset(),
|
|
1711
|
+
width: this.getWidth()
|
|
1712
|
+
});
|
|
1713
|
+
}
|
|
1714
|
+
/**
|
|
1715
|
+
* Get the stroke color.
|
|
1716
|
+
* @return {import("../color.js").Color|import("../colorlike.js").ColorLike|null} Color.
|
|
1717
|
+
* @api
|
|
1718
|
+
*/
|
|
1719
|
+
getColor() {
|
|
1720
|
+
return this.color_;
|
|
1721
|
+
}
|
|
1722
|
+
/**
|
|
1723
|
+
* Get the line cap type for the stroke.
|
|
1724
|
+
* @return {CanvasLineCap|undefined} Line cap.
|
|
1725
|
+
* @api
|
|
1726
|
+
*/
|
|
1727
|
+
getLineCap() {
|
|
1728
|
+
return this.lineCap_;
|
|
1729
|
+
}
|
|
1730
|
+
/**
|
|
1731
|
+
* Get the line dash style for the stroke.
|
|
1732
|
+
* @return {Array<number>|null} Line dash.
|
|
1733
|
+
* @api
|
|
1734
|
+
*/
|
|
1735
|
+
getLineDash() {
|
|
1736
|
+
return this.lineDash_;
|
|
1737
|
+
}
|
|
1738
|
+
/**
|
|
1739
|
+
* Get the line dash offset for the stroke.
|
|
1740
|
+
* @return {number|undefined} Line dash offset.
|
|
1741
|
+
* @api
|
|
1742
|
+
*/
|
|
1743
|
+
getLineDashOffset() {
|
|
1744
|
+
return this.lineDashOffset_;
|
|
1745
|
+
}
|
|
1746
|
+
/**
|
|
1747
|
+
* Get the line join type for the stroke.
|
|
1748
|
+
* @return {CanvasLineJoin|undefined} Line join.
|
|
1749
|
+
* @api
|
|
1750
|
+
*/
|
|
1751
|
+
getLineJoin() {
|
|
1752
|
+
return this.lineJoin_;
|
|
1753
|
+
}
|
|
1754
|
+
/**
|
|
1755
|
+
* Get the miter limit for the stroke.
|
|
1756
|
+
* @return {number|undefined} Miter limit.
|
|
1757
|
+
* @api
|
|
1758
|
+
*/
|
|
1759
|
+
getMiterLimit() {
|
|
1760
|
+
return this.miterLimit_;
|
|
1761
|
+
}
|
|
1762
|
+
/**
|
|
1763
|
+
* Get the line offset in pixels.
|
|
1764
|
+
* @return {number|undefined} Offset.
|
|
1765
|
+
* @api
|
|
1766
|
+
*/
|
|
1767
|
+
getOffset() {
|
|
1768
|
+
return this.offset_;
|
|
1769
|
+
}
|
|
1770
|
+
/**
|
|
1771
|
+
* Get the stroke width.
|
|
1772
|
+
* @return {number|undefined} Width.
|
|
1773
|
+
* @api
|
|
1774
|
+
*/
|
|
1775
|
+
getWidth() {
|
|
1776
|
+
return this.width_;
|
|
1777
|
+
}
|
|
1778
|
+
/**
|
|
1779
|
+
* Set the color.
|
|
1780
|
+
*
|
|
1781
|
+
* @param {import("../color.js").Color|import("../colorlike.js").ColorLike} color Color.
|
|
1782
|
+
* @api
|
|
1783
|
+
*/
|
|
1784
|
+
setColor(color) {
|
|
1785
|
+
this.color_ = color;
|
|
1786
|
+
}
|
|
1787
|
+
/**
|
|
1788
|
+
* Set the line cap.
|
|
1789
|
+
*
|
|
1790
|
+
* @param {CanvasLineCap|undefined} lineCap Line cap.
|
|
1791
|
+
* @api
|
|
1792
|
+
*/
|
|
1793
|
+
setLineCap(lineCap) {
|
|
1794
|
+
this.lineCap_ = lineCap;
|
|
1795
|
+
}
|
|
1796
|
+
/**
|
|
1797
|
+
* Set the line dash.
|
|
1798
|
+
*
|
|
1799
|
+
* @param {Array<number>|null} lineDash Line dash.
|
|
1800
|
+
* @api
|
|
1801
|
+
*/
|
|
1802
|
+
setLineDash(lineDash) {
|
|
1803
|
+
this.lineDash_ = lineDash;
|
|
1804
|
+
}
|
|
1805
|
+
/**
|
|
1806
|
+
* Set the line dash offset.
|
|
1807
|
+
*
|
|
1808
|
+
* @param {number|undefined} lineDashOffset Line dash offset.
|
|
1809
|
+
* @api
|
|
1810
|
+
*/
|
|
1811
|
+
setLineDashOffset(lineDashOffset) {
|
|
1812
|
+
this.lineDashOffset_ = lineDashOffset;
|
|
1813
|
+
}
|
|
1814
|
+
/**
|
|
1815
|
+
* Set the line join.
|
|
1816
|
+
*
|
|
1817
|
+
* @param {CanvasLineJoin|undefined} lineJoin Line join.
|
|
1818
|
+
* @api
|
|
1819
|
+
*/
|
|
1820
|
+
setLineJoin(lineJoin) {
|
|
1821
|
+
this.lineJoin_ = lineJoin;
|
|
1822
|
+
}
|
|
1823
|
+
/**
|
|
1824
|
+
* Set the miter limit.
|
|
1825
|
+
*
|
|
1826
|
+
* @param {number|undefined} miterLimit Miter limit.
|
|
1827
|
+
* @api
|
|
1828
|
+
*/
|
|
1829
|
+
setMiterLimit(miterLimit) {
|
|
1830
|
+
this.miterLimit_ = miterLimit;
|
|
1831
|
+
}
|
|
1832
|
+
/**
|
|
1833
|
+
* Set the line offset in pixels.
|
|
1834
|
+
*
|
|
1835
|
+
* @param {number|undefined} offset Offset.
|
|
1836
|
+
* @api
|
|
1837
|
+
*/
|
|
1838
|
+
setOffset(offset) {
|
|
1839
|
+
this.offset_ = offset;
|
|
1840
|
+
}
|
|
1841
|
+
/**
|
|
1842
|
+
* Set the width.
|
|
1843
|
+
*
|
|
1844
|
+
* @param {number|undefined} width Width.
|
|
1845
|
+
* @api
|
|
1846
|
+
*/
|
|
1847
|
+
setWidth(width) {
|
|
1848
|
+
this.width_ = width;
|
|
1849
|
+
}
|
|
1850
|
+
};
|
|
1851
|
+
var Stroke_default = Stroke;
|
|
1852
|
+
|
|
1853
|
+
// node_modules/ol/style/Style.js
|
|
1854
|
+
init_dirname();
|
|
1855
|
+
init_buffer();
|
|
1856
|
+
init_process();
|
|
1857
|
+
var Style = class _Style {
|
|
1858
|
+
/**
|
|
1859
|
+
* @param {Options} [options] Style options.
|
|
1860
|
+
*/
|
|
1861
|
+
constructor(options) {
|
|
1862
|
+
options = options || {};
|
|
1863
|
+
this.geometry_ = null;
|
|
1864
|
+
this.geometryFunction_ = defaultGeometryFunction;
|
|
1865
|
+
if (options.geometry !== void 0) {
|
|
1866
|
+
this.setGeometry(options.geometry);
|
|
1867
|
+
}
|
|
1868
|
+
this.fill_ = options.fill !== void 0 ? options.fill : null;
|
|
1869
|
+
this.image_ = options.image !== void 0 ? options.image : null;
|
|
1870
|
+
this.renderer_ = options.renderer !== void 0 ? options.renderer : null;
|
|
1871
|
+
this.hitDetectionRenderer_ = options.hitDetectionRenderer !== void 0 ? options.hitDetectionRenderer : null;
|
|
1872
|
+
this.stroke_ = options.stroke !== void 0 ? options.stroke : null;
|
|
1873
|
+
this.text_ = options.text !== void 0 ? options.text : null;
|
|
1874
|
+
this.zIndex_ = options.zIndex;
|
|
1875
|
+
}
|
|
1876
|
+
/**
|
|
1877
|
+
* Clones the style.
|
|
1878
|
+
* @return {Style} The cloned style.
|
|
1879
|
+
* @api
|
|
1880
|
+
*/
|
|
1881
|
+
clone() {
|
|
1882
|
+
var _a, _b, _c, _d, _e;
|
|
1883
|
+
let geometry = this.getGeometry();
|
|
1884
|
+
if (geometry && typeof geometry === "object") {
|
|
1885
|
+
geometry = /** @type {import("../geom/Geometry.js").default} */
|
|
1886
|
+
geometry.clone();
|
|
1887
|
+
}
|
|
1888
|
+
return new _Style({
|
|
1889
|
+
geometry: geometry != null ? geometry : void 0,
|
|
1890
|
+
fill: (_a = this.getFill()) == null ? void 0 : _a.clone(),
|
|
1891
|
+
image: (_b = this.getImage()) == null ? void 0 : _b.clone(),
|
|
1892
|
+
renderer: (_c = this.getRenderer()) != null ? _c : void 0,
|
|
1893
|
+
stroke: (_d = this.getStroke()) == null ? void 0 : _d.clone(),
|
|
1894
|
+
text: (_e = this.getText()) == null ? void 0 : _e.clone(),
|
|
1895
|
+
zIndex: this.getZIndex()
|
|
1896
|
+
});
|
|
1897
|
+
}
|
|
1898
|
+
/**
|
|
1899
|
+
* Get the custom renderer function that was configured with
|
|
1900
|
+
* {@link #setRenderer} or the `renderer` constructor option.
|
|
1901
|
+
* @return {RenderFunction|null} Custom renderer function.
|
|
1902
|
+
* @api
|
|
1903
|
+
*/
|
|
1904
|
+
getRenderer() {
|
|
1905
|
+
return this.renderer_;
|
|
1906
|
+
}
|
|
1907
|
+
/**
|
|
1908
|
+
* Sets a custom renderer function for this style. When set, `fill`, `stroke`
|
|
1909
|
+
* and `image` options of the style will be ignored.
|
|
1910
|
+
* @param {RenderFunction|null} renderer Custom renderer function.
|
|
1911
|
+
* @api
|
|
1912
|
+
*/
|
|
1913
|
+
setRenderer(renderer) {
|
|
1914
|
+
this.renderer_ = renderer;
|
|
1915
|
+
}
|
|
1916
|
+
/**
|
|
1917
|
+
* Sets a custom renderer function for this style used
|
|
1918
|
+
* in hit detection.
|
|
1919
|
+
* @param {RenderFunction|null} renderer Custom renderer function.
|
|
1920
|
+
* @api
|
|
1921
|
+
*/
|
|
1922
|
+
setHitDetectionRenderer(renderer) {
|
|
1923
|
+
this.hitDetectionRenderer_ = renderer;
|
|
1924
|
+
}
|
|
1925
|
+
/**
|
|
1926
|
+
* Get the custom renderer function that was configured with
|
|
1927
|
+
* {@link #setHitDetectionRenderer} or the `hitDetectionRenderer` constructor option.
|
|
1928
|
+
* @return {RenderFunction|null} Custom renderer function.
|
|
1929
|
+
* @api
|
|
1930
|
+
*/
|
|
1931
|
+
getHitDetectionRenderer() {
|
|
1932
|
+
return this.hitDetectionRenderer_;
|
|
1933
|
+
}
|
|
1934
|
+
/**
|
|
1935
|
+
* Get the geometry to be rendered.
|
|
1936
|
+
* @return {string|import("../geom/Geometry.js").default|GeometryFunction|null}
|
|
1937
|
+
* Feature property or geometry or function that returns the geometry that will
|
|
1938
|
+
* be rendered with this style.
|
|
1939
|
+
* @api
|
|
1940
|
+
*/
|
|
1941
|
+
getGeometry() {
|
|
1942
|
+
return this.geometry_;
|
|
1943
|
+
}
|
|
1944
|
+
/**
|
|
1945
|
+
* Get the function used to generate a geometry for rendering.
|
|
1946
|
+
* @return {!GeometryFunction} Function that is called with a feature
|
|
1947
|
+
* and returns the geometry to render instead of the feature's geometry.
|
|
1948
|
+
* @api
|
|
1949
|
+
*/
|
|
1950
|
+
getGeometryFunction() {
|
|
1951
|
+
return this.geometryFunction_;
|
|
1952
|
+
}
|
|
1953
|
+
/**
|
|
1954
|
+
* Get the fill style.
|
|
1955
|
+
* @return {import("./Fill.js").default|null} Fill style.
|
|
1956
|
+
* @api
|
|
1957
|
+
*/
|
|
1958
|
+
getFill() {
|
|
1959
|
+
return this.fill_;
|
|
1960
|
+
}
|
|
1961
|
+
/**
|
|
1962
|
+
* Set the fill style.
|
|
1963
|
+
* @param {import("./Fill.js").default|null} fill Fill style.
|
|
1964
|
+
* @api
|
|
1965
|
+
*/
|
|
1966
|
+
setFill(fill) {
|
|
1967
|
+
this.fill_ = fill;
|
|
1968
|
+
}
|
|
1969
|
+
/**
|
|
1970
|
+
* Get the image style.
|
|
1971
|
+
* @return {import("./Image.js").default|null} Image style.
|
|
1972
|
+
* @api
|
|
1973
|
+
*/
|
|
1974
|
+
getImage() {
|
|
1975
|
+
return this.image_;
|
|
1976
|
+
}
|
|
1977
|
+
/**
|
|
1978
|
+
* Set the image style.
|
|
1979
|
+
* @param {import("./Image.js").default} image Image style.
|
|
1980
|
+
* @api
|
|
1981
|
+
*/
|
|
1982
|
+
setImage(image) {
|
|
1983
|
+
this.image_ = image;
|
|
1984
|
+
}
|
|
1985
|
+
/**
|
|
1986
|
+
* Get the stroke style.
|
|
1987
|
+
* @return {import("./Stroke.js").default|null} Stroke style.
|
|
1988
|
+
* @api
|
|
1989
|
+
*/
|
|
1990
|
+
getStroke() {
|
|
1991
|
+
return this.stroke_;
|
|
1992
|
+
}
|
|
1993
|
+
/**
|
|
1994
|
+
* Set the stroke style.
|
|
1995
|
+
* @param {import("./Stroke.js").default|null} stroke Stroke style.
|
|
1996
|
+
* @api
|
|
1997
|
+
*/
|
|
1998
|
+
setStroke(stroke) {
|
|
1999
|
+
this.stroke_ = stroke;
|
|
2000
|
+
}
|
|
2001
|
+
/**
|
|
2002
|
+
* Get the text style.
|
|
2003
|
+
* @return {import("./Text.js").default|null} Text style.
|
|
2004
|
+
* @api
|
|
2005
|
+
*/
|
|
2006
|
+
getText() {
|
|
2007
|
+
return this.text_;
|
|
2008
|
+
}
|
|
2009
|
+
/**
|
|
2010
|
+
* Set the text style.
|
|
2011
|
+
* @param {import("./Text.js").default|null} text Text style.
|
|
2012
|
+
* @api
|
|
2013
|
+
*/
|
|
2014
|
+
setText(text) {
|
|
2015
|
+
this.text_ = text;
|
|
2016
|
+
}
|
|
2017
|
+
/**
|
|
2018
|
+
* Get the z-index for the style.
|
|
2019
|
+
* @return {number|undefined} ZIndex.
|
|
2020
|
+
* @api
|
|
2021
|
+
*/
|
|
2022
|
+
getZIndex() {
|
|
2023
|
+
return this.zIndex_;
|
|
2024
|
+
}
|
|
2025
|
+
/**
|
|
2026
|
+
* Set a geometry that is rendered instead of the feature's geometry.
|
|
2027
|
+
*
|
|
2028
|
+
* @param {string|import("../geom/Geometry.js").default|GeometryFunction|null} geometry
|
|
2029
|
+
* Feature property or geometry or function returning a geometry to render
|
|
2030
|
+
* for this style.
|
|
2031
|
+
* @api
|
|
2032
|
+
*/
|
|
2033
|
+
setGeometry(geometry) {
|
|
2034
|
+
if (typeof geometry === "function") {
|
|
2035
|
+
this.geometryFunction_ = geometry;
|
|
2036
|
+
} else if (typeof geometry === "string") {
|
|
2037
|
+
this.geometryFunction_ = function(feature) {
|
|
2038
|
+
return (
|
|
2039
|
+
/** @type {import("../geom/Geometry.js").default} */
|
|
2040
|
+
feature.get(geometry)
|
|
2041
|
+
);
|
|
2042
|
+
};
|
|
2043
|
+
} else if (!geometry) {
|
|
2044
|
+
this.geometryFunction_ = defaultGeometryFunction;
|
|
2045
|
+
} else if (geometry !== void 0) {
|
|
2046
|
+
this.geometryFunction_ = function() {
|
|
2047
|
+
return (
|
|
2048
|
+
/** @type {import("../geom/Geometry.js").default} */
|
|
2049
|
+
geometry
|
|
2050
|
+
);
|
|
2051
|
+
};
|
|
2052
|
+
}
|
|
2053
|
+
this.geometry_ = geometry;
|
|
2054
|
+
}
|
|
2055
|
+
/**
|
|
2056
|
+
* Set the z-index.
|
|
2057
|
+
*
|
|
2058
|
+
* @param {number|undefined} zIndex ZIndex.
|
|
2059
|
+
* @api
|
|
2060
|
+
*/
|
|
2061
|
+
setZIndex(zIndex) {
|
|
2062
|
+
this.zIndex_ = zIndex;
|
|
2063
|
+
}
|
|
2064
|
+
};
|
|
2065
|
+
function toFunction(obj) {
|
|
2066
|
+
let styleFunction;
|
|
2067
|
+
if (typeof obj === "function") {
|
|
2068
|
+
styleFunction = obj;
|
|
2069
|
+
} else {
|
|
2070
|
+
let styles;
|
|
2071
|
+
if (Array.isArray(obj)) {
|
|
2072
|
+
styles = obj;
|
|
2073
|
+
} else {
|
|
2074
|
+
assert(
|
|
2075
|
+
typeof /** @type {?} */
|
|
2076
|
+
obj.getZIndex === "function",
|
|
2077
|
+
"Expected an `Style` or an array of `Style`"
|
|
2078
|
+
);
|
|
2079
|
+
const style = (
|
|
2080
|
+
/** @type {Style} */
|
|
2081
|
+
obj
|
|
2082
|
+
);
|
|
2083
|
+
styles = [style];
|
|
2084
|
+
}
|
|
2085
|
+
styleFunction = function() {
|
|
2086
|
+
return styles;
|
|
2087
|
+
};
|
|
2088
|
+
}
|
|
2089
|
+
return styleFunction;
|
|
2090
|
+
}
|
|
2091
|
+
var defaultStyles = null;
|
|
2092
|
+
function createDefaultStyle(feature, resolution) {
|
|
2093
|
+
if (!defaultStyles) {
|
|
2094
|
+
const fill = new Fill_default({
|
|
2095
|
+
color: "rgba(255,255,255,0.4)"
|
|
2096
|
+
});
|
|
2097
|
+
const stroke = new Stroke_default({
|
|
2098
|
+
color: "#3399CC",
|
|
2099
|
+
width: 1.25
|
|
2100
|
+
});
|
|
2101
|
+
defaultStyles = [
|
|
2102
|
+
new Style({
|
|
2103
|
+
image: new Circle_default({
|
|
2104
|
+
fill,
|
|
2105
|
+
stroke,
|
|
2106
|
+
radius: 5
|
|
2107
|
+
}),
|
|
2108
|
+
fill,
|
|
2109
|
+
stroke
|
|
2110
|
+
})
|
|
2111
|
+
];
|
|
2112
|
+
}
|
|
2113
|
+
return defaultStyles;
|
|
2114
|
+
}
|
|
2115
|
+
function createEditingStyle() {
|
|
2116
|
+
const styles = {};
|
|
2117
|
+
const white = [255, 255, 255, 1];
|
|
2118
|
+
const blue = [0, 153, 255, 1];
|
|
2119
|
+
const width = 3;
|
|
2120
|
+
styles["Polygon"] = [
|
|
2121
|
+
new Style({
|
|
2122
|
+
fill: new Fill_default({
|
|
2123
|
+
color: [255, 255, 255, 0.5]
|
|
2124
|
+
})
|
|
2125
|
+
})
|
|
2126
|
+
];
|
|
2127
|
+
styles["MultiPolygon"] = styles["Polygon"];
|
|
2128
|
+
styles["LineString"] = [
|
|
2129
|
+
new Style({
|
|
2130
|
+
stroke: new Stroke_default({
|
|
2131
|
+
color: white,
|
|
2132
|
+
width: width + 2
|
|
2133
|
+
})
|
|
2134
|
+
}),
|
|
2135
|
+
new Style({
|
|
2136
|
+
stroke: new Stroke_default({
|
|
2137
|
+
color: blue,
|
|
2138
|
+
width
|
|
2139
|
+
})
|
|
2140
|
+
})
|
|
2141
|
+
];
|
|
2142
|
+
styles["MultiLineString"] = styles["LineString"];
|
|
2143
|
+
styles["Circle"] = styles["Polygon"].concat(styles["LineString"]);
|
|
2144
|
+
styles["Point"] = [
|
|
2145
|
+
new Style({
|
|
2146
|
+
image: new Circle_default({
|
|
2147
|
+
radius: width * 2,
|
|
2148
|
+
fill: new Fill_default({
|
|
2149
|
+
color: blue
|
|
2150
|
+
}),
|
|
2151
|
+
stroke: new Stroke_default({
|
|
2152
|
+
color: white,
|
|
2153
|
+
width: width / 2
|
|
2154
|
+
})
|
|
2155
|
+
}),
|
|
2156
|
+
zIndex: Infinity
|
|
2157
|
+
})
|
|
2158
|
+
];
|
|
2159
|
+
styles["MultiPoint"] = styles["Point"];
|
|
2160
|
+
styles["GeometryCollection"] = styles["Polygon"].concat(
|
|
2161
|
+
styles["LineString"],
|
|
2162
|
+
styles["Point"]
|
|
2163
|
+
);
|
|
2164
|
+
return styles;
|
|
2165
|
+
}
|
|
2166
|
+
function defaultGeometryFunction(feature) {
|
|
2167
|
+
return feature.getGeometry();
|
|
2168
|
+
}
|
|
2169
|
+
var Style_default = Style;
|
|
2170
|
+
|
|
2171
|
+
// node_modules/ol/Feature.js
|
|
2172
|
+
init_dirname();
|
|
2173
|
+
init_buffer();
|
|
2174
|
+
init_process();
|
|
2175
|
+
var Feature = class _Feature extends Object_default {
|
|
2176
|
+
/**
|
|
2177
|
+
* @param {Geometry|ObjectWithGeometry<Geometry, NoInfer<Properties>>} [geometryOrProperties]
|
|
2178
|
+
* You may pass a Geometry object directly, or an object literal containing
|
|
2179
|
+
* properties. If you pass an object literal, you may include a Geometry
|
|
2180
|
+
* associated with a `geometry` key.
|
|
2181
|
+
*/
|
|
2182
|
+
constructor(geometryOrProperties) {
|
|
2183
|
+
super();
|
|
2184
|
+
this.on;
|
|
2185
|
+
this.once;
|
|
2186
|
+
this.un;
|
|
2187
|
+
this.id_ = void 0;
|
|
2188
|
+
this.geometryName_ = "geometry";
|
|
2189
|
+
this.style_ = null;
|
|
2190
|
+
this.styleFunction_ = void 0;
|
|
2191
|
+
this.geometryChangeKey_ = null;
|
|
2192
|
+
this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);
|
|
2193
|
+
if (geometryOrProperties) {
|
|
2194
|
+
if (typeof /** @type {?} */
|
|
2195
|
+
geometryOrProperties.getSimplifiedGeometry === "function") {
|
|
2196
|
+
const geometry = (
|
|
2197
|
+
/** @type {Geometry} */
|
|
2198
|
+
geometryOrProperties
|
|
2199
|
+
);
|
|
2200
|
+
this.setGeometry(geometry);
|
|
2201
|
+
} else {
|
|
2202
|
+
const properties = geometryOrProperties;
|
|
2203
|
+
this.setProperties(properties);
|
|
2204
|
+
}
|
|
2205
|
+
}
|
|
2206
|
+
}
|
|
2207
|
+
/**
|
|
2208
|
+
* Clone this feature. If the original feature has a geometry it
|
|
2209
|
+
* is also cloned. The feature id is not set in the clone.
|
|
2210
|
+
* @return {Feature<Geometry>} The clone.
|
|
2211
|
+
* @api
|
|
2212
|
+
*/
|
|
2213
|
+
clone() {
|
|
2214
|
+
const clone = (
|
|
2215
|
+
/** @type {Feature<Geometry>} */
|
|
2216
|
+
new _Feature()
|
|
2217
|
+
);
|
|
2218
|
+
const geometryName = this.geometryName_;
|
|
2219
|
+
clone.setGeometryName(geometryName);
|
|
2220
|
+
const properties = this.getPropertiesInternal();
|
|
2221
|
+
if (properties) {
|
|
2222
|
+
const geometry = this.getGeometry();
|
|
2223
|
+
for (const key in properties) {
|
|
2224
|
+
if (key === geometryName && geometry) {
|
|
2225
|
+
clone.set(key, geometry.clone());
|
|
2226
|
+
} else {
|
|
2227
|
+
clone.set(key, properties[key], true);
|
|
2228
|
+
}
|
|
2229
|
+
}
|
|
2230
|
+
}
|
|
2231
|
+
const style = this.getStyle();
|
|
2232
|
+
if (style) {
|
|
2233
|
+
clone.setStyle(style);
|
|
2234
|
+
}
|
|
2235
|
+
return clone;
|
|
2236
|
+
}
|
|
2237
|
+
/**
|
|
2238
|
+
* Get the feature's default geometry. A feature may have any number of named
|
|
2239
|
+
* geometries. The "default" geometry (the one that is rendered by default) is
|
|
2240
|
+
* set when calling {@link module:ol/Feature~Feature#setGeometry}.
|
|
2241
|
+
* @return {Geometry|undefined} The default geometry for the feature.
|
|
2242
|
+
* @api
|
|
2243
|
+
* @observable
|
|
2244
|
+
*/
|
|
2245
|
+
getGeometry() {
|
|
2246
|
+
return (
|
|
2247
|
+
/** @type {Geometry|undefined} */
|
|
2248
|
+
this.get(this.geometryName_)
|
|
2249
|
+
);
|
|
2250
|
+
}
|
|
2251
|
+
/**
|
|
2252
|
+
* Get the feature identifier. This is a stable identifier for the feature and
|
|
2253
|
+
* is either set when reading data from a remote source or set explicitly by
|
|
2254
|
+
* calling {@link module:ol/Feature~Feature#setId}.
|
|
2255
|
+
* @return {number|string|undefined} Id.
|
|
2256
|
+
* @api
|
|
2257
|
+
*/
|
|
2258
|
+
getId() {
|
|
2259
|
+
return this.id_;
|
|
2260
|
+
}
|
|
2261
|
+
/**
|
|
2262
|
+
* Get the name of the feature's default geometry. By default, the default
|
|
2263
|
+
* geometry is named `geometry`.
|
|
2264
|
+
* @return {string} Get the property name associated with the default geometry
|
|
2265
|
+
* for this feature.
|
|
2266
|
+
* @api
|
|
2267
|
+
*/
|
|
2268
|
+
getGeometryName() {
|
|
2269
|
+
return this.geometryName_;
|
|
2270
|
+
}
|
|
2271
|
+
/**
|
|
2272
|
+
* Get the feature's style. Will return what was provided to the
|
|
2273
|
+
* {@link module:ol/Feature~Feature#setStyle} method.
|
|
2274
|
+
* @return {import("./style/Style.js").StyleLike|null|undefined} The feature style.
|
|
2275
|
+
* @api
|
|
2276
|
+
*/
|
|
2277
|
+
getStyle() {
|
|
2278
|
+
return this.style_;
|
|
2279
|
+
}
|
|
2280
|
+
/**
|
|
2281
|
+
* Get the feature's style function.
|
|
2282
|
+
* @return {import("./style/Style.js").StyleFunction|undefined} Return a function
|
|
2283
|
+
* representing the current style of this feature.
|
|
2284
|
+
* @api
|
|
2285
|
+
*/
|
|
2286
|
+
getStyleFunction() {
|
|
2287
|
+
return this.styleFunction_;
|
|
2288
|
+
}
|
|
2289
|
+
/**
|
|
2290
|
+
* @private
|
|
2291
|
+
*/
|
|
2292
|
+
handleGeometryChange_() {
|
|
2293
|
+
this.changed();
|
|
2294
|
+
}
|
|
2295
|
+
/**
|
|
2296
|
+
* @private
|
|
2297
|
+
*/
|
|
2298
|
+
handleGeometryChanged_() {
|
|
2299
|
+
if (this.geometryChangeKey_) {
|
|
2300
|
+
unlistenByKey(this.geometryChangeKey_);
|
|
2301
|
+
this.geometryChangeKey_ = null;
|
|
2302
|
+
}
|
|
2303
|
+
const geometry = this.getGeometry();
|
|
2304
|
+
if (geometry) {
|
|
2305
|
+
this.geometryChangeKey_ = listen(
|
|
2306
|
+
geometry,
|
|
2307
|
+
EventType_default.CHANGE,
|
|
2308
|
+
this.handleGeometryChange_,
|
|
2309
|
+
this
|
|
2310
|
+
);
|
|
2311
|
+
}
|
|
2312
|
+
this.changed();
|
|
2313
|
+
}
|
|
2314
|
+
/**
|
|
2315
|
+
* Set the default geometry for the feature. This will update the property
|
|
2316
|
+
* with the name returned by {@link module:ol/Feature~Feature#getGeometryName}.
|
|
2317
|
+
* @param {Geometry|null|undefined} geometry The new geometry.
|
|
2318
|
+
* @api
|
|
2319
|
+
* @observable
|
|
2320
|
+
*/
|
|
2321
|
+
setGeometry(geometry) {
|
|
2322
|
+
this.set(this.geometryName_, geometry);
|
|
2323
|
+
}
|
|
2324
|
+
/**
|
|
2325
|
+
* Set the style for the feature to override the layer style. This can be a
|
|
2326
|
+
* single style object, an array of styles, or a function that takes a
|
|
2327
|
+
* resolution and returns an array of styles. To unset the feature style, call
|
|
2328
|
+
* `setStyle()` without arguments or a falsey value.
|
|
2329
|
+
* @param {import("./style/Style.js").StyleLike|null|undefined} [style] Style for this feature.
|
|
2330
|
+
* @api
|
|
2331
|
+
* @fires module:ol/events/Event~BaseEvent#event:change
|
|
2332
|
+
*/
|
|
2333
|
+
setStyle(style) {
|
|
2334
|
+
this.style_ = style != null ? style : null;
|
|
2335
|
+
this.styleFunction_ = !style ? void 0 : createStyleFunction(style);
|
|
2336
|
+
this.changed();
|
|
2337
|
+
}
|
|
2338
|
+
/**
|
|
2339
|
+
* Set the feature id. The feature id is considered stable and may be used when
|
|
2340
|
+
* requesting features or comparing identifiers returned from a remote source.
|
|
2341
|
+
* The feature id can be used with the
|
|
2342
|
+
* {@link module:ol/source/Vector~VectorSource#getFeatureById} method.
|
|
2343
|
+
* @param {number|string|undefined} id The feature id.
|
|
2344
|
+
* @api
|
|
2345
|
+
* @fires module:ol/events/Event~BaseEvent#event:change
|
|
2346
|
+
*/
|
|
2347
|
+
setId(id) {
|
|
2348
|
+
this.id_ = id;
|
|
2349
|
+
this.changed();
|
|
2350
|
+
}
|
|
2351
|
+
/**
|
|
2352
|
+
* Set the property name to be used when getting the feature's default geometry.
|
|
2353
|
+
* When calling {@link module:ol/Feature~Feature#getGeometry}, the value of the property with
|
|
2354
|
+
* this name will be returned.
|
|
2355
|
+
* @param {string} name The property name of the default geometry.
|
|
2356
|
+
* @api
|
|
2357
|
+
*/
|
|
2358
|
+
setGeometryName(name) {
|
|
2359
|
+
if (name === this.geometryName_) {
|
|
2360
|
+
return;
|
|
2361
|
+
}
|
|
2362
|
+
this.removeChangeListener(this.geometryName_, this.handleGeometryChanged_);
|
|
2363
|
+
this.geometryName_ = name;
|
|
2364
|
+
this.addChangeListener(this.geometryName_, this.handleGeometryChanged_);
|
|
2365
|
+
this.handleGeometryChanged_();
|
|
2366
|
+
}
|
|
2367
|
+
};
|
|
2368
|
+
function createStyleFunction(obj) {
|
|
2369
|
+
if (typeof obj === "function") {
|
|
2370
|
+
return obj;
|
|
2371
|
+
}
|
|
2372
|
+
let styles;
|
|
2373
|
+
if (Array.isArray(obj)) {
|
|
2374
|
+
styles = obj;
|
|
2375
|
+
} else {
|
|
2376
|
+
assert(
|
|
2377
|
+
typeof /** @type {?} */
|
|
2378
|
+
obj.getZIndex === "function",
|
|
2379
|
+
"Expected an `ol/style/Style` or an array of `ol/style/Style.js`"
|
|
2380
|
+
);
|
|
2381
|
+
const style = (
|
|
2382
|
+
/** @type {import("./style/Style.js").default} */
|
|
2383
|
+
obj
|
|
2384
|
+
);
|
|
2385
|
+
styles = [style];
|
|
2386
|
+
}
|
|
2387
|
+
return function() {
|
|
2388
|
+
return styles;
|
|
2389
|
+
};
|
|
2390
|
+
}
|
|
2391
|
+
var Feature_default = Feature;
|
|
2392
|
+
|
|
2393
|
+
// node_modules/ol/style/Icon.js
|
|
2394
|
+
init_dirname();
|
|
2395
|
+
init_buffer();
|
|
2396
|
+
init_process();
|
|
2397
|
+
function calculateScale(width, height, wantedWidth, wantedHeight) {
|
|
2398
|
+
if (wantedWidth !== void 0 && wantedHeight !== void 0) {
|
|
2399
|
+
return [wantedWidth / width, wantedHeight / height];
|
|
2400
|
+
}
|
|
2401
|
+
if (wantedWidth !== void 0) {
|
|
2402
|
+
return wantedWidth / width;
|
|
2403
|
+
}
|
|
2404
|
+
if (wantedHeight !== void 0) {
|
|
2405
|
+
return wantedHeight / height;
|
|
2406
|
+
}
|
|
2407
|
+
return 1;
|
|
2408
|
+
}
|
|
2409
|
+
var Icon = class _Icon extends Image_default {
|
|
2410
|
+
/**
|
|
2411
|
+
* @param {Options} [options] Options.
|
|
2412
|
+
*/
|
|
2413
|
+
constructor(options) {
|
|
2414
|
+
options = options || {};
|
|
2415
|
+
const opacity = options.opacity !== void 0 ? options.opacity : 1;
|
|
2416
|
+
const rotation = options.rotation !== void 0 ? options.rotation : 0;
|
|
2417
|
+
const scale = options.scale !== void 0 ? options.scale : 1;
|
|
2418
|
+
const rotateWithView = options.rotateWithView !== void 0 ? options.rotateWithView : false;
|
|
2419
|
+
super({
|
|
2420
|
+
opacity,
|
|
2421
|
+
rotation,
|
|
2422
|
+
scale,
|
|
2423
|
+
displacement: options.displacement !== void 0 ? options.displacement : [0, 0],
|
|
2424
|
+
rotateWithView,
|
|
2425
|
+
declutterMode: options.declutterMode
|
|
2426
|
+
});
|
|
2427
|
+
this.anchor_ = options.anchor !== void 0 ? options.anchor : [0.5, 0.5];
|
|
2428
|
+
this.normalizedAnchor_ = null;
|
|
2429
|
+
this.anchorOrigin_ = options.anchorOrigin !== void 0 ? options.anchorOrigin : "top-left";
|
|
2430
|
+
this.anchorXUnits_ = options.anchorXUnits !== void 0 ? options.anchorXUnits : "fraction";
|
|
2431
|
+
this.anchorYUnits_ = options.anchorYUnits !== void 0 ? options.anchorYUnits : "fraction";
|
|
2432
|
+
this.crossOrigin_ = options.crossOrigin !== void 0 ? options.crossOrigin : null;
|
|
2433
|
+
this.referrerPolicy_ = options.referrerPolicy;
|
|
2434
|
+
const image = options.img !== void 0 ? options.img : null;
|
|
2435
|
+
let cacheKey = options.src;
|
|
2436
|
+
assert(
|
|
2437
|
+
!(cacheKey !== void 0 && image),
|
|
2438
|
+
"`image` and `src` cannot be provided at the same time"
|
|
2439
|
+
);
|
|
2440
|
+
if ((cacheKey === void 0 || cacheKey.length === 0) && image) {
|
|
2441
|
+
cacheKey = /** @type {HTMLImageElement} */
|
|
2442
|
+
image.src || getUid(
|
|
2443
|
+
/** @type {Object} */
|
|
2444
|
+
image
|
|
2445
|
+
);
|
|
2446
|
+
}
|
|
2447
|
+
assert(
|
|
2448
|
+
cacheKey !== void 0 && cacheKey.length > 0,
|
|
2449
|
+
"A defined and non-empty `src` or `image` must be provided"
|
|
2450
|
+
);
|
|
2451
|
+
assert(
|
|
2452
|
+
!((options.width !== void 0 || options.height !== void 0) && options.scale !== void 0),
|
|
2453
|
+
"`width` or `height` cannot be provided together with `scale`"
|
|
2454
|
+
);
|
|
2455
|
+
let imageState;
|
|
2456
|
+
if (options.src !== void 0) {
|
|
2457
|
+
imageState = ImageState_default.IDLE;
|
|
2458
|
+
} else if (image !== void 0) {
|
|
2459
|
+
if ("complete" in /** @type {HTMLImageElement} */
|
|
2460
|
+
image) {
|
|
2461
|
+
if (
|
|
2462
|
+
/** @type {HTMLImageElement} */
|
|
2463
|
+
image.complete
|
|
2464
|
+
) {
|
|
2465
|
+
imageState = /** @type {HTMLImageElement} */
|
|
2466
|
+
image.src ? ImageState_default.LOADED : ImageState_default.IDLE;
|
|
2467
|
+
} else {
|
|
2468
|
+
imageState = ImageState_default.LOADING;
|
|
2469
|
+
}
|
|
2470
|
+
} else {
|
|
2471
|
+
imageState = ImageState_default.LOADED;
|
|
2472
|
+
}
|
|
2473
|
+
}
|
|
2474
|
+
this.color_ = options.color !== void 0 ? asArray(options.color) : null;
|
|
2475
|
+
this.iconImage_ = get(
|
|
2476
|
+
image,
|
|
2477
|
+
/** @type {string} */
|
|
2478
|
+
cacheKey,
|
|
2479
|
+
{
|
|
2480
|
+
crossOrigin: this.crossOrigin_,
|
|
2481
|
+
referrerPolicy: this.referrerPolicy_
|
|
2482
|
+
},
|
|
2483
|
+
imageState,
|
|
2484
|
+
this.color_
|
|
2485
|
+
);
|
|
2486
|
+
this.offset_ = options.offset !== void 0 ? options.offset : [0, 0];
|
|
2487
|
+
this.offsetOrigin_ = options.offsetOrigin !== void 0 ? options.offsetOrigin : "top-left";
|
|
2488
|
+
this.origin_ = null;
|
|
2489
|
+
this.size_ = options.size !== void 0 ? options.size : null;
|
|
2490
|
+
this.initialOptions_;
|
|
2491
|
+
if (options.width !== void 0 || options.height !== void 0) {
|
|
2492
|
+
let width, height;
|
|
2493
|
+
if (options.size) {
|
|
2494
|
+
[width, height] = options.size;
|
|
2495
|
+
} else {
|
|
2496
|
+
const image2 = this.getImage(1);
|
|
2497
|
+
if (image2.width && image2.height) {
|
|
2498
|
+
width = image2.width;
|
|
2499
|
+
height = image2.height;
|
|
2500
|
+
} else if (image2 instanceof HTMLImageElement) {
|
|
2501
|
+
this.initialOptions_ = options;
|
|
2502
|
+
const onload = () => {
|
|
2503
|
+
this.unlistenImageChange(onload);
|
|
2504
|
+
if (!this.initialOptions_) {
|
|
2505
|
+
return;
|
|
2506
|
+
}
|
|
2507
|
+
const imageSize = this.iconImage_.getSize();
|
|
2508
|
+
if (!imageSize) {
|
|
2509
|
+
return;
|
|
2510
|
+
}
|
|
2511
|
+
this.setScale(
|
|
2512
|
+
calculateScale(
|
|
2513
|
+
imageSize[0],
|
|
2514
|
+
imageSize[1],
|
|
2515
|
+
options.width,
|
|
2516
|
+
options.height
|
|
2517
|
+
)
|
|
2518
|
+
);
|
|
2519
|
+
};
|
|
2520
|
+
this.listenImageChange(onload);
|
|
2521
|
+
return;
|
|
2522
|
+
}
|
|
2523
|
+
}
|
|
2524
|
+
if (width !== void 0) {
|
|
2525
|
+
this.setScale(
|
|
2526
|
+
calculateScale(
|
|
2527
|
+
width,
|
|
2528
|
+
/** @type {number} */
|
|
2529
|
+
height,
|
|
2530
|
+
options.width,
|
|
2531
|
+
options.height
|
|
2532
|
+
)
|
|
2533
|
+
);
|
|
2534
|
+
}
|
|
2535
|
+
}
|
|
2536
|
+
}
|
|
2537
|
+
/**
|
|
2538
|
+
* Clones the style. The underlying Image/HTMLCanvasElement is not cloned.
|
|
2539
|
+
* @return {Icon} The cloned style.
|
|
2540
|
+
* @api
|
|
2541
|
+
* @override
|
|
2542
|
+
*/
|
|
2543
|
+
clone() {
|
|
2544
|
+
let scale, width, height;
|
|
2545
|
+
if (this.initialOptions_) {
|
|
2546
|
+
width = this.initialOptions_.width;
|
|
2547
|
+
height = this.initialOptions_.height;
|
|
2548
|
+
} else {
|
|
2549
|
+
scale = this.getScale();
|
|
2550
|
+
scale = Array.isArray(scale) ? scale.slice() : scale;
|
|
2551
|
+
}
|
|
2552
|
+
return new _Icon({
|
|
2553
|
+
anchor: this.anchor_.slice(),
|
|
2554
|
+
anchorOrigin: this.anchorOrigin_,
|
|
2555
|
+
anchorXUnits: this.anchorXUnits_,
|
|
2556
|
+
anchorYUnits: this.anchorYUnits_,
|
|
2557
|
+
color: this.color_ && this.color_.slice ? this.color_.slice() : this.color_ || void 0,
|
|
2558
|
+
crossOrigin: this.crossOrigin_,
|
|
2559
|
+
referrerPolicy: this.referrerPolicy_,
|
|
2560
|
+
offset: this.offset_.slice(),
|
|
2561
|
+
offsetOrigin: this.offsetOrigin_,
|
|
2562
|
+
opacity: this.getOpacity(),
|
|
2563
|
+
rotateWithView: this.getRotateWithView(),
|
|
2564
|
+
rotation: this.getRotation(),
|
|
2565
|
+
scale,
|
|
2566
|
+
width,
|
|
2567
|
+
height,
|
|
2568
|
+
size: this.size_ !== null ? this.size_.slice() : void 0,
|
|
2569
|
+
src: this.getSrc(),
|
|
2570
|
+
displacement: this.getDisplacement().slice(),
|
|
2571
|
+
declutterMode: this.getDeclutterMode()
|
|
2572
|
+
});
|
|
2573
|
+
}
|
|
2574
|
+
/**
|
|
2575
|
+
* Get the anchor point in pixels. The anchor determines the center point for the
|
|
2576
|
+
* symbolizer.
|
|
2577
|
+
* @return {Array<number>|null} Anchor.
|
|
2578
|
+
* @api
|
|
2579
|
+
* @override
|
|
2580
|
+
*/
|
|
2581
|
+
getAnchor() {
|
|
2582
|
+
let anchor = this.normalizedAnchor_;
|
|
2583
|
+
if (!anchor) {
|
|
2584
|
+
anchor = this.anchor_;
|
|
2585
|
+
const size = this.getSize();
|
|
2586
|
+
if (this.anchorXUnits_ == "fraction" || this.anchorYUnits_ == "fraction") {
|
|
2587
|
+
if (!size) {
|
|
2588
|
+
return null;
|
|
2589
|
+
}
|
|
2590
|
+
anchor = this.anchor_.slice();
|
|
2591
|
+
if (this.anchorXUnits_ == "fraction") {
|
|
2592
|
+
anchor[0] *= size[0];
|
|
2593
|
+
}
|
|
2594
|
+
if (this.anchorYUnits_ == "fraction") {
|
|
2595
|
+
anchor[1] *= size[1];
|
|
2596
|
+
}
|
|
2597
|
+
}
|
|
2598
|
+
if (this.anchorOrigin_ != "top-left") {
|
|
2599
|
+
if (!size) {
|
|
2600
|
+
return null;
|
|
2601
|
+
}
|
|
2602
|
+
if (anchor === this.anchor_) {
|
|
2603
|
+
anchor = this.anchor_.slice();
|
|
2604
|
+
}
|
|
2605
|
+
if (this.anchorOrigin_ == "top-right" || this.anchorOrigin_ == "bottom-right") {
|
|
2606
|
+
anchor[0] = -anchor[0] + size[0];
|
|
2607
|
+
}
|
|
2608
|
+
if (this.anchorOrigin_ == "bottom-left" || this.anchorOrigin_ == "bottom-right") {
|
|
2609
|
+
anchor[1] = -anchor[1] + size[1];
|
|
2610
|
+
}
|
|
2611
|
+
}
|
|
2612
|
+
this.normalizedAnchor_ = anchor;
|
|
2613
|
+
}
|
|
2614
|
+
const displacement = this.getDisplacement();
|
|
2615
|
+
const scale = this.getScaleArray();
|
|
2616
|
+
return [
|
|
2617
|
+
anchor[0] - displacement[0] / scale[0],
|
|
2618
|
+
anchor[1] + displacement[1] / scale[1]
|
|
2619
|
+
];
|
|
2620
|
+
}
|
|
2621
|
+
/**
|
|
2622
|
+
* Set the anchor point. The anchor determines the center point for the
|
|
2623
|
+
* symbolizer.
|
|
2624
|
+
*
|
|
2625
|
+
* @param {Array<number>} anchor Anchor.
|
|
2626
|
+
* @api
|
|
2627
|
+
*/
|
|
2628
|
+
setAnchor(anchor) {
|
|
2629
|
+
this.anchor_ = anchor;
|
|
2630
|
+
this.normalizedAnchor_ = null;
|
|
2631
|
+
}
|
|
2632
|
+
/**
|
|
2633
|
+
* Get the icon color.
|
|
2634
|
+
* @return {import("../color.js").Color|null} Color.
|
|
2635
|
+
* @api
|
|
2636
|
+
*/
|
|
2637
|
+
getColor() {
|
|
2638
|
+
return this.color_;
|
|
2639
|
+
}
|
|
2640
|
+
/**
|
|
2641
|
+
* Set the icon color.
|
|
2642
|
+
*
|
|
2643
|
+
* Warning: Repeatedly setting the color on an icon style
|
|
2644
|
+
* causes the icon image to be re-created each time. This can have a
|
|
2645
|
+
* severe performance impact.
|
|
2646
|
+
*
|
|
2647
|
+
* @param {import("../color.js").Color|string|null|undefined} color Color.
|
|
2648
|
+
*/
|
|
2649
|
+
setColor(color) {
|
|
2650
|
+
const nextColor = color ? asArray(color) : null;
|
|
2651
|
+
if (this.color_ === nextColor || this.color_ && nextColor && this.color_.length === nextColor.length && this.color_.every((value, index) => value === nextColor[index])) {
|
|
2652
|
+
return;
|
|
2653
|
+
}
|
|
2654
|
+
this.color_ = nextColor;
|
|
2655
|
+
const src = this.getSrc();
|
|
2656
|
+
const image = src !== void 0 ? null : this.getHitDetectionImage();
|
|
2657
|
+
const imageState = src !== void 0 ? ImageState_default.IDLE : this.iconImage_.getImageState();
|
|
2658
|
+
this.iconImage_ = get(
|
|
2659
|
+
image,
|
|
2660
|
+
src,
|
|
2661
|
+
{
|
|
2662
|
+
crossOrigin: this.crossOrigin_,
|
|
2663
|
+
referrerPolicy: this.referrerPolicy_
|
|
2664
|
+
},
|
|
2665
|
+
imageState,
|
|
2666
|
+
this.color_
|
|
2667
|
+
);
|
|
2668
|
+
}
|
|
2669
|
+
/**
|
|
2670
|
+
* Get the image icon.
|
|
2671
|
+
* @param {number} pixelRatio Pixel ratio.
|
|
2672
|
+
* @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image or Canvas element. If the Icon
|
|
2673
|
+
* style was configured with `src` or with a not let loaded `img`, an `ImageBitmap` will be returned.
|
|
2674
|
+
* @api
|
|
2675
|
+
* @override
|
|
2676
|
+
*/
|
|
2677
|
+
getImage(pixelRatio) {
|
|
2678
|
+
return this.iconImage_.getImage(pixelRatio);
|
|
2679
|
+
}
|
|
2680
|
+
/**
|
|
2681
|
+
* Get the pixel ratio.
|
|
2682
|
+
* @param {number} pixelRatio Pixel ratio.
|
|
2683
|
+
* @return {number} The pixel ratio of the image.
|
|
2684
|
+
* @api
|
|
2685
|
+
* @override
|
|
2686
|
+
*/
|
|
2687
|
+
getPixelRatio(pixelRatio) {
|
|
2688
|
+
return this.iconImage_.getPixelRatio(pixelRatio);
|
|
2689
|
+
}
|
|
2690
|
+
/**
|
|
2691
|
+
* @return {import("../size.js").Size|null} Image size.
|
|
2692
|
+
* @override
|
|
2693
|
+
*/
|
|
2694
|
+
getImageSize() {
|
|
2695
|
+
return this.iconImage_.getSize();
|
|
2696
|
+
}
|
|
2697
|
+
/**
|
|
2698
|
+
* @return {import("../ImageState.js").default} Image state.
|
|
2699
|
+
* @override
|
|
2700
|
+
*/
|
|
2701
|
+
getImageState() {
|
|
2702
|
+
return this.iconImage_.getImageState();
|
|
2703
|
+
}
|
|
2704
|
+
/**
|
|
2705
|
+
* @return {HTMLImageElement|HTMLCanvasElement|OffscreenCanvas|ImageBitmap} Image element.
|
|
2706
|
+
* @override
|
|
2707
|
+
*/
|
|
2708
|
+
getHitDetectionImage() {
|
|
2709
|
+
return this.iconImage_.getHitDetectionImage();
|
|
2710
|
+
}
|
|
2711
|
+
/**
|
|
2712
|
+
* Get the origin of the symbolizer.
|
|
2713
|
+
* @return {Array<number>|null} Origin.
|
|
2714
|
+
* @api
|
|
2715
|
+
* @override
|
|
2716
|
+
*/
|
|
2717
|
+
getOrigin() {
|
|
2718
|
+
if (this.origin_) {
|
|
2719
|
+
return this.origin_;
|
|
2720
|
+
}
|
|
2721
|
+
let offset = this.offset_;
|
|
2722
|
+
if (this.offsetOrigin_ != "top-left") {
|
|
2723
|
+
const size = this.getSize();
|
|
2724
|
+
const iconImageSize = this.iconImage_.getSize();
|
|
2725
|
+
if (!size || !iconImageSize) {
|
|
2726
|
+
return null;
|
|
2727
|
+
}
|
|
2728
|
+
offset = offset.slice();
|
|
2729
|
+
if (this.offsetOrigin_ == "top-right" || this.offsetOrigin_ == "bottom-right") {
|
|
2730
|
+
offset[0] = iconImageSize[0] - size[0] - offset[0];
|
|
2731
|
+
}
|
|
2732
|
+
if (this.offsetOrigin_ == "bottom-left" || this.offsetOrigin_ == "bottom-right") {
|
|
2733
|
+
offset[1] = iconImageSize[1] - size[1] - offset[1];
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
this.origin_ = offset;
|
|
2737
|
+
return this.origin_;
|
|
2738
|
+
}
|
|
2739
|
+
/**
|
|
2740
|
+
* Get the image URL.
|
|
2741
|
+
* @return {string|undefined} Image src.
|
|
2742
|
+
* @api
|
|
2743
|
+
*/
|
|
2744
|
+
getSrc() {
|
|
2745
|
+
return this.iconImage_.getSrc();
|
|
2746
|
+
}
|
|
2747
|
+
/**
|
|
2748
|
+
* Set the image URI
|
|
2749
|
+
* @param {string} src Image source URI
|
|
2750
|
+
* @api
|
|
2751
|
+
*/
|
|
2752
|
+
setSrc(src) {
|
|
2753
|
+
this.iconImage_ = get(
|
|
2754
|
+
null,
|
|
2755
|
+
src,
|
|
2756
|
+
{
|
|
2757
|
+
crossOrigin: this.crossOrigin_,
|
|
2758
|
+
referrerPolicy: this.referrerPolicy_
|
|
2759
|
+
},
|
|
2760
|
+
ImageState_default.IDLE,
|
|
2761
|
+
this.color_
|
|
2762
|
+
);
|
|
2763
|
+
}
|
|
2764
|
+
/**
|
|
2765
|
+
* Get the size of the icon (in pixels).
|
|
2766
|
+
* @return {import("../size.js").Size|null} Image size.
|
|
2767
|
+
* @api
|
|
2768
|
+
* @override
|
|
2769
|
+
*/
|
|
2770
|
+
getSize() {
|
|
2771
|
+
return !this.size_ ? this.iconImage_.getSize() : this.size_;
|
|
2772
|
+
}
|
|
2773
|
+
/**
|
|
2774
|
+
* Get the width of the icon (in pixels). Will return undefined when the icon image is not yet loaded.
|
|
2775
|
+
* @return {number|undefined} Icon width (in pixels).
|
|
2776
|
+
* @api
|
|
2777
|
+
*/
|
|
2778
|
+
getWidth() {
|
|
2779
|
+
const scale = this.getScaleArray();
|
|
2780
|
+
if (this.size_) {
|
|
2781
|
+
return this.size_[0] * scale[0];
|
|
2782
|
+
}
|
|
2783
|
+
if (this.iconImage_.getImageState() == ImageState_default.LOADED) {
|
|
2784
|
+
const size = this.iconImage_.getSize();
|
|
2785
|
+
if (size) {
|
|
2786
|
+
return size[0] * scale[0];
|
|
2787
|
+
}
|
|
2788
|
+
}
|
|
2789
|
+
return void 0;
|
|
2790
|
+
}
|
|
2791
|
+
/**
|
|
2792
|
+
* Get the height of the icon (in pixels). Will return undefined when the icon image is not yet loaded.
|
|
2793
|
+
* @return {number|undefined} Icon height (in pixels).
|
|
2794
|
+
* @api
|
|
2795
|
+
*/
|
|
2796
|
+
getHeight() {
|
|
2797
|
+
const scale = this.getScaleArray();
|
|
2798
|
+
if (this.size_) {
|
|
2799
|
+
return this.size_[1] * scale[1];
|
|
2800
|
+
}
|
|
2801
|
+
if (this.iconImage_.getImageState() == ImageState_default.LOADED) {
|
|
2802
|
+
const size = this.iconImage_.getSize();
|
|
2803
|
+
if (size) {
|
|
2804
|
+
return size[1] * scale[1];
|
|
2805
|
+
}
|
|
2806
|
+
}
|
|
2807
|
+
return void 0;
|
|
2808
|
+
}
|
|
2809
|
+
/**
|
|
2810
|
+
* Set the scale.
|
|
2811
|
+
*
|
|
2812
|
+
* @param {number|import("../size.js").Size} scale Scale.
|
|
2813
|
+
* @api
|
|
2814
|
+
* @override
|
|
2815
|
+
*/
|
|
2816
|
+
setScale(scale) {
|
|
2817
|
+
delete this.initialOptions_;
|
|
2818
|
+
super.setScale(scale);
|
|
2819
|
+
}
|
|
2820
|
+
/**
|
|
2821
|
+
* @param {function(import("../events/Event.js").default): void} listener Listener function.
|
|
2822
|
+
* @override
|
|
2823
|
+
*/
|
|
2824
|
+
listenImageChange(listener) {
|
|
2825
|
+
this.iconImage_.addEventListener(
|
|
2826
|
+
EventType_default.CHANGE,
|
|
2827
|
+
/** @type {import("../events.js").ListenerFunction} */
|
|
2828
|
+
listener
|
|
2829
|
+
);
|
|
2830
|
+
}
|
|
2831
|
+
/**
|
|
2832
|
+
* Load not yet loaded URI.
|
|
2833
|
+
* When rendering a feature with an icon style, the vector renderer will
|
|
2834
|
+
* automatically call this method. However, you might want to call this
|
|
2835
|
+
* method yourself for preloading or other purposes.
|
|
2836
|
+
* @api
|
|
2837
|
+
* @override
|
|
2838
|
+
*/
|
|
2839
|
+
load() {
|
|
2840
|
+
this.iconImage_.load();
|
|
2841
|
+
}
|
|
2842
|
+
/**
|
|
2843
|
+
* @param {function(import("../events/Event.js").default): void} listener Listener function.
|
|
2844
|
+
* @override
|
|
2845
|
+
*/
|
|
2846
|
+
unlistenImageChange(listener) {
|
|
2847
|
+
this.iconImage_.removeEventListener(
|
|
2848
|
+
EventType_default.CHANGE,
|
|
2849
|
+
/** @type {import("../events.js").ListenerFunction} */
|
|
2850
|
+
listener
|
|
2851
|
+
);
|
|
2852
|
+
}
|
|
2853
|
+
/**
|
|
2854
|
+
* @override
|
|
2855
|
+
*/
|
|
2856
|
+
ready() {
|
|
2857
|
+
return this.iconImage_.ready();
|
|
2858
|
+
}
|
|
2859
|
+
};
|
|
2860
|
+
var Icon_default = Icon;
|
|
2861
|
+
|
|
2862
|
+
// node_modules/ol/style/Text.js
|
|
2863
|
+
init_dirname();
|
|
2864
|
+
init_buffer();
|
|
2865
|
+
init_process();
|
|
2866
|
+
var DEFAULT_FILL_COLOR = "#333";
|
|
2867
|
+
var Text = class _Text {
|
|
2868
|
+
/**
|
|
2869
|
+
* @param {Options} [options] Options.
|
|
2870
|
+
*/
|
|
2871
|
+
constructor(options) {
|
|
2872
|
+
options = options || {};
|
|
2873
|
+
this.font_ = options.font;
|
|
2874
|
+
this.rotation_ = options.rotation;
|
|
2875
|
+
this.rotateWithView_ = options.rotateWithView;
|
|
2876
|
+
this.keepUpright_ = options.keepUpright;
|
|
2877
|
+
this.scale_ = options.scale;
|
|
2878
|
+
this.scaleArray_ = toSize(options.scale !== void 0 ? options.scale : 1);
|
|
2879
|
+
this.text_ = options.text;
|
|
2880
|
+
this.textAlign_ = options.textAlign;
|
|
2881
|
+
this.justify_ = options.justify;
|
|
2882
|
+
this.repeat_ = options.repeat;
|
|
2883
|
+
this.textBaseline_ = options.textBaseline;
|
|
2884
|
+
this.fill_ = options.fill !== void 0 ? options.fill : new Fill_default({ color: DEFAULT_FILL_COLOR });
|
|
2885
|
+
this.maxAngle_ = options.maxAngle !== void 0 ? options.maxAngle : Math.PI / 4;
|
|
2886
|
+
this.placement_ = options.placement !== void 0 ? options.placement : "point";
|
|
2887
|
+
this.overflow_ = !!options.overflow;
|
|
2888
|
+
this.stroke_ = options.stroke !== void 0 ? options.stroke : null;
|
|
2889
|
+
this.offsetX_ = options.offsetX !== void 0 ? options.offsetX : 0;
|
|
2890
|
+
this.offsetY_ = options.offsetY !== void 0 ? options.offsetY : 0;
|
|
2891
|
+
this.backgroundFill_ = options.backgroundFill ? options.backgroundFill : null;
|
|
2892
|
+
this.backgroundStroke_ = options.backgroundStroke ? options.backgroundStroke : null;
|
|
2893
|
+
this.padding_ = options.padding === void 0 ? null : options.padding;
|
|
2894
|
+
this.declutterMode_ = options.declutterMode;
|
|
2895
|
+
}
|
|
2896
|
+
/**
|
|
2897
|
+
* Clones the style.
|
|
2898
|
+
* @return {Text} The cloned style.
|
|
2899
|
+
* @api
|
|
2900
|
+
*/
|
|
2901
|
+
clone() {
|
|
2902
|
+
var _a, _b, _c;
|
|
2903
|
+
const scale = this.getScale();
|
|
2904
|
+
return new _Text({
|
|
2905
|
+
font: this.getFont(),
|
|
2906
|
+
placement: this.getPlacement(),
|
|
2907
|
+
repeat: this.getRepeat(),
|
|
2908
|
+
maxAngle: this.getMaxAngle(),
|
|
2909
|
+
overflow: this.getOverflow(),
|
|
2910
|
+
rotation: this.getRotation(),
|
|
2911
|
+
rotateWithView: this.getRotateWithView(),
|
|
2912
|
+
keepUpright: this.getKeepUpright(),
|
|
2913
|
+
scale: Array.isArray(scale) ? scale.slice() : scale,
|
|
2914
|
+
text: this.getText(),
|
|
2915
|
+
textAlign: this.getTextAlign(),
|
|
2916
|
+
justify: this.getJustify(),
|
|
2917
|
+
textBaseline: this.getTextBaseline(),
|
|
2918
|
+
fill: this.getFill() instanceof Fill_default ? (
|
|
2919
|
+
/** @type {Fill} */
|
|
2920
|
+
this.getFill().clone()
|
|
2921
|
+
) : this.getFill(),
|
|
2922
|
+
stroke: (_a = this.getStroke()) == null ? void 0 : _a.clone(),
|
|
2923
|
+
offsetX: this.getOffsetX(),
|
|
2924
|
+
offsetY: this.getOffsetY(),
|
|
2925
|
+
backgroundFill: (_b = this.getBackgroundFill()) == null ? void 0 : _b.clone(),
|
|
2926
|
+
backgroundStroke: (_c = this.getBackgroundStroke()) == null ? void 0 : _c.clone(),
|
|
2927
|
+
padding: this.getPadding() || void 0,
|
|
2928
|
+
declutterMode: this.getDeclutterMode()
|
|
2929
|
+
});
|
|
2930
|
+
}
|
|
2931
|
+
/**
|
|
2932
|
+
* Get the `overflow` configuration.
|
|
2933
|
+
* @return {boolean} Let text overflow the length of the path they follow.
|
|
2934
|
+
* @api
|
|
2935
|
+
*/
|
|
2936
|
+
getOverflow() {
|
|
2937
|
+
return this.overflow_;
|
|
2938
|
+
}
|
|
2939
|
+
/**
|
|
2940
|
+
* Get the font name.
|
|
2941
|
+
* @return {string|undefined} Font.
|
|
2942
|
+
* @api
|
|
2943
|
+
*/
|
|
2944
|
+
getFont() {
|
|
2945
|
+
return this.font_;
|
|
2946
|
+
}
|
|
2947
|
+
/**
|
|
2948
|
+
* Get the maximum angle between adjacent characters.
|
|
2949
|
+
* @return {number} Angle in radians.
|
|
2950
|
+
* @api
|
|
2951
|
+
*/
|
|
2952
|
+
getMaxAngle() {
|
|
2953
|
+
return this.maxAngle_;
|
|
2954
|
+
}
|
|
2955
|
+
/**
|
|
2956
|
+
* Get the label placement.
|
|
2957
|
+
* @return {TextPlacement} Text placement.
|
|
2958
|
+
* @api
|
|
2959
|
+
*/
|
|
2960
|
+
getPlacement() {
|
|
2961
|
+
return this.placement_;
|
|
2962
|
+
}
|
|
2963
|
+
/**
|
|
2964
|
+
* Get the repeat interval of the text.
|
|
2965
|
+
* @return {number|undefined} Repeat interval in pixels.
|
|
2966
|
+
* @api
|
|
2967
|
+
*/
|
|
2968
|
+
getRepeat() {
|
|
2969
|
+
return this.repeat_;
|
|
2970
|
+
}
|
|
2971
|
+
/**
|
|
2972
|
+
* Get the x-offset for the text.
|
|
2973
|
+
* @return {number} Horizontal text offset.
|
|
2974
|
+
* @api
|
|
2975
|
+
*/
|
|
2976
|
+
getOffsetX() {
|
|
2977
|
+
return this.offsetX_;
|
|
2978
|
+
}
|
|
2979
|
+
/**
|
|
2980
|
+
* Get the y-offset for the text.
|
|
2981
|
+
* @return {number} Vertical text offset.
|
|
2982
|
+
* @api
|
|
2983
|
+
*/
|
|
2984
|
+
getOffsetY() {
|
|
2985
|
+
return this.offsetY_;
|
|
2986
|
+
}
|
|
2987
|
+
/**
|
|
2988
|
+
* Get the fill style for the text.
|
|
2989
|
+
* @return {import("./Fill.js").default|null} Fill style.
|
|
2990
|
+
* @api
|
|
2991
|
+
*/
|
|
2992
|
+
getFill() {
|
|
2993
|
+
return this.fill_;
|
|
2994
|
+
}
|
|
2995
|
+
/**
|
|
2996
|
+
* Determine whether the text rotates with the map.
|
|
2997
|
+
* @return {boolean|undefined} Rotate with map.
|
|
2998
|
+
* @api
|
|
2999
|
+
*/
|
|
3000
|
+
getRotateWithView() {
|
|
3001
|
+
return this.rotateWithView_;
|
|
3002
|
+
}
|
|
3003
|
+
/**
|
|
3004
|
+
* Determine whether the text can be rendered upside down.
|
|
3005
|
+
* @return {boolean|undefined} Keep text upright.
|
|
3006
|
+
* @api
|
|
3007
|
+
*/
|
|
3008
|
+
getKeepUpright() {
|
|
3009
|
+
return this.keepUpright_;
|
|
3010
|
+
}
|
|
3011
|
+
/**
|
|
3012
|
+
* Get the text rotation.
|
|
3013
|
+
* @return {number|undefined} Rotation.
|
|
3014
|
+
* @api
|
|
3015
|
+
*/
|
|
3016
|
+
getRotation() {
|
|
3017
|
+
return this.rotation_;
|
|
3018
|
+
}
|
|
3019
|
+
/**
|
|
3020
|
+
* Get the text scale.
|
|
3021
|
+
* @return {number|import("../size.js").Size|undefined} Scale.
|
|
3022
|
+
* @api
|
|
3023
|
+
*/
|
|
3024
|
+
getScale() {
|
|
3025
|
+
return this.scale_;
|
|
3026
|
+
}
|
|
3027
|
+
/**
|
|
3028
|
+
* Get the symbolizer scale array.
|
|
3029
|
+
* @return {import("../size.js").Size} Scale array.
|
|
3030
|
+
*/
|
|
3031
|
+
getScaleArray() {
|
|
3032
|
+
return this.scaleArray_;
|
|
3033
|
+
}
|
|
3034
|
+
/**
|
|
3035
|
+
* Get the stroke style for the text.
|
|
3036
|
+
* @return {import("./Stroke.js").default|null} Stroke style.
|
|
3037
|
+
* @api
|
|
3038
|
+
*/
|
|
3039
|
+
getStroke() {
|
|
3040
|
+
return this.stroke_;
|
|
3041
|
+
}
|
|
3042
|
+
/**
|
|
3043
|
+
* Get the text to be rendered.
|
|
3044
|
+
* @return {string|Array<string>|undefined} Text.
|
|
3045
|
+
* @api
|
|
3046
|
+
*/
|
|
3047
|
+
getText() {
|
|
3048
|
+
return this.text_;
|
|
3049
|
+
}
|
|
3050
|
+
/**
|
|
3051
|
+
* Get the text alignment.
|
|
3052
|
+
* @return {CanvasTextAlign|undefined} Text align.
|
|
3053
|
+
* @api
|
|
3054
|
+
*/
|
|
3055
|
+
getTextAlign() {
|
|
3056
|
+
return this.textAlign_;
|
|
3057
|
+
}
|
|
3058
|
+
/**
|
|
3059
|
+
* Get the justification.
|
|
3060
|
+
* @return {TextJustify|undefined} Justification.
|
|
3061
|
+
* @api
|
|
3062
|
+
*/
|
|
3063
|
+
getJustify() {
|
|
3064
|
+
return this.justify_;
|
|
3065
|
+
}
|
|
3066
|
+
/**
|
|
3067
|
+
* Get the text baseline.
|
|
3068
|
+
* @return {CanvasTextBaseline|undefined} Text baseline.
|
|
3069
|
+
* @api
|
|
3070
|
+
*/
|
|
3071
|
+
getTextBaseline() {
|
|
3072
|
+
return this.textBaseline_;
|
|
3073
|
+
}
|
|
3074
|
+
/**
|
|
3075
|
+
* Get the background fill style for the text.
|
|
3076
|
+
* @return {import("./Fill.js").default|null} Fill style.
|
|
3077
|
+
* @api
|
|
3078
|
+
*/
|
|
3079
|
+
getBackgroundFill() {
|
|
3080
|
+
return this.backgroundFill_;
|
|
3081
|
+
}
|
|
3082
|
+
/**
|
|
3083
|
+
* Get the background stroke style for the text.
|
|
3084
|
+
* @return {import("./Stroke.js").default|null} Stroke style.
|
|
3085
|
+
* @api
|
|
3086
|
+
*/
|
|
3087
|
+
getBackgroundStroke() {
|
|
3088
|
+
return this.backgroundStroke_;
|
|
3089
|
+
}
|
|
3090
|
+
/**
|
|
3091
|
+
* Get the padding for the text.
|
|
3092
|
+
* @return {Array<number>|null} Padding.
|
|
3093
|
+
* @api
|
|
3094
|
+
*/
|
|
3095
|
+
getPadding() {
|
|
3096
|
+
return this.padding_;
|
|
3097
|
+
}
|
|
3098
|
+
/**
|
|
3099
|
+
* Get the declutter mode of the shape
|
|
3100
|
+
* @return {import("./Style.js").DeclutterMode|undefined} Shape's declutter mode
|
|
3101
|
+
* @api
|
|
3102
|
+
*/
|
|
3103
|
+
getDeclutterMode() {
|
|
3104
|
+
return this.declutterMode_;
|
|
3105
|
+
}
|
|
3106
|
+
/**
|
|
3107
|
+
* Set the `overflow` property.
|
|
3108
|
+
*
|
|
3109
|
+
* @param {boolean} overflow Let text overflow the path that it follows.
|
|
3110
|
+
* @api
|
|
3111
|
+
*/
|
|
3112
|
+
setOverflow(overflow) {
|
|
3113
|
+
this.overflow_ = overflow;
|
|
3114
|
+
}
|
|
3115
|
+
/**
|
|
3116
|
+
* Set the font.
|
|
3117
|
+
*
|
|
3118
|
+
* @param {string|undefined} font Font.
|
|
3119
|
+
* @api
|
|
3120
|
+
*/
|
|
3121
|
+
setFont(font) {
|
|
3122
|
+
this.font_ = font;
|
|
3123
|
+
}
|
|
3124
|
+
/**
|
|
3125
|
+
* Set the maximum angle between adjacent characters.
|
|
3126
|
+
*
|
|
3127
|
+
* @param {number} maxAngle Angle in radians.
|
|
3128
|
+
* @api
|
|
3129
|
+
*/
|
|
3130
|
+
setMaxAngle(maxAngle) {
|
|
3131
|
+
this.maxAngle_ = maxAngle;
|
|
3132
|
+
}
|
|
3133
|
+
/**
|
|
3134
|
+
* Set the x offset.
|
|
3135
|
+
*
|
|
3136
|
+
* @param {number} offsetX Horizontal text offset.
|
|
3137
|
+
* @api
|
|
3138
|
+
*/
|
|
3139
|
+
setOffsetX(offsetX) {
|
|
3140
|
+
this.offsetX_ = offsetX;
|
|
3141
|
+
}
|
|
3142
|
+
/**
|
|
3143
|
+
* Set the y offset.
|
|
3144
|
+
*
|
|
3145
|
+
* @param {number} offsetY Vertical text offset.
|
|
3146
|
+
* @api
|
|
3147
|
+
*/
|
|
3148
|
+
setOffsetY(offsetY) {
|
|
3149
|
+
this.offsetY_ = offsetY;
|
|
3150
|
+
}
|
|
3151
|
+
/**
|
|
3152
|
+
* Set the text placement.
|
|
3153
|
+
*
|
|
3154
|
+
* @param {TextPlacement} placement Placement.
|
|
3155
|
+
* @api
|
|
3156
|
+
*/
|
|
3157
|
+
setPlacement(placement) {
|
|
3158
|
+
this.placement_ = placement;
|
|
3159
|
+
}
|
|
3160
|
+
/**
|
|
3161
|
+
* Set the repeat interval of the text.
|
|
3162
|
+
* @param {number|undefined} [repeat] Repeat interval in pixels.
|
|
3163
|
+
* @api
|
|
3164
|
+
*/
|
|
3165
|
+
setRepeat(repeat) {
|
|
3166
|
+
this.repeat_ = repeat;
|
|
3167
|
+
}
|
|
3168
|
+
/**
|
|
3169
|
+
* Set whether to rotate the text with the view.
|
|
3170
|
+
*
|
|
3171
|
+
* @param {boolean} rotateWithView Rotate with map.
|
|
3172
|
+
* @api
|
|
3173
|
+
*/
|
|
3174
|
+
setRotateWithView(rotateWithView) {
|
|
3175
|
+
this.rotateWithView_ = rotateWithView;
|
|
3176
|
+
}
|
|
3177
|
+
/**
|
|
3178
|
+
* Set whether the text can be rendered upside down.
|
|
3179
|
+
*
|
|
3180
|
+
* @param {boolean} keepUpright Keep text upright.
|
|
3181
|
+
* @api
|
|
3182
|
+
*/
|
|
3183
|
+
setKeepUpright(keepUpright) {
|
|
3184
|
+
this.keepUpright_ = keepUpright;
|
|
3185
|
+
}
|
|
3186
|
+
/**
|
|
3187
|
+
* Set the fill.
|
|
3188
|
+
*
|
|
3189
|
+
* @param {import("./Fill.js").default|null} fill Fill style.
|
|
3190
|
+
* @api
|
|
3191
|
+
*/
|
|
3192
|
+
setFill(fill) {
|
|
3193
|
+
this.fill_ = fill;
|
|
3194
|
+
}
|
|
3195
|
+
/**
|
|
3196
|
+
* Set the rotation.
|
|
3197
|
+
*
|
|
3198
|
+
* @param {number|undefined} rotation Rotation.
|
|
3199
|
+
* @api
|
|
3200
|
+
*/
|
|
3201
|
+
setRotation(rotation) {
|
|
3202
|
+
this.rotation_ = rotation;
|
|
3203
|
+
}
|
|
3204
|
+
/**
|
|
3205
|
+
* Set the scale.
|
|
3206
|
+
*
|
|
3207
|
+
* @param {number|import("../size.js").Size|undefined} scale Scale.
|
|
3208
|
+
* @api
|
|
3209
|
+
*/
|
|
3210
|
+
setScale(scale) {
|
|
3211
|
+
this.scale_ = scale;
|
|
3212
|
+
this.scaleArray_ = toSize(scale !== void 0 ? scale : 1);
|
|
3213
|
+
}
|
|
3214
|
+
/**
|
|
3215
|
+
* Set the stroke.
|
|
3216
|
+
*
|
|
3217
|
+
* @param {import("./Stroke.js").default|null} stroke Stroke style.
|
|
3218
|
+
* @api
|
|
3219
|
+
*/
|
|
3220
|
+
setStroke(stroke) {
|
|
3221
|
+
this.stroke_ = stroke;
|
|
3222
|
+
}
|
|
3223
|
+
/**
|
|
3224
|
+
* Set the text.
|
|
3225
|
+
*
|
|
3226
|
+
* @param {string|Array<string>|undefined} text Text.
|
|
3227
|
+
* @api
|
|
3228
|
+
*/
|
|
3229
|
+
setText(text) {
|
|
3230
|
+
this.text_ = text;
|
|
3231
|
+
}
|
|
3232
|
+
/**
|
|
3233
|
+
* Set the text alignment.
|
|
3234
|
+
*
|
|
3235
|
+
* @param {CanvasTextAlign|undefined} textAlign Text align.
|
|
3236
|
+
* @api
|
|
3237
|
+
*/
|
|
3238
|
+
setTextAlign(textAlign) {
|
|
3239
|
+
this.textAlign_ = textAlign;
|
|
3240
|
+
}
|
|
3241
|
+
/**
|
|
3242
|
+
* Set the justification.
|
|
3243
|
+
*
|
|
3244
|
+
* @param {TextJustify|undefined} justify Justification.
|
|
3245
|
+
* @api
|
|
3246
|
+
*/
|
|
3247
|
+
setJustify(justify) {
|
|
3248
|
+
this.justify_ = justify;
|
|
3249
|
+
}
|
|
3250
|
+
/**
|
|
3251
|
+
* Set the text baseline.
|
|
3252
|
+
*
|
|
3253
|
+
* @param {CanvasTextBaseline|undefined} textBaseline Text baseline.
|
|
3254
|
+
* @api
|
|
3255
|
+
*/
|
|
3256
|
+
setTextBaseline(textBaseline) {
|
|
3257
|
+
this.textBaseline_ = textBaseline;
|
|
3258
|
+
}
|
|
3259
|
+
/**
|
|
3260
|
+
* Set the background fill.
|
|
3261
|
+
*
|
|
3262
|
+
* @param {import("./Fill.js").default|null} fill Fill style.
|
|
3263
|
+
* @api
|
|
3264
|
+
*/
|
|
3265
|
+
setBackgroundFill(fill) {
|
|
3266
|
+
this.backgroundFill_ = fill;
|
|
3267
|
+
}
|
|
3268
|
+
/**
|
|
3269
|
+
* Set the background stroke.
|
|
3270
|
+
*
|
|
3271
|
+
* @param {import("./Stroke.js").default|null} stroke Stroke style.
|
|
3272
|
+
* @api
|
|
3273
|
+
*/
|
|
3274
|
+
setBackgroundStroke(stroke) {
|
|
3275
|
+
this.backgroundStroke_ = stroke;
|
|
3276
|
+
}
|
|
3277
|
+
/**
|
|
3278
|
+
* Set the padding (`[top, right, bottom, left]`).
|
|
3279
|
+
*
|
|
3280
|
+
* @param {Array<number>|null} padding Padding.
|
|
3281
|
+
* @api
|
|
3282
|
+
*/
|
|
3283
|
+
setPadding(padding) {
|
|
3284
|
+
this.padding_ = padding;
|
|
3285
|
+
}
|
|
3286
|
+
};
|
|
3287
|
+
var Text_default = Text;
|
|
3288
|
+
|
|
3289
|
+
// node_modules/ol/geom/LineString.js
|
|
3290
|
+
init_dirname();
|
|
3291
|
+
init_buffer();
|
|
3292
|
+
init_process();
|
|
3293
|
+
|
|
3294
|
+
// node_modules/ol/geom/flat/interpolate.js
|
|
3295
|
+
init_dirname();
|
|
3296
|
+
init_buffer();
|
|
3297
|
+
init_process();
|
|
3298
|
+
function interpolatePoint(flatCoordinates, offset, end, stride, fraction, dest, dimension) {
|
|
3299
|
+
let o, t;
|
|
3300
|
+
const n = (end - offset) / stride;
|
|
3301
|
+
if (n === 1) {
|
|
3302
|
+
o = offset;
|
|
3303
|
+
} else if (n === 2) {
|
|
3304
|
+
o = offset;
|
|
3305
|
+
t = fraction;
|
|
3306
|
+
} else if (n !== 0) {
|
|
3307
|
+
let x1 = flatCoordinates[offset];
|
|
3308
|
+
let y1 = flatCoordinates[offset + 1];
|
|
3309
|
+
let length = 0;
|
|
3310
|
+
const cumulativeLengths = [0];
|
|
3311
|
+
for (let i = offset + stride; i < end; i += stride) {
|
|
3312
|
+
const x2 = flatCoordinates[i];
|
|
3313
|
+
const y2 = flatCoordinates[i + 1];
|
|
3314
|
+
length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
3315
|
+
cumulativeLengths.push(length);
|
|
3316
|
+
x1 = x2;
|
|
3317
|
+
y1 = y2;
|
|
3318
|
+
}
|
|
3319
|
+
const target = fraction * length;
|
|
3320
|
+
const index = binarySearch(cumulativeLengths, target);
|
|
3321
|
+
if (index < 0) {
|
|
3322
|
+
t = (target - cumulativeLengths[-index - 2]) / (cumulativeLengths[-index - 1] - cumulativeLengths[-index - 2]);
|
|
3323
|
+
o = offset + (-index - 2) * stride;
|
|
3324
|
+
} else {
|
|
3325
|
+
o = offset + index * stride;
|
|
3326
|
+
}
|
|
3327
|
+
}
|
|
3328
|
+
dimension = dimension !== void 0 && dimension > 1 ? dimension : 2;
|
|
3329
|
+
dest = dest ? dest : new Array(dimension);
|
|
3330
|
+
for (let i = 0; i < dimension; ++i) {
|
|
3331
|
+
dest[i] = o === void 0 ? NaN : t === void 0 ? flatCoordinates[o + i] : lerp(flatCoordinates[o + i], flatCoordinates[o + stride + i], t);
|
|
3332
|
+
}
|
|
3333
|
+
return dest;
|
|
3334
|
+
}
|
|
3335
|
+
function lineStringCoordinateAtM(flatCoordinates, offset, end, stride, m, extrapolate) {
|
|
3336
|
+
if (end == offset) {
|
|
3337
|
+
return null;
|
|
3338
|
+
}
|
|
3339
|
+
let coordinate;
|
|
3340
|
+
if (m < flatCoordinates[offset + stride - 1]) {
|
|
3341
|
+
if (extrapolate) {
|
|
3342
|
+
coordinate = flatCoordinates.slice(offset, offset + stride);
|
|
3343
|
+
coordinate[stride - 1] = m;
|
|
3344
|
+
return coordinate;
|
|
3345
|
+
}
|
|
3346
|
+
return null;
|
|
3347
|
+
}
|
|
3348
|
+
if (flatCoordinates[end - 1] < m) {
|
|
3349
|
+
if (extrapolate) {
|
|
3350
|
+
coordinate = flatCoordinates.slice(end - stride, end);
|
|
3351
|
+
coordinate[stride - 1] = m;
|
|
3352
|
+
return coordinate;
|
|
3353
|
+
}
|
|
3354
|
+
return null;
|
|
3355
|
+
}
|
|
3356
|
+
if (m == flatCoordinates[offset + stride - 1]) {
|
|
3357
|
+
return flatCoordinates.slice(offset, offset + stride);
|
|
3358
|
+
}
|
|
3359
|
+
let lo = offset / stride;
|
|
3360
|
+
let hi = end / stride;
|
|
3361
|
+
while (lo < hi) {
|
|
3362
|
+
const mid = lo + hi >> 1;
|
|
3363
|
+
if (m < flatCoordinates[(mid + 1) * stride - 1]) {
|
|
3364
|
+
hi = mid;
|
|
3365
|
+
} else {
|
|
3366
|
+
lo = mid + 1;
|
|
3367
|
+
}
|
|
3368
|
+
}
|
|
3369
|
+
const m0 = flatCoordinates[lo * stride - 1];
|
|
3370
|
+
if (m == m0) {
|
|
3371
|
+
return flatCoordinates.slice((lo - 1) * stride, (lo - 1) * stride + stride);
|
|
3372
|
+
}
|
|
3373
|
+
const m1 = flatCoordinates[(lo + 1) * stride - 1];
|
|
3374
|
+
const t = (m - m0) / (m1 - m0);
|
|
3375
|
+
coordinate = [];
|
|
3376
|
+
for (let i = 0; i < stride - 1; ++i) {
|
|
3377
|
+
coordinate.push(
|
|
3378
|
+
lerp(
|
|
3379
|
+
flatCoordinates[(lo - 1) * stride + i],
|
|
3380
|
+
flatCoordinates[lo * stride + i],
|
|
3381
|
+
t
|
|
3382
|
+
)
|
|
3383
|
+
);
|
|
3384
|
+
}
|
|
3385
|
+
coordinate.push(m);
|
|
3386
|
+
return coordinate;
|
|
3387
|
+
}
|
|
3388
|
+
function lineStringsCoordinateAtM(flatCoordinates, offset, ends, stride, m, extrapolate, interpolate) {
|
|
3389
|
+
if (interpolate) {
|
|
3390
|
+
return lineStringCoordinateAtM(
|
|
3391
|
+
flatCoordinates,
|
|
3392
|
+
offset,
|
|
3393
|
+
ends[ends.length - 1],
|
|
3394
|
+
stride,
|
|
3395
|
+
m,
|
|
3396
|
+
extrapolate
|
|
3397
|
+
);
|
|
3398
|
+
}
|
|
3399
|
+
let coordinate;
|
|
3400
|
+
if (m < flatCoordinates[stride - 1]) {
|
|
3401
|
+
if (extrapolate) {
|
|
3402
|
+
coordinate = flatCoordinates.slice(0, stride);
|
|
3403
|
+
coordinate[stride - 1] = m;
|
|
3404
|
+
return coordinate;
|
|
3405
|
+
}
|
|
3406
|
+
return null;
|
|
3407
|
+
}
|
|
3408
|
+
if (flatCoordinates[flatCoordinates.length - 1] < m) {
|
|
3409
|
+
if (extrapolate) {
|
|
3410
|
+
coordinate = flatCoordinates.slice(flatCoordinates.length - stride);
|
|
3411
|
+
coordinate[stride - 1] = m;
|
|
3412
|
+
return coordinate;
|
|
3413
|
+
}
|
|
3414
|
+
return null;
|
|
3415
|
+
}
|
|
3416
|
+
for (let i = 0, ii = ends.length; i < ii; ++i) {
|
|
3417
|
+
const end = ends[i];
|
|
3418
|
+
if (offset == end) {
|
|
3419
|
+
continue;
|
|
3420
|
+
}
|
|
3421
|
+
if (m < flatCoordinates[offset + stride - 1]) {
|
|
3422
|
+
return null;
|
|
3423
|
+
}
|
|
3424
|
+
if (m <= flatCoordinates[end - 1]) {
|
|
3425
|
+
return lineStringCoordinateAtM(
|
|
3426
|
+
flatCoordinates,
|
|
3427
|
+
offset,
|
|
3428
|
+
end,
|
|
3429
|
+
stride,
|
|
3430
|
+
m,
|
|
3431
|
+
false
|
|
3432
|
+
);
|
|
3433
|
+
}
|
|
3434
|
+
offset = end;
|
|
3435
|
+
}
|
|
3436
|
+
return null;
|
|
3437
|
+
}
|
|
3438
|
+
|
|
3439
|
+
// node_modules/ol/geom/flat/length.js
|
|
3440
|
+
init_dirname();
|
|
3441
|
+
init_buffer();
|
|
3442
|
+
init_process();
|
|
3443
|
+
function lineStringLength(flatCoordinates, offset, end, stride) {
|
|
3444
|
+
let x1 = flatCoordinates[offset];
|
|
3445
|
+
let y1 = flatCoordinates[offset + 1];
|
|
3446
|
+
let length = 0;
|
|
3447
|
+
for (let i = offset + stride; i < end; i += stride) {
|
|
3448
|
+
const x2 = flatCoordinates[i];
|
|
3449
|
+
const y2 = flatCoordinates[i + 1];
|
|
3450
|
+
length += Math.sqrt((x2 - x1) * (x2 - x1) + (y2 - y1) * (y2 - y1));
|
|
3451
|
+
x1 = x2;
|
|
3452
|
+
y1 = y2;
|
|
3453
|
+
}
|
|
3454
|
+
return length;
|
|
3455
|
+
}
|
|
3456
|
+
|
|
3457
|
+
// node_modules/ol/geom/LineString.js
|
|
3458
|
+
var LineString = class _LineString extends SimpleGeometry_default {
|
|
3459
|
+
/**
|
|
3460
|
+
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
|
|
3461
|
+
* For internal use, flat coordinates in combination with `layout` are also accepted.
|
|
3462
|
+
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
3463
|
+
*/
|
|
3464
|
+
constructor(coordinates, layout) {
|
|
3465
|
+
super();
|
|
3466
|
+
this.flatMidpoint_ = null;
|
|
3467
|
+
this.flatMidpointRevision_ = -1;
|
|
3468
|
+
this.maxDelta_ = -1;
|
|
3469
|
+
this.maxDeltaRevision_ = -1;
|
|
3470
|
+
if (layout !== void 0 && !Array.isArray(coordinates[0])) {
|
|
3471
|
+
this.setFlatCoordinates(
|
|
3472
|
+
layout,
|
|
3473
|
+
/** @type {Array<number>} */
|
|
3474
|
+
coordinates
|
|
3475
|
+
);
|
|
3476
|
+
} else {
|
|
3477
|
+
this.setCoordinates(
|
|
3478
|
+
/** @type {Array<import("../coordinate.js").Coordinate>} */
|
|
3479
|
+
coordinates,
|
|
3480
|
+
layout
|
|
3481
|
+
);
|
|
3482
|
+
}
|
|
3483
|
+
}
|
|
3484
|
+
/**
|
|
3485
|
+
* Append the passed coordinate to the coordinates of the linestring.
|
|
3486
|
+
* @param {import("../coordinate.js").Coordinate} coordinate Coordinate.
|
|
3487
|
+
* @api
|
|
3488
|
+
*/
|
|
3489
|
+
appendCoordinate(coordinate) {
|
|
3490
|
+
extend(this.flatCoordinates, coordinate);
|
|
3491
|
+
this.changed();
|
|
3492
|
+
}
|
|
3493
|
+
/**
|
|
3494
|
+
* Make a complete copy of the geometry.
|
|
3495
|
+
* @return {!LineString} Clone.
|
|
3496
|
+
* @api
|
|
3497
|
+
* @override
|
|
3498
|
+
*/
|
|
3499
|
+
clone() {
|
|
3500
|
+
const lineString = new _LineString(
|
|
3501
|
+
this.flatCoordinates.slice(),
|
|
3502
|
+
this.layout
|
|
3503
|
+
);
|
|
3504
|
+
lineString.applyProperties(this);
|
|
3505
|
+
return lineString;
|
|
3506
|
+
}
|
|
3507
|
+
/**
|
|
3508
|
+
* @param {number} x X.
|
|
3509
|
+
* @param {number} y Y.
|
|
3510
|
+
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
|
|
3511
|
+
* @param {number} minSquaredDistance Minimum squared distance.
|
|
3512
|
+
* @return {number} Minimum squared distance.
|
|
3513
|
+
* @override
|
|
3514
|
+
*/
|
|
3515
|
+
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
|
3516
|
+
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
|
3517
|
+
return minSquaredDistance;
|
|
3518
|
+
}
|
|
3519
|
+
if (this.maxDeltaRevision_ != this.getRevision()) {
|
|
3520
|
+
this.maxDelta_ = Math.sqrt(
|
|
3521
|
+
maxSquaredDelta(
|
|
3522
|
+
this.flatCoordinates,
|
|
3523
|
+
0,
|
|
3524
|
+
this.flatCoordinates.length,
|
|
3525
|
+
this.stride,
|
|
3526
|
+
0
|
|
3527
|
+
)
|
|
3528
|
+
);
|
|
3529
|
+
this.maxDeltaRevision_ = this.getRevision();
|
|
3530
|
+
}
|
|
3531
|
+
return assignClosestPoint(
|
|
3532
|
+
this.flatCoordinates,
|
|
3533
|
+
0,
|
|
3534
|
+
this.flatCoordinates.length,
|
|
3535
|
+
this.stride,
|
|
3536
|
+
this.maxDelta_,
|
|
3537
|
+
false,
|
|
3538
|
+
x,
|
|
3539
|
+
y,
|
|
3540
|
+
closestPoint,
|
|
3541
|
+
minSquaredDistance
|
|
3542
|
+
);
|
|
3543
|
+
}
|
|
3544
|
+
/**
|
|
3545
|
+
* Iterate over each segment, calling the provided callback.
|
|
3546
|
+
* If the callback returns a truthy value the function returns that
|
|
3547
|
+
* value immediately. Otherwise the function returns `false`.
|
|
3548
|
+
*
|
|
3549
|
+
* @param {function(this: S, import("../coordinate.js").Coordinate, import("../coordinate.js").Coordinate): T} callback Function
|
|
3550
|
+
* called for each segment. The function will receive two arguments, the start and end coordinates of the segment.
|
|
3551
|
+
* @return {T|boolean} Value.
|
|
3552
|
+
* @template T,S
|
|
3553
|
+
* @api
|
|
3554
|
+
*/
|
|
3555
|
+
forEachSegment(callback) {
|
|
3556
|
+
return forEach(
|
|
3557
|
+
this.flatCoordinates,
|
|
3558
|
+
0,
|
|
3559
|
+
this.flatCoordinates.length,
|
|
3560
|
+
this.stride,
|
|
3561
|
+
callback
|
|
3562
|
+
);
|
|
3563
|
+
}
|
|
3564
|
+
/**
|
|
3565
|
+
* Returns the coordinate at `m` using linear interpolation, or `null` if no
|
|
3566
|
+
* such coordinate exists.
|
|
3567
|
+
*
|
|
3568
|
+
* `extrapolate` controls extrapolation beyond the range of Ms in the
|
|
3569
|
+
* MultiLineString. If `extrapolate` is `true` then Ms less than the first
|
|
3570
|
+
* M will return the first coordinate and Ms greater than the last M will
|
|
3571
|
+
* return the last coordinate.
|
|
3572
|
+
*
|
|
3573
|
+
* @param {number} m M.
|
|
3574
|
+
* @param {boolean} [extrapolate] Extrapolate. Default is `false`.
|
|
3575
|
+
* @return {import("../coordinate.js").Coordinate|null} Coordinate.
|
|
3576
|
+
* @api
|
|
3577
|
+
*/
|
|
3578
|
+
getCoordinateAtM(m, extrapolate) {
|
|
3579
|
+
if (this.layout != "XYM" && this.layout != "XYZM") {
|
|
3580
|
+
return null;
|
|
3581
|
+
}
|
|
3582
|
+
extrapolate = extrapolate !== void 0 ? extrapolate : false;
|
|
3583
|
+
return lineStringCoordinateAtM(
|
|
3584
|
+
this.flatCoordinates,
|
|
3585
|
+
0,
|
|
3586
|
+
this.flatCoordinates.length,
|
|
3587
|
+
this.stride,
|
|
3588
|
+
m,
|
|
3589
|
+
extrapolate
|
|
3590
|
+
);
|
|
3591
|
+
}
|
|
3592
|
+
/**
|
|
3593
|
+
* Return the coordinates of the linestring.
|
|
3594
|
+
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
|
|
3595
|
+
* @api
|
|
3596
|
+
* @override
|
|
3597
|
+
*/
|
|
3598
|
+
getCoordinates() {
|
|
3599
|
+
return inflateCoordinates(
|
|
3600
|
+
this.flatCoordinates,
|
|
3601
|
+
0,
|
|
3602
|
+
this.flatCoordinates.length,
|
|
3603
|
+
this.stride
|
|
3604
|
+
);
|
|
3605
|
+
}
|
|
3606
|
+
/**
|
|
3607
|
+
* Return the coordinate at the provided fraction along the linestring.
|
|
3608
|
+
* The `fraction` is a number between 0 and 1, where 0 is the start of the
|
|
3609
|
+
* linestring and 1 is the end.
|
|
3610
|
+
* @param {number} fraction Fraction.
|
|
3611
|
+
* @param {import("../coordinate.js").Coordinate} [dest] Optional coordinate whose values will
|
|
3612
|
+
* be modified. If not provided, a new coordinate will be returned.
|
|
3613
|
+
* @return {import("../coordinate.js").Coordinate} Coordinate of the interpolated point.
|
|
3614
|
+
* @api
|
|
3615
|
+
*/
|
|
3616
|
+
getCoordinateAt(fraction, dest) {
|
|
3617
|
+
return interpolatePoint(
|
|
3618
|
+
this.flatCoordinates,
|
|
3619
|
+
0,
|
|
3620
|
+
this.flatCoordinates.length,
|
|
3621
|
+
this.stride,
|
|
3622
|
+
fraction,
|
|
3623
|
+
dest,
|
|
3624
|
+
this.stride
|
|
3625
|
+
);
|
|
3626
|
+
}
|
|
3627
|
+
/**
|
|
3628
|
+
* Return the length of the linestring on projected plane.
|
|
3629
|
+
* @return {number} Length (on projected plane).
|
|
3630
|
+
* @api
|
|
3631
|
+
*/
|
|
3632
|
+
getLength() {
|
|
3633
|
+
return lineStringLength(
|
|
3634
|
+
this.flatCoordinates,
|
|
3635
|
+
0,
|
|
3636
|
+
this.flatCoordinates.length,
|
|
3637
|
+
this.stride
|
|
3638
|
+
);
|
|
3639
|
+
}
|
|
3640
|
+
/**
|
|
3641
|
+
* @return {Array<number>} Flat midpoint.
|
|
3642
|
+
*/
|
|
3643
|
+
getFlatMidpoint() {
|
|
3644
|
+
var _a;
|
|
3645
|
+
if (this.flatMidpointRevision_ != this.getRevision()) {
|
|
3646
|
+
this.flatMidpoint_ = this.getCoordinateAt(
|
|
3647
|
+
0.5,
|
|
3648
|
+
(_a = this.flatMidpoint_) != null ? _a : void 0
|
|
3649
|
+
);
|
|
3650
|
+
this.flatMidpointRevision_ = this.getRevision();
|
|
3651
|
+
}
|
|
3652
|
+
return (
|
|
3653
|
+
/** @type {Array<number>} */
|
|
3654
|
+
this.flatMidpoint_
|
|
3655
|
+
);
|
|
3656
|
+
}
|
|
3657
|
+
/**
|
|
3658
|
+
* @param {number} squaredTolerance Squared tolerance.
|
|
3659
|
+
* @return {LineString} Simplified LineString.
|
|
3660
|
+
* @protected
|
|
3661
|
+
* @override
|
|
3662
|
+
*/
|
|
3663
|
+
getSimplifiedGeometryInternal(squaredTolerance) {
|
|
3664
|
+
const simplifiedFlatCoordinates = [];
|
|
3665
|
+
simplifiedFlatCoordinates.length = douglasPeucker(
|
|
3666
|
+
this.flatCoordinates,
|
|
3667
|
+
0,
|
|
3668
|
+
this.flatCoordinates.length,
|
|
3669
|
+
this.stride,
|
|
3670
|
+
squaredTolerance,
|
|
3671
|
+
simplifiedFlatCoordinates,
|
|
3672
|
+
0
|
|
3673
|
+
);
|
|
3674
|
+
return new _LineString(simplifiedFlatCoordinates, "XY");
|
|
3675
|
+
}
|
|
3676
|
+
/**
|
|
3677
|
+
* Get the type of this geometry.
|
|
3678
|
+
* @return {import("./Geometry.js").Type} Geometry type.
|
|
3679
|
+
* @api
|
|
3680
|
+
* @override
|
|
3681
|
+
*/
|
|
3682
|
+
getType() {
|
|
3683
|
+
return "LineString";
|
|
3684
|
+
}
|
|
3685
|
+
/**
|
|
3686
|
+
* Test if the geometry and the passed extent intersect.
|
|
3687
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
3688
|
+
* @return {boolean} `true` if the geometry and the extent intersect.
|
|
3689
|
+
* @api
|
|
3690
|
+
* @override
|
|
3691
|
+
*/
|
|
3692
|
+
intersectsExtent(extent) {
|
|
3693
|
+
return intersectsLineString(
|
|
3694
|
+
this.flatCoordinates,
|
|
3695
|
+
0,
|
|
3696
|
+
this.flatCoordinates.length,
|
|
3697
|
+
this.stride,
|
|
3698
|
+
extent,
|
|
3699
|
+
this.getExtent()
|
|
3700
|
+
);
|
|
3701
|
+
}
|
|
3702
|
+
/**
|
|
3703
|
+
* Set the coordinates of the linestring.
|
|
3704
|
+
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
|
|
3705
|
+
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
3706
|
+
* @api
|
|
3707
|
+
* @override
|
|
3708
|
+
*/
|
|
3709
|
+
setCoordinates(coordinates, layout) {
|
|
3710
|
+
this.setLayout(layout, coordinates, 1);
|
|
3711
|
+
if (!this.flatCoordinates) {
|
|
3712
|
+
this.flatCoordinates = [];
|
|
3713
|
+
}
|
|
3714
|
+
this.flatCoordinates.length = deflateCoordinates(
|
|
3715
|
+
this.flatCoordinates,
|
|
3716
|
+
0,
|
|
3717
|
+
coordinates,
|
|
3718
|
+
this.stride
|
|
3719
|
+
);
|
|
3720
|
+
this.changed();
|
|
3721
|
+
}
|
|
3722
|
+
};
|
|
3723
|
+
var LineString_default = LineString;
|
|
3724
|
+
|
|
3725
|
+
// node_modules/ol/geom/MultiLineString.js
|
|
3726
|
+
init_dirname();
|
|
3727
|
+
init_buffer();
|
|
3728
|
+
init_process();
|
|
3729
|
+
var MultiLineString = class _MultiLineString extends SimpleGeometry_default {
|
|
3730
|
+
/**
|
|
3731
|
+
* @param {Array<Array<import("../coordinate.js").Coordinate>|LineString>|Array<number>} coordinates
|
|
3732
|
+
* Coordinates or LineString geometries. (For internal use, flat coordinates in
|
|
3733
|
+
* combination with `layout` and `ends` are also accepted.)
|
|
3734
|
+
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
3735
|
+
* @param {Array<number>} [ends] Flat coordinate ends for internal use.
|
|
3736
|
+
*/
|
|
3737
|
+
constructor(coordinates, layout, ends) {
|
|
3738
|
+
super();
|
|
3739
|
+
this.ends_ = [];
|
|
3740
|
+
this.maxDelta_ = -1;
|
|
3741
|
+
this.maxDeltaRevision_ = -1;
|
|
3742
|
+
if (Array.isArray(coordinates[0])) {
|
|
3743
|
+
this.setCoordinates(
|
|
3744
|
+
/** @type {Array<Array<import("../coordinate.js").Coordinate>>} */
|
|
3745
|
+
coordinates,
|
|
3746
|
+
layout
|
|
3747
|
+
);
|
|
3748
|
+
} else if (layout !== void 0 && ends) {
|
|
3749
|
+
this.setFlatCoordinates(
|
|
3750
|
+
layout,
|
|
3751
|
+
/** @type {Array<number>} */
|
|
3752
|
+
coordinates
|
|
3753
|
+
);
|
|
3754
|
+
this.ends_ = ends;
|
|
3755
|
+
} else {
|
|
3756
|
+
const lineStrings = (
|
|
3757
|
+
/** @type {Array<LineString>} */
|
|
3758
|
+
coordinates
|
|
3759
|
+
);
|
|
3760
|
+
const flatCoordinates = [];
|
|
3761
|
+
const ends2 = [];
|
|
3762
|
+
for (let i = 0, ii = lineStrings.length; i < ii; ++i) {
|
|
3763
|
+
const lineString = lineStrings[i];
|
|
3764
|
+
extend(flatCoordinates, lineString.getFlatCoordinates());
|
|
3765
|
+
ends2.push(flatCoordinates.length);
|
|
3766
|
+
}
|
|
3767
|
+
const layout2 = lineStrings.length === 0 ? this.getLayout() : lineStrings[0].getLayout();
|
|
3768
|
+
this.setFlatCoordinates(layout2, flatCoordinates);
|
|
3769
|
+
this.ends_ = ends2;
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
3772
|
+
/**
|
|
3773
|
+
* Append the passed linestring to the multilinestring.
|
|
3774
|
+
* @param {LineString} lineString LineString.
|
|
3775
|
+
* @api
|
|
3776
|
+
*/
|
|
3777
|
+
appendLineString(lineString) {
|
|
3778
|
+
extend(this.flatCoordinates, lineString.getFlatCoordinates().slice());
|
|
3779
|
+
this.ends_.push(this.flatCoordinates.length);
|
|
3780
|
+
this.changed();
|
|
3781
|
+
}
|
|
3782
|
+
/**
|
|
3783
|
+
* Make a complete copy of the geometry.
|
|
3784
|
+
* @return {!MultiLineString} Clone.
|
|
3785
|
+
* @api
|
|
3786
|
+
* @override
|
|
3787
|
+
*/
|
|
3788
|
+
clone() {
|
|
3789
|
+
const multiLineString = new _MultiLineString(
|
|
3790
|
+
this.flatCoordinates.slice(),
|
|
3791
|
+
this.layout,
|
|
3792
|
+
this.ends_.slice()
|
|
3793
|
+
);
|
|
3794
|
+
multiLineString.applyProperties(this);
|
|
3795
|
+
return multiLineString;
|
|
3796
|
+
}
|
|
3797
|
+
/**
|
|
3798
|
+
* @param {number} x X.
|
|
3799
|
+
* @param {number} y Y.
|
|
3800
|
+
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
|
|
3801
|
+
* @param {number} minSquaredDistance Minimum squared distance.
|
|
3802
|
+
* @return {number} Minimum squared distance.
|
|
3803
|
+
* @override
|
|
3804
|
+
*/
|
|
3805
|
+
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
|
3806
|
+
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
|
3807
|
+
return minSquaredDistance;
|
|
3808
|
+
}
|
|
3809
|
+
if (this.maxDeltaRevision_ != this.getRevision()) {
|
|
3810
|
+
this.maxDelta_ = Math.sqrt(
|
|
3811
|
+
arrayMaxSquaredDelta(
|
|
3812
|
+
this.flatCoordinates,
|
|
3813
|
+
0,
|
|
3814
|
+
this.ends_,
|
|
3815
|
+
this.stride,
|
|
3816
|
+
0
|
|
3817
|
+
)
|
|
3818
|
+
);
|
|
3819
|
+
this.maxDeltaRevision_ = this.getRevision();
|
|
3820
|
+
}
|
|
3821
|
+
return assignClosestArrayPoint(
|
|
3822
|
+
this.flatCoordinates,
|
|
3823
|
+
0,
|
|
3824
|
+
this.ends_,
|
|
3825
|
+
this.stride,
|
|
3826
|
+
this.maxDelta_,
|
|
3827
|
+
false,
|
|
3828
|
+
x,
|
|
3829
|
+
y,
|
|
3830
|
+
closestPoint,
|
|
3831
|
+
minSquaredDistance
|
|
3832
|
+
);
|
|
3833
|
+
}
|
|
3834
|
+
/**
|
|
3835
|
+
* Returns the coordinate at `m` using linear interpolation, or `null` if no
|
|
3836
|
+
* such coordinate exists.
|
|
3837
|
+
*
|
|
3838
|
+
* `extrapolate` controls extrapolation beyond the range of Ms in the
|
|
3839
|
+
* MultiLineString. If `extrapolate` is `true` then Ms less than the first
|
|
3840
|
+
* M will return the first coordinate and Ms greater than the last M will
|
|
3841
|
+
* return the last coordinate.
|
|
3842
|
+
*
|
|
3843
|
+
* `interpolate` controls interpolation between consecutive LineStrings
|
|
3844
|
+
* within the MultiLineString. If `interpolate` is `true` the coordinates
|
|
3845
|
+
* will be linearly interpolated between the last coordinate of one LineString
|
|
3846
|
+
* and the first coordinate of the next LineString. If `interpolate` is
|
|
3847
|
+
* `false` then the function will return `null` for Ms falling between
|
|
3848
|
+
* LineStrings.
|
|
3849
|
+
*
|
|
3850
|
+
* @param {number} m M.
|
|
3851
|
+
* @param {boolean} [extrapolate] Extrapolate. Default is `false`.
|
|
3852
|
+
* @param {boolean} [interpolate] Interpolate. Default is `false`.
|
|
3853
|
+
* @return {import("../coordinate.js").Coordinate|null} Coordinate.
|
|
3854
|
+
* @api
|
|
3855
|
+
*/
|
|
3856
|
+
getCoordinateAtM(m, extrapolate, interpolate) {
|
|
3857
|
+
if (this.layout != "XYM" && this.layout != "XYZM" || this.flatCoordinates.length === 0) {
|
|
3858
|
+
return null;
|
|
3859
|
+
}
|
|
3860
|
+
extrapolate = extrapolate !== void 0 ? extrapolate : false;
|
|
3861
|
+
interpolate = interpolate !== void 0 ? interpolate : false;
|
|
3862
|
+
return lineStringsCoordinateAtM(
|
|
3863
|
+
this.flatCoordinates,
|
|
3864
|
+
0,
|
|
3865
|
+
this.ends_,
|
|
3866
|
+
this.stride,
|
|
3867
|
+
m,
|
|
3868
|
+
extrapolate,
|
|
3869
|
+
interpolate
|
|
3870
|
+
);
|
|
3871
|
+
}
|
|
3872
|
+
/**
|
|
3873
|
+
* Return the coordinates of the multilinestring.
|
|
3874
|
+
* @return {Array<Array<import("../coordinate.js").Coordinate>>} Coordinates.
|
|
3875
|
+
* @api
|
|
3876
|
+
* @override
|
|
3877
|
+
*/
|
|
3878
|
+
getCoordinates() {
|
|
3879
|
+
return inflateCoordinatesArray(
|
|
3880
|
+
this.flatCoordinates,
|
|
3881
|
+
0,
|
|
3882
|
+
this.ends_,
|
|
3883
|
+
this.stride
|
|
3884
|
+
);
|
|
3885
|
+
}
|
|
3886
|
+
/**
|
|
3887
|
+
* @return {Array<number>} Ends.
|
|
3888
|
+
*/
|
|
3889
|
+
getEnds() {
|
|
3890
|
+
return this.ends_;
|
|
3891
|
+
}
|
|
3892
|
+
/**
|
|
3893
|
+
* Return the linestring at the specified index.
|
|
3894
|
+
* @param {number} index Index.
|
|
3895
|
+
* @return {LineString|null} LineString.
|
|
3896
|
+
* @api
|
|
3897
|
+
*/
|
|
3898
|
+
getLineString(index) {
|
|
3899
|
+
if (index < 0 || this.ends_.length <= index) {
|
|
3900
|
+
return null;
|
|
3901
|
+
}
|
|
3902
|
+
return new LineString_default(
|
|
3903
|
+
this.flatCoordinates.slice(
|
|
3904
|
+
index === 0 ? 0 : this.ends_[index - 1],
|
|
3905
|
+
this.ends_[index]
|
|
3906
|
+
),
|
|
3907
|
+
this.layout
|
|
3908
|
+
);
|
|
3909
|
+
}
|
|
3910
|
+
/**
|
|
3911
|
+
* Return the linestrings of this multilinestring.
|
|
3912
|
+
* @return {Array<LineString>} LineStrings.
|
|
3913
|
+
* @api
|
|
3914
|
+
*/
|
|
3915
|
+
getLineStrings() {
|
|
3916
|
+
const flatCoordinates = this.flatCoordinates;
|
|
3917
|
+
const ends = this.ends_;
|
|
3918
|
+
const layout = this.layout;
|
|
3919
|
+
const lineStrings = [];
|
|
3920
|
+
let offset = 0;
|
|
3921
|
+
for (let i = 0, ii = ends.length; i < ii; ++i) {
|
|
3922
|
+
const end = ends[i];
|
|
3923
|
+
const lineString = new LineString_default(
|
|
3924
|
+
flatCoordinates.slice(offset, end),
|
|
3925
|
+
layout
|
|
3926
|
+
);
|
|
3927
|
+
lineStrings.push(lineString);
|
|
3928
|
+
offset = end;
|
|
3929
|
+
}
|
|
3930
|
+
return lineStrings;
|
|
3931
|
+
}
|
|
3932
|
+
/**
|
|
3933
|
+
* Return the sum of all line string lengths
|
|
3934
|
+
* @return {number} Length (on projected plane).
|
|
3935
|
+
* @api
|
|
3936
|
+
*/
|
|
3937
|
+
getLength() {
|
|
3938
|
+
const ends = this.ends_;
|
|
3939
|
+
let start = 0;
|
|
3940
|
+
let length = 0;
|
|
3941
|
+
for (let i = 0, ii = ends.length; i < ii; ++i) {
|
|
3942
|
+
length += lineStringLength(
|
|
3943
|
+
this.flatCoordinates,
|
|
3944
|
+
start,
|
|
3945
|
+
ends[i],
|
|
3946
|
+
this.stride
|
|
3947
|
+
);
|
|
3948
|
+
start = ends[i];
|
|
3949
|
+
}
|
|
3950
|
+
return length;
|
|
3951
|
+
}
|
|
3952
|
+
/**
|
|
3953
|
+
* @return {Array<number>} Flat midpoints.
|
|
3954
|
+
*/
|
|
3955
|
+
getFlatMidpoints() {
|
|
3956
|
+
const midpoints = [];
|
|
3957
|
+
const flatCoordinates = this.flatCoordinates;
|
|
3958
|
+
let offset = 0;
|
|
3959
|
+
const ends = this.ends_;
|
|
3960
|
+
const stride = this.stride;
|
|
3961
|
+
for (let i = 0, ii = ends.length; i < ii; ++i) {
|
|
3962
|
+
const end = ends[i];
|
|
3963
|
+
const midpoint = interpolatePoint(
|
|
3964
|
+
flatCoordinates,
|
|
3965
|
+
offset,
|
|
3966
|
+
end,
|
|
3967
|
+
stride,
|
|
3968
|
+
0.5
|
|
3969
|
+
);
|
|
3970
|
+
extend(midpoints, midpoint);
|
|
3971
|
+
offset = end;
|
|
3972
|
+
}
|
|
3973
|
+
return midpoints;
|
|
3974
|
+
}
|
|
3975
|
+
/**
|
|
3976
|
+
* @param {number} squaredTolerance Squared tolerance.
|
|
3977
|
+
* @return {MultiLineString} Simplified MultiLineString.
|
|
3978
|
+
* @protected
|
|
3979
|
+
* @override
|
|
3980
|
+
*/
|
|
3981
|
+
getSimplifiedGeometryInternal(squaredTolerance) {
|
|
3982
|
+
const simplifiedFlatCoordinates = [];
|
|
3983
|
+
const simplifiedEnds = [];
|
|
3984
|
+
simplifiedFlatCoordinates.length = douglasPeuckerArray(
|
|
3985
|
+
this.flatCoordinates,
|
|
3986
|
+
0,
|
|
3987
|
+
this.ends_,
|
|
3988
|
+
this.stride,
|
|
3989
|
+
squaredTolerance,
|
|
3990
|
+
simplifiedFlatCoordinates,
|
|
3991
|
+
0,
|
|
3992
|
+
simplifiedEnds
|
|
3993
|
+
);
|
|
3994
|
+
return new _MultiLineString(simplifiedFlatCoordinates, "XY", simplifiedEnds);
|
|
3995
|
+
}
|
|
3996
|
+
/**
|
|
3997
|
+
* Get the type of this geometry.
|
|
3998
|
+
* @return {import("./Geometry.js").Type} Geometry type.
|
|
3999
|
+
* @api
|
|
4000
|
+
* @override
|
|
4001
|
+
*/
|
|
4002
|
+
getType() {
|
|
4003
|
+
return "MultiLineString";
|
|
4004
|
+
}
|
|
4005
|
+
/**
|
|
4006
|
+
* Test if the geometry and the passed extent intersect.
|
|
4007
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
4008
|
+
* @return {boolean} `true` if the geometry and the extent intersect.
|
|
4009
|
+
* @api
|
|
4010
|
+
* @override
|
|
4011
|
+
*/
|
|
4012
|
+
intersectsExtent(extent) {
|
|
4013
|
+
return intersectsLineStringArray(
|
|
4014
|
+
this.flatCoordinates,
|
|
4015
|
+
0,
|
|
4016
|
+
this.ends_,
|
|
4017
|
+
this.stride,
|
|
4018
|
+
extent
|
|
4019
|
+
);
|
|
4020
|
+
}
|
|
4021
|
+
/**
|
|
4022
|
+
* Set the coordinates of the multilinestring.
|
|
4023
|
+
* @param {!Array<Array<import("../coordinate.js").Coordinate>>} coordinates Coordinates.
|
|
4024
|
+
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
4025
|
+
* @api
|
|
4026
|
+
* @override
|
|
4027
|
+
*/
|
|
4028
|
+
setCoordinates(coordinates, layout) {
|
|
4029
|
+
this.setLayout(layout, coordinates, 2);
|
|
4030
|
+
if (!this.flatCoordinates) {
|
|
4031
|
+
this.flatCoordinates = [];
|
|
4032
|
+
}
|
|
4033
|
+
const ends = deflateCoordinatesArray(
|
|
4034
|
+
this.flatCoordinates,
|
|
4035
|
+
0,
|
|
4036
|
+
coordinates,
|
|
4037
|
+
this.stride,
|
|
4038
|
+
this.ends_
|
|
4039
|
+
);
|
|
4040
|
+
this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1];
|
|
4041
|
+
this.changed();
|
|
4042
|
+
}
|
|
4043
|
+
};
|
|
4044
|
+
var MultiLineString_default = MultiLineString;
|
|
4045
|
+
|
|
4046
|
+
// node_modules/ol/geom/MultiPoint.js
|
|
4047
|
+
init_dirname();
|
|
4048
|
+
init_buffer();
|
|
4049
|
+
init_process();
|
|
4050
|
+
var MultiPoint = class _MultiPoint extends SimpleGeometry_default {
|
|
4051
|
+
/**
|
|
4052
|
+
* @param {Array<import("../coordinate.js").Coordinate>|Array<number>} coordinates Coordinates.
|
|
4053
|
+
* For internal use, flat coordinates in combination with `layout` are also accepted.
|
|
4054
|
+
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
4055
|
+
*/
|
|
4056
|
+
constructor(coordinates, layout) {
|
|
4057
|
+
super();
|
|
4058
|
+
if (layout && !Array.isArray(coordinates[0])) {
|
|
4059
|
+
this.setFlatCoordinates(
|
|
4060
|
+
layout,
|
|
4061
|
+
/** @type {Array<number>} */
|
|
4062
|
+
coordinates
|
|
4063
|
+
);
|
|
4064
|
+
} else {
|
|
4065
|
+
this.setCoordinates(
|
|
4066
|
+
/** @type {Array<import("../coordinate.js").Coordinate>} */
|
|
4067
|
+
coordinates,
|
|
4068
|
+
layout
|
|
4069
|
+
);
|
|
4070
|
+
}
|
|
4071
|
+
}
|
|
4072
|
+
/**
|
|
4073
|
+
* Append the passed point to this multipoint.
|
|
4074
|
+
* @param {Point} point Point.
|
|
4075
|
+
* @api
|
|
4076
|
+
*/
|
|
4077
|
+
appendPoint(point) {
|
|
4078
|
+
extend(this.flatCoordinates, point.getFlatCoordinates());
|
|
4079
|
+
this.changed();
|
|
4080
|
+
}
|
|
4081
|
+
/**
|
|
4082
|
+
* Make a complete copy of the geometry.
|
|
4083
|
+
* @return {!MultiPoint} Clone.
|
|
4084
|
+
* @api
|
|
4085
|
+
* @override
|
|
4086
|
+
*/
|
|
4087
|
+
clone() {
|
|
4088
|
+
const multiPoint = new _MultiPoint(
|
|
4089
|
+
this.flatCoordinates.slice(),
|
|
4090
|
+
this.layout
|
|
4091
|
+
);
|
|
4092
|
+
multiPoint.applyProperties(this);
|
|
4093
|
+
return multiPoint;
|
|
4094
|
+
}
|
|
4095
|
+
/**
|
|
4096
|
+
* @param {number} x X.
|
|
4097
|
+
* @param {number} y Y.
|
|
4098
|
+
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
|
|
4099
|
+
* @param {number} minSquaredDistance Minimum squared distance.
|
|
4100
|
+
* @return {number} Minimum squared distance.
|
|
4101
|
+
* @override
|
|
4102
|
+
*/
|
|
4103
|
+
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
|
4104
|
+
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
|
4105
|
+
return minSquaredDistance;
|
|
4106
|
+
}
|
|
4107
|
+
const flatCoordinates = this.flatCoordinates;
|
|
4108
|
+
const stride = this.stride;
|
|
4109
|
+
for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
|
|
4110
|
+
const squaredDistance2 = squaredDistance(
|
|
4111
|
+
x,
|
|
4112
|
+
y,
|
|
4113
|
+
flatCoordinates[i],
|
|
4114
|
+
flatCoordinates[i + 1]
|
|
4115
|
+
);
|
|
4116
|
+
if (squaredDistance2 < minSquaredDistance) {
|
|
4117
|
+
minSquaredDistance = squaredDistance2;
|
|
4118
|
+
for (let j = 0; j < stride; ++j) {
|
|
4119
|
+
closestPoint[j] = flatCoordinates[i + j];
|
|
4120
|
+
}
|
|
4121
|
+
closestPoint.length = stride;
|
|
4122
|
+
}
|
|
4123
|
+
}
|
|
4124
|
+
return minSquaredDistance;
|
|
4125
|
+
}
|
|
4126
|
+
/**
|
|
4127
|
+
* Return the coordinates of the multipoint.
|
|
4128
|
+
* @return {Array<import("../coordinate.js").Coordinate>} Coordinates.
|
|
4129
|
+
* @api
|
|
4130
|
+
* @override
|
|
4131
|
+
*/
|
|
4132
|
+
getCoordinates() {
|
|
4133
|
+
return inflateCoordinates(
|
|
4134
|
+
this.flatCoordinates,
|
|
4135
|
+
0,
|
|
4136
|
+
this.flatCoordinates.length,
|
|
4137
|
+
this.stride
|
|
4138
|
+
);
|
|
4139
|
+
}
|
|
4140
|
+
/**
|
|
4141
|
+
* Return the point at the specified index.
|
|
4142
|
+
* @param {number} index Index.
|
|
4143
|
+
* @return {Point|null} Point.
|
|
4144
|
+
* @api
|
|
4145
|
+
*/
|
|
4146
|
+
getPoint(index) {
|
|
4147
|
+
const n = this.flatCoordinates.length / this.stride;
|
|
4148
|
+
if (index < 0 || n <= index) {
|
|
4149
|
+
return null;
|
|
4150
|
+
}
|
|
4151
|
+
return new Point_default(
|
|
4152
|
+
this.flatCoordinates.slice(
|
|
4153
|
+
index * this.stride,
|
|
4154
|
+
(index + 1) * this.stride
|
|
4155
|
+
),
|
|
4156
|
+
this.layout
|
|
4157
|
+
);
|
|
4158
|
+
}
|
|
4159
|
+
/**
|
|
4160
|
+
* Return the points of this multipoint.
|
|
4161
|
+
* @return {Array<Point>} Points.
|
|
4162
|
+
* @api
|
|
4163
|
+
*/
|
|
4164
|
+
getPoints() {
|
|
4165
|
+
const flatCoordinates = this.flatCoordinates;
|
|
4166
|
+
const layout = this.layout;
|
|
4167
|
+
const stride = this.stride;
|
|
4168
|
+
const points = [];
|
|
4169
|
+
for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
|
|
4170
|
+
const point = new Point_default(flatCoordinates.slice(i, i + stride), layout);
|
|
4171
|
+
points.push(point);
|
|
4172
|
+
}
|
|
4173
|
+
return points;
|
|
4174
|
+
}
|
|
4175
|
+
/**
|
|
4176
|
+
* Get the type of this geometry.
|
|
4177
|
+
* @return {import("./Geometry.js").Type} Geometry type.
|
|
4178
|
+
* @api
|
|
4179
|
+
* @override
|
|
4180
|
+
*/
|
|
4181
|
+
getType() {
|
|
4182
|
+
return "MultiPoint";
|
|
4183
|
+
}
|
|
4184
|
+
/**
|
|
4185
|
+
* Test if the geometry and the passed extent intersect.
|
|
4186
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
4187
|
+
* @return {boolean} `true` if the geometry and the extent intersect.
|
|
4188
|
+
* @api
|
|
4189
|
+
* @override
|
|
4190
|
+
*/
|
|
4191
|
+
intersectsExtent(extent) {
|
|
4192
|
+
const flatCoordinates = this.flatCoordinates;
|
|
4193
|
+
const stride = this.stride;
|
|
4194
|
+
for (let i = 0, ii = flatCoordinates.length; i < ii; i += stride) {
|
|
4195
|
+
const x = flatCoordinates[i];
|
|
4196
|
+
const y = flatCoordinates[i + 1];
|
|
4197
|
+
if (containsXY(extent, x, y)) {
|
|
4198
|
+
return true;
|
|
4199
|
+
}
|
|
4200
|
+
}
|
|
4201
|
+
return false;
|
|
4202
|
+
}
|
|
4203
|
+
/**
|
|
4204
|
+
* Set the coordinates of the multipoint.
|
|
4205
|
+
* @param {!Array<import("../coordinate.js").Coordinate>} coordinates Coordinates.
|
|
4206
|
+
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
4207
|
+
* @api
|
|
4208
|
+
* @override
|
|
4209
|
+
*/
|
|
4210
|
+
setCoordinates(coordinates, layout) {
|
|
4211
|
+
this.setLayout(layout, coordinates, 1);
|
|
4212
|
+
if (!this.flatCoordinates) {
|
|
4213
|
+
this.flatCoordinates = [];
|
|
4214
|
+
}
|
|
4215
|
+
this.flatCoordinates.length = deflateCoordinates(
|
|
4216
|
+
this.flatCoordinates,
|
|
4217
|
+
0,
|
|
4218
|
+
coordinates,
|
|
4219
|
+
this.stride
|
|
4220
|
+
);
|
|
4221
|
+
this.changed();
|
|
4222
|
+
}
|
|
4223
|
+
};
|
|
4224
|
+
var MultiPoint_default = MultiPoint;
|
|
4225
|
+
|
|
4226
|
+
// node_modules/ol/geom/MultiPolygon.js
|
|
4227
|
+
init_dirname();
|
|
4228
|
+
init_buffer();
|
|
4229
|
+
init_process();
|
|
4230
|
+
|
|
4231
|
+
// node_modules/ol/geom/flat/center.js
|
|
4232
|
+
init_dirname();
|
|
4233
|
+
init_buffer();
|
|
4234
|
+
init_process();
|
|
4235
|
+
function linearRingss2(flatCoordinates, offset, endss, stride) {
|
|
4236
|
+
const flatCenters = [];
|
|
4237
|
+
let extent = createEmpty();
|
|
4238
|
+
for (let i = 0, ii = endss.length; i < ii; ++i) {
|
|
4239
|
+
const ends = endss[i];
|
|
4240
|
+
extent = createOrUpdateFromFlatCoordinates(
|
|
4241
|
+
flatCoordinates,
|
|
4242
|
+
offset,
|
|
4243
|
+
ends[0],
|
|
4244
|
+
stride
|
|
4245
|
+
);
|
|
4246
|
+
flatCenters.push((extent[0] + extent[2]) / 2, (extent[1] + extent[3]) / 2);
|
|
4247
|
+
offset = ends[ends.length - 1];
|
|
4248
|
+
}
|
|
4249
|
+
return flatCenters;
|
|
4250
|
+
}
|
|
4251
|
+
|
|
4252
|
+
// node_modules/ol/geom/MultiPolygon.js
|
|
4253
|
+
var MultiPolygon = class _MultiPolygon extends SimpleGeometry_default {
|
|
4254
|
+
/**
|
|
4255
|
+
* @param {Array<Array<Array<import("../coordinate.js").Coordinate>>|Polygon>|Array<number>} coordinates Coordinates.
|
|
4256
|
+
* For internal use, flat coordinates in combination with `layout` and `endss` are also accepted.
|
|
4257
|
+
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
4258
|
+
* @param {Array<Array<number>>} [endss] Array of ends for internal use with flat coordinates.
|
|
4259
|
+
*/
|
|
4260
|
+
constructor(coordinates, layout, endss) {
|
|
4261
|
+
super();
|
|
4262
|
+
this.endss_ = [];
|
|
4263
|
+
this.flatInteriorPointsRevision_ = -1;
|
|
4264
|
+
this.flatInteriorPoints_ = null;
|
|
4265
|
+
this.maxDelta_ = -1;
|
|
4266
|
+
this.maxDeltaRevision_ = -1;
|
|
4267
|
+
this.orientedRevision_ = -1;
|
|
4268
|
+
this.orientedFlatCoordinates_ = null;
|
|
4269
|
+
if (!endss && !Array.isArray(coordinates[0])) {
|
|
4270
|
+
const polygons = (
|
|
4271
|
+
/** @type {Array<Polygon>} */
|
|
4272
|
+
coordinates
|
|
4273
|
+
);
|
|
4274
|
+
const flatCoordinates = [];
|
|
4275
|
+
const thisEndss = [];
|
|
4276
|
+
for (let i = 0, ii = polygons.length; i < ii; ++i) {
|
|
4277
|
+
const polygon = polygons[i];
|
|
4278
|
+
const offset = flatCoordinates.length;
|
|
4279
|
+
const ends = polygon.getEnds();
|
|
4280
|
+
for (let j = 0, jj = ends.length; j < jj; ++j) {
|
|
4281
|
+
ends[j] += offset;
|
|
4282
|
+
}
|
|
4283
|
+
extend(flatCoordinates, polygon.getFlatCoordinates());
|
|
4284
|
+
thisEndss.push(ends);
|
|
4285
|
+
}
|
|
4286
|
+
layout = polygons.length === 0 ? this.getLayout() : polygons[0].getLayout();
|
|
4287
|
+
coordinates = flatCoordinates;
|
|
4288
|
+
endss = thisEndss;
|
|
4289
|
+
}
|
|
4290
|
+
if (layout !== void 0 && endss) {
|
|
4291
|
+
this.setFlatCoordinates(
|
|
4292
|
+
layout,
|
|
4293
|
+
/** @type {Array<number>} */
|
|
4294
|
+
coordinates
|
|
4295
|
+
);
|
|
4296
|
+
this.endss_ = endss;
|
|
4297
|
+
} else {
|
|
4298
|
+
this.setCoordinates(
|
|
4299
|
+
/** @type {Array<Array<Array<import("../coordinate.js").Coordinate>>>} */
|
|
4300
|
+
coordinates,
|
|
4301
|
+
layout
|
|
4302
|
+
);
|
|
4303
|
+
}
|
|
4304
|
+
}
|
|
4305
|
+
/**
|
|
4306
|
+
* Append the passed polygon to this multipolygon.
|
|
4307
|
+
* @param {Polygon} polygon Polygon.
|
|
4308
|
+
* @api
|
|
4309
|
+
*/
|
|
4310
|
+
appendPolygon(polygon) {
|
|
4311
|
+
let ends;
|
|
4312
|
+
if (!this.flatCoordinates) {
|
|
4313
|
+
this.flatCoordinates = polygon.getFlatCoordinates().slice();
|
|
4314
|
+
ends = polygon.getEnds().slice();
|
|
4315
|
+
this.endss_.push();
|
|
4316
|
+
} else {
|
|
4317
|
+
const offset = this.flatCoordinates.length;
|
|
4318
|
+
extend(this.flatCoordinates, polygon.getFlatCoordinates());
|
|
4319
|
+
ends = polygon.getEnds().slice();
|
|
4320
|
+
for (let i = 0, ii = ends.length; i < ii; ++i) {
|
|
4321
|
+
ends[i] += offset;
|
|
4322
|
+
}
|
|
4323
|
+
}
|
|
4324
|
+
this.endss_.push(ends);
|
|
4325
|
+
this.changed();
|
|
4326
|
+
}
|
|
4327
|
+
/**
|
|
4328
|
+
* Make a complete copy of the geometry.
|
|
4329
|
+
* @return {!MultiPolygon} Clone.
|
|
4330
|
+
* @api
|
|
4331
|
+
* @override
|
|
4332
|
+
*/
|
|
4333
|
+
clone() {
|
|
4334
|
+
const len = this.endss_.length;
|
|
4335
|
+
const newEndss = new Array(len);
|
|
4336
|
+
for (let i = 0; i < len; ++i) {
|
|
4337
|
+
newEndss[i] = this.endss_[i].slice();
|
|
4338
|
+
}
|
|
4339
|
+
const multiPolygon = new _MultiPolygon(
|
|
4340
|
+
this.flatCoordinates.slice(),
|
|
4341
|
+
this.layout,
|
|
4342
|
+
newEndss
|
|
4343
|
+
);
|
|
4344
|
+
multiPolygon.applyProperties(this);
|
|
4345
|
+
return multiPolygon;
|
|
4346
|
+
}
|
|
4347
|
+
/**
|
|
4348
|
+
* @param {number} x X.
|
|
4349
|
+
* @param {number} y Y.
|
|
4350
|
+
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
|
|
4351
|
+
* @param {number} minSquaredDistance Minimum squared distance.
|
|
4352
|
+
* @return {number} Minimum squared distance.
|
|
4353
|
+
* @override
|
|
4354
|
+
*/
|
|
4355
|
+
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
|
4356
|
+
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
|
4357
|
+
return minSquaredDistance;
|
|
4358
|
+
}
|
|
4359
|
+
if (this.maxDeltaRevision_ != this.getRevision()) {
|
|
4360
|
+
this.maxDelta_ = Math.sqrt(
|
|
4361
|
+
multiArrayMaxSquaredDelta(
|
|
4362
|
+
this.flatCoordinates,
|
|
4363
|
+
0,
|
|
4364
|
+
this.endss_,
|
|
4365
|
+
this.stride,
|
|
4366
|
+
0
|
|
4367
|
+
)
|
|
4368
|
+
);
|
|
4369
|
+
this.maxDeltaRevision_ = this.getRevision();
|
|
4370
|
+
}
|
|
4371
|
+
return assignClosestMultiArrayPoint(
|
|
4372
|
+
this.getOrientedFlatCoordinates(),
|
|
4373
|
+
0,
|
|
4374
|
+
this.endss_,
|
|
4375
|
+
this.stride,
|
|
4376
|
+
this.maxDelta_,
|
|
4377
|
+
true,
|
|
4378
|
+
x,
|
|
4379
|
+
y,
|
|
4380
|
+
closestPoint,
|
|
4381
|
+
minSquaredDistance
|
|
4382
|
+
);
|
|
4383
|
+
}
|
|
4384
|
+
/**
|
|
4385
|
+
* @param {number} x X.
|
|
4386
|
+
* @param {number} y Y.
|
|
4387
|
+
* @return {boolean} Contains (x, y).
|
|
4388
|
+
* @override
|
|
4389
|
+
*/
|
|
4390
|
+
containsXY(x, y) {
|
|
4391
|
+
return linearRingssContainsXY(
|
|
4392
|
+
this.getOrientedFlatCoordinates(),
|
|
4393
|
+
0,
|
|
4394
|
+
this.endss_,
|
|
4395
|
+
this.stride,
|
|
4396
|
+
x,
|
|
4397
|
+
y
|
|
4398
|
+
);
|
|
4399
|
+
}
|
|
4400
|
+
/**
|
|
4401
|
+
* Return the area of the multipolygon on projected plane.
|
|
4402
|
+
* @return {number} Area (on projected plane).
|
|
4403
|
+
* @api
|
|
4404
|
+
*/
|
|
4405
|
+
getArea() {
|
|
4406
|
+
return linearRingss(
|
|
4407
|
+
this.getOrientedFlatCoordinates(),
|
|
4408
|
+
0,
|
|
4409
|
+
this.endss_,
|
|
4410
|
+
this.stride
|
|
4411
|
+
);
|
|
4412
|
+
}
|
|
4413
|
+
/**
|
|
4414
|
+
* Get the coordinate array for this geometry. This array has the structure
|
|
4415
|
+
* of a GeoJSON coordinate array for multi-polygons.
|
|
4416
|
+
*
|
|
4417
|
+
* @param {boolean} [right] Orient coordinates according to the right-hand
|
|
4418
|
+
* rule (counter-clockwise for exterior and clockwise for interior rings).
|
|
4419
|
+
* If `false`, coordinates will be oriented according to the left-hand rule
|
|
4420
|
+
* (clockwise for exterior and counter-clockwise for interior rings).
|
|
4421
|
+
* By default, coordinate orientation will depend on how the geometry was
|
|
4422
|
+
* constructed.
|
|
4423
|
+
* @return {Array<Array<Array<import("../coordinate.js").Coordinate>>>} Coordinates.
|
|
4424
|
+
* @api
|
|
4425
|
+
* @override
|
|
4426
|
+
*/
|
|
4427
|
+
getCoordinates(right) {
|
|
4428
|
+
let flatCoordinates;
|
|
4429
|
+
if (right !== void 0) {
|
|
4430
|
+
flatCoordinates = this.getOrientedFlatCoordinates().slice();
|
|
4431
|
+
orientLinearRingsArray(
|
|
4432
|
+
flatCoordinates,
|
|
4433
|
+
0,
|
|
4434
|
+
this.endss_,
|
|
4435
|
+
this.stride,
|
|
4436
|
+
right
|
|
4437
|
+
);
|
|
4438
|
+
} else {
|
|
4439
|
+
flatCoordinates = this.flatCoordinates;
|
|
4440
|
+
}
|
|
4441
|
+
return inflateMultiCoordinatesArray(
|
|
4442
|
+
flatCoordinates,
|
|
4443
|
+
0,
|
|
4444
|
+
this.endss_,
|
|
4445
|
+
this.stride
|
|
4446
|
+
);
|
|
4447
|
+
}
|
|
4448
|
+
/**
|
|
4449
|
+
* @return {Array<Array<number>>} Endss.
|
|
4450
|
+
*/
|
|
4451
|
+
getEndss() {
|
|
4452
|
+
return this.endss_;
|
|
4453
|
+
}
|
|
4454
|
+
/**
|
|
4455
|
+
* @return {Array<number>} Flat interior points.
|
|
4456
|
+
*/
|
|
4457
|
+
getFlatInteriorPoints() {
|
|
4458
|
+
if (this.flatInteriorPointsRevision_ != this.getRevision()) {
|
|
4459
|
+
const flatCenters = linearRingss2(
|
|
4460
|
+
this.flatCoordinates,
|
|
4461
|
+
0,
|
|
4462
|
+
this.endss_,
|
|
4463
|
+
this.stride
|
|
4464
|
+
);
|
|
4465
|
+
this.flatInteriorPoints_ = getInteriorPointsOfMultiArray(
|
|
4466
|
+
this.getOrientedFlatCoordinates(),
|
|
4467
|
+
0,
|
|
4468
|
+
this.endss_,
|
|
4469
|
+
this.stride,
|
|
4470
|
+
flatCenters
|
|
4471
|
+
);
|
|
4472
|
+
this.flatInteriorPointsRevision_ = this.getRevision();
|
|
4473
|
+
}
|
|
4474
|
+
return (
|
|
4475
|
+
/** @type {Array<number>} */
|
|
4476
|
+
this.flatInteriorPoints_
|
|
4477
|
+
);
|
|
4478
|
+
}
|
|
4479
|
+
/**
|
|
4480
|
+
* Return the interior points as {@link module:ol/geom/MultiPoint~MultiPoint multipoint}.
|
|
4481
|
+
* @return {MultiPoint} Interior points as XYM coordinates, where M is
|
|
4482
|
+
* the length of the horizontal intersection that the point belongs to.
|
|
4483
|
+
* @api
|
|
4484
|
+
*/
|
|
4485
|
+
getInteriorPoints() {
|
|
4486
|
+
return new MultiPoint_default(this.getFlatInteriorPoints().slice(), "XYM");
|
|
4487
|
+
}
|
|
4488
|
+
/**
|
|
4489
|
+
* @return {Array<number>} Oriented flat coordinates.
|
|
4490
|
+
*/
|
|
4491
|
+
getOrientedFlatCoordinates() {
|
|
4492
|
+
if (this.orientedRevision_ != this.getRevision()) {
|
|
4493
|
+
const flatCoordinates = this.flatCoordinates;
|
|
4494
|
+
if (linearRingssAreOriented(flatCoordinates, 0, this.endss_, this.stride)) {
|
|
4495
|
+
this.orientedFlatCoordinates_ = flatCoordinates;
|
|
4496
|
+
} else {
|
|
4497
|
+
this.orientedFlatCoordinates_ = flatCoordinates.slice();
|
|
4498
|
+
this.orientedFlatCoordinates_.length = orientLinearRingsArray(
|
|
4499
|
+
this.orientedFlatCoordinates_,
|
|
4500
|
+
0,
|
|
4501
|
+
this.endss_,
|
|
4502
|
+
this.stride
|
|
4503
|
+
);
|
|
4504
|
+
}
|
|
4505
|
+
this.orientedRevision_ = this.getRevision();
|
|
4506
|
+
}
|
|
4507
|
+
return (
|
|
4508
|
+
/** @type {Array<number>} */
|
|
4509
|
+
this.orientedFlatCoordinates_
|
|
4510
|
+
);
|
|
4511
|
+
}
|
|
4512
|
+
/**
|
|
4513
|
+
* @param {number} squaredTolerance Squared tolerance.
|
|
4514
|
+
* @return {MultiPolygon} Simplified MultiPolygon.
|
|
4515
|
+
* @protected
|
|
4516
|
+
* @override
|
|
4517
|
+
*/
|
|
4518
|
+
getSimplifiedGeometryInternal(squaredTolerance) {
|
|
4519
|
+
const simplifiedFlatCoordinates = [];
|
|
4520
|
+
const simplifiedEndss = [];
|
|
4521
|
+
simplifiedFlatCoordinates.length = quantizeMultiArray(
|
|
4522
|
+
this.flatCoordinates,
|
|
4523
|
+
0,
|
|
4524
|
+
this.endss_,
|
|
4525
|
+
this.stride,
|
|
4526
|
+
Math.sqrt(squaredTolerance),
|
|
4527
|
+
simplifiedFlatCoordinates,
|
|
4528
|
+
0,
|
|
4529
|
+
simplifiedEndss
|
|
4530
|
+
);
|
|
4531
|
+
return new _MultiPolygon(simplifiedFlatCoordinates, "XY", simplifiedEndss);
|
|
4532
|
+
}
|
|
4533
|
+
/**
|
|
4534
|
+
* Return the polygon at the specified index.
|
|
4535
|
+
* @param {number} index Index.
|
|
4536
|
+
* @return {Polygon|null} Polygon.
|
|
4537
|
+
* @api
|
|
4538
|
+
*/
|
|
4539
|
+
getPolygon(index) {
|
|
4540
|
+
if (index < 0 || this.endss_.length <= index) {
|
|
4541
|
+
return null;
|
|
4542
|
+
}
|
|
4543
|
+
let offset;
|
|
4544
|
+
if (index === 0) {
|
|
4545
|
+
offset = 0;
|
|
4546
|
+
} else {
|
|
4547
|
+
const prevEnds = this.endss_[index - 1];
|
|
4548
|
+
offset = prevEnds[prevEnds.length - 1];
|
|
4549
|
+
}
|
|
4550
|
+
const ends = this.endss_[index].slice();
|
|
4551
|
+
const end = ends[ends.length - 1];
|
|
4552
|
+
if (offset !== 0) {
|
|
4553
|
+
for (let i = 0, ii = ends.length; i < ii; ++i) {
|
|
4554
|
+
ends[i] -= offset;
|
|
4555
|
+
}
|
|
4556
|
+
}
|
|
4557
|
+
return new Polygon_default(
|
|
4558
|
+
this.flatCoordinates.slice(offset, end),
|
|
4559
|
+
this.layout,
|
|
4560
|
+
ends
|
|
4561
|
+
);
|
|
4562
|
+
}
|
|
4563
|
+
/**
|
|
4564
|
+
* Return the polygons of this multipolygon.
|
|
4565
|
+
* @return {Array<Polygon>} Polygons.
|
|
4566
|
+
* @api
|
|
4567
|
+
*/
|
|
4568
|
+
getPolygons() {
|
|
4569
|
+
const layout = this.layout;
|
|
4570
|
+
const flatCoordinates = this.flatCoordinates;
|
|
4571
|
+
const endss = this.endss_;
|
|
4572
|
+
const polygons = [];
|
|
4573
|
+
let offset = 0;
|
|
4574
|
+
for (let i = 0, ii = endss.length; i < ii; ++i) {
|
|
4575
|
+
const ends = endss[i].slice();
|
|
4576
|
+
const end = ends[ends.length - 1];
|
|
4577
|
+
if (offset !== 0) {
|
|
4578
|
+
for (let j = 0, jj = ends.length; j < jj; ++j) {
|
|
4579
|
+
ends[j] -= offset;
|
|
4580
|
+
}
|
|
4581
|
+
}
|
|
4582
|
+
const polygon = new Polygon_default(
|
|
4583
|
+
flatCoordinates.slice(offset, end),
|
|
4584
|
+
layout,
|
|
4585
|
+
ends
|
|
4586
|
+
);
|
|
4587
|
+
polygons.push(polygon);
|
|
4588
|
+
offset = end;
|
|
4589
|
+
}
|
|
4590
|
+
return polygons;
|
|
4591
|
+
}
|
|
4592
|
+
/**
|
|
4593
|
+
* Get the type of this geometry.
|
|
4594
|
+
* @return {import("./Geometry.js").Type} Geometry type.
|
|
4595
|
+
* @api
|
|
4596
|
+
* @override
|
|
4597
|
+
*/
|
|
4598
|
+
getType() {
|
|
4599
|
+
return "MultiPolygon";
|
|
4600
|
+
}
|
|
4601
|
+
/**
|
|
4602
|
+
* Test if the geometry and the passed extent intersect.
|
|
4603
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
4604
|
+
* @return {boolean} `true` if the geometry and the extent intersect.
|
|
4605
|
+
* @api
|
|
4606
|
+
* @override
|
|
4607
|
+
*/
|
|
4608
|
+
intersectsExtent(extent) {
|
|
4609
|
+
return intersectsLinearRingMultiArray(
|
|
4610
|
+
this.getOrientedFlatCoordinates(),
|
|
4611
|
+
0,
|
|
4612
|
+
this.endss_,
|
|
4613
|
+
this.stride,
|
|
4614
|
+
extent
|
|
4615
|
+
);
|
|
4616
|
+
}
|
|
4617
|
+
/**
|
|
4618
|
+
* Set the coordinates of the multipolygon.
|
|
4619
|
+
* @param {!Array<Array<Array<import("../coordinate.js").Coordinate>>>} coordinates Coordinates.
|
|
4620
|
+
* @param {import("./Geometry.js").GeometryLayout} [layout] Layout.
|
|
4621
|
+
* @api
|
|
4622
|
+
* @override
|
|
4623
|
+
*/
|
|
4624
|
+
setCoordinates(coordinates, layout) {
|
|
4625
|
+
this.setLayout(layout, coordinates, 3);
|
|
4626
|
+
if (!this.flatCoordinates) {
|
|
4627
|
+
this.flatCoordinates = [];
|
|
4628
|
+
}
|
|
4629
|
+
const endss = deflateMultiCoordinatesArray(
|
|
4630
|
+
this.flatCoordinates,
|
|
4631
|
+
0,
|
|
4632
|
+
coordinates,
|
|
4633
|
+
this.stride,
|
|
4634
|
+
this.endss_
|
|
4635
|
+
);
|
|
4636
|
+
if (endss.length === 0) {
|
|
4637
|
+
this.flatCoordinates.length = 0;
|
|
4638
|
+
} else {
|
|
4639
|
+
const lastEnds = endss[endss.length - 1];
|
|
4640
|
+
this.flatCoordinates.length = lastEnds.length === 0 ? 0 : lastEnds[lastEnds.length - 1];
|
|
4641
|
+
}
|
|
4642
|
+
this.changed();
|
|
4643
|
+
}
|
|
4644
|
+
};
|
|
4645
|
+
var MultiPolygon_default = MultiPolygon;
|
|
4646
|
+
|
|
4647
|
+
// node_modules/ol/geom/GeometryCollection.js
|
|
4648
|
+
init_dirname();
|
|
4649
|
+
init_buffer();
|
|
4650
|
+
init_process();
|
|
4651
|
+
var GeometryCollection = class _GeometryCollection extends Geometry_default {
|
|
4652
|
+
/**
|
|
4653
|
+
* @param {Array<Geometry>} geometries Geometries.
|
|
4654
|
+
*/
|
|
4655
|
+
constructor(geometries) {
|
|
4656
|
+
super();
|
|
4657
|
+
this.geometries_ = geometries;
|
|
4658
|
+
this.changeEventsKeys_ = [];
|
|
4659
|
+
this.listenGeometriesChange_();
|
|
4660
|
+
}
|
|
4661
|
+
/**
|
|
4662
|
+
* @private
|
|
4663
|
+
*/
|
|
4664
|
+
unlistenGeometriesChange_() {
|
|
4665
|
+
this.changeEventsKeys_.forEach(unlistenByKey);
|
|
4666
|
+
this.changeEventsKeys_.length = 0;
|
|
4667
|
+
}
|
|
4668
|
+
/**
|
|
4669
|
+
* @private
|
|
4670
|
+
*/
|
|
4671
|
+
listenGeometriesChange_() {
|
|
4672
|
+
const geometries = this.geometries_;
|
|
4673
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
4674
|
+
this.changeEventsKeys_.push(
|
|
4675
|
+
listen(geometries[i], EventType_default.CHANGE, this.changed, this)
|
|
4676
|
+
);
|
|
4677
|
+
}
|
|
4678
|
+
}
|
|
4679
|
+
/**
|
|
4680
|
+
* Make a complete copy of the geometry.
|
|
4681
|
+
* @return {!GeometryCollection} Clone.
|
|
4682
|
+
* @api
|
|
4683
|
+
* @override
|
|
4684
|
+
*/
|
|
4685
|
+
clone() {
|
|
4686
|
+
const geometryCollection = new _GeometryCollection(
|
|
4687
|
+
cloneGeometries(this.geometries_)
|
|
4688
|
+
);
|
|
4689
|
+
geometryCollection.applyProperties(this);
|
|
4690
|
+
return geometryCollection;
|
|
4691
|
+
}
|
|
4692
|
+
/**
|
|
4693
|
+
* @param {number} x X.
|
|
4694
|
+
* @param {number} y Y.
|
|
4695
|
+
* @param {import("../coordinate.js").Coordinate} closestPoint Closest point.
|
|
4696
|
+
* @param {number} minSquaredDistance Minimum squared distance.
|
|
4697
|
+
* @return {number} Minimum squared distance.
|
|
4698
|
+
* @override
|
|
4699
|
+
*/
|
|
4700
|
+
closestPointXY(x, y, closestPoint, minSquaredDistance) {
|
|
4701
|
+
if (minSquaredDistance < closestSquaredDistanceXY(this.getExtent(), x, y)) {
|
|
4702
|
+
return minSquaredDistance;
|
|
4703
|
+
}
|
|
4704
|
+
const geometries = this.geometries_;
|
|
4705
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
4706
|
+
minSquaredDistance = geometries[i].closestPointXY(
|
|
4707
|
+
x,
|
|
4708
|
+
y,
|
|
4709
|
+
closestPoint,
|
|
4710
|
+
minSquaredDistance
|
|
4711
|
+
);
|
|
4712
|
+
}
|
|
4713
|
+
return minSquaredDistance;
|
|
4714
|
+
}
|
|
4715
|
+
/**
|
|
4716
|
+
* @param {number} x X.
|
|
4717
|
+
* @param {number} y Y.
|
|
4718
|
+
* @return {boolean} Contains (x, y).
|
|
4719
|
+
* @override
|
|
4720
|
+
*/
|
|
4721
|
+
containsXY(x, y) {
|
|
4722
|
+
const geometries = this.geometries_;
|
|
4723
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
4724
|
+
if (geometries[i].containsXY(x, y)) {
|
|
4725
|
+
return true;
|
|
4726
|
+
}
|
|
4727
|
+
}
|
|
4728
|
+
return false;
|
|
4729
|
+
}
|
|
4730
|
+
/**
|
|
4731
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
4732
|
+
* @protected
|
|
4733
|
+
* @return {import("../extent.js").Extent} extent Extent.
|
|
4734
|
+
* @override
|
|
4735
|
+
*/
|
|
4736
|
+
computeExtent(extent) {
|
|
4737
|
+
createOrUpdateEmpty(extent);
|
|
4738
|
+
const geometries = this.geometries_;
|
|
4739
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
4740
|
+
extend2(extent, geometries[i].getExtent());
|
|
4741
|
+
}
|
|
4742
|
+
return extent;
|
|
4743
|
+
}
|
|
4744
|
+
/**
|
|
4745
|
+
* Return the geometries that make up this geometry collection.
|
|
4746
|
+
* @return {Array<Geometry>} Geometries.
|
|
4747
|
+
* @api
|
|
4748
|
+
*/
|
|
4749
|
+
getGeometries() {
|
|
4750
|
+
return cloneGeometries(this.geometries_);
|
|
4751
|
+
}
|
|
4752
|
+
/**
|
|
4753
|
+
* @return {Array<Geometry>} Geometries.
|
|
4754
|
+
*/
|
|
4755
|
+
getGeometriesArray() {
|
|
4756
|
+
return this.geometries_;
|
|
4757
|
+
}
|
|
4758
|
+
/**
|
|
4759
|
+
* @return {Array<Geometry>} Geometries.
|
|
4760
|
+
*/
|
|
4761
|
+
getGeometriesArrayRecursive() {
|
|
4762
|
+
let geometriesArray = [];
|
|
4763
|
+
const geometries = this.geometries_;
|
|
4764
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
4765
|
+
if (geometries[i].getType() === this.getType()) {
|
|
4766
|
+
geometriesArray = geometriesArray.concat(
|
|
4767
|
+
/** @type {GeometryCollection} */
|
|
4768
|
+
geometries[i].getGeometriesArrayRecursive()
|
|
4769
|
+
);
|
|
4770
|
+
} else {
|
|
4771
|
+
geometriesArray.push(geometries[i]);
|
|
4772
|
+
}
|
|
4773
|
+
}
|
|
4774
|
+
return geometriesArray;
|
|
4775
|
+
}
|
|
4776
|
+
/**
|
|
4777
|
+
* Create a simplified version of this geometry using the Douglas Peucker algorithm.
|
|
4778
|
+
* @param {number} squaredTolerance Squared tolerance.
|
|
4779
|
+
* @return {GeometryCollection} Simplified GeometryCollection.
|
|
4780
|
+
* @override
|
|
4781
|
+
*/
|
|
4782
|
+
getSimplifiedGeometry(squaredTolerance) {
|
|
4783
|
+
if (this.simplifiedGeometryRevision !== this.getRevision()) {
|
|
4784
|
+
this.simplifiedGeometryMaxMinSquaredTolerance = 0;
|
|
4785
|
+
this.simplifiedGeometryRevision = this.getRevision();
|
|
4786
|
+
}
|
|
4787
|
+
if (squaredTolerance < 0 || this.simplifiedGeometryMaxMinSquaredTolerance !== 0 && squaredTolerance < this.simplifiedGeometryMaxMinSquaredTolerance) {
|
|
4788
|
+
return this;
|
|
4789
|
+
}
|
|
4790
|
+
const simplifiedGeometries = [];
|
|
4791
|
+
const geometries = this.geometries_;
|
|
4792
|
+
let simplified = false;
|
|
4793
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
4794
|
+
const geometry = geometries[i];
|
|
4795
|
+
const simplifiedGeometry = geometry.getSimplifiedGeometry(squaredTolerance);
|
|
4796
|
+
simplifiedGeometries.push(simplifiedGeometry);
|
|
4797
|
+
if (simplifiedGeometry !== geometry) {
|
|
4798
|
+
simplified = true;
|
|
4799
|
+
}
|
|
4800
|
+
}
|
|
4801
|
+
if (simplified) {
|
|
4802
|
+
const simplifiedGeometryCollection = new _GeometryCollection(
|
|
4803
|
+
simplifiedGeometries
|
|
4804
|
+
);
|
|
4805
|
+
return simplifiedGeometryCollection;
|
|
4806
|
+
}
|
|
4807
|
+
this.simplifiedGeometryMaxMinSquaredTolerance = squaredTolerance;
|
|
4808
|
+
return this;
|
|
4809
|
+
}
|
|
4810
|
+
/**
|
|
4811
|
+
* Get the type of this geometry.
|
|
4812
|
+
* @return {import("./Geometry.js").Type} Geometry type.
|
|
4813
|
+
* @api
|
|
4814
|
+
* @override
|
|
4815
|
+
*/
|
|
4816
|
+
getType() {
|
|
4817
|
+
return "GeometryCollection";
|
|
4818
|
+
}
|
|
4819
|
+
/**
|
|
4820
|
+
* Test if the geometry and the passed extent intersect.
|
|
4821
|
+
* @param {import("../extent.js").Extent} extent Extent.
|
|
4822
|
+
* @return {boolean} `true` if the geometry and the extent intersect.
|
|
4823
|
+
* @api
|
|
4824
|
+
* @override
|
|
4825
|
+
*/
|
|
4826
|
+
intersectsExtent(extent) {
|
|
4827
|
+
const geometries = this.geometries_;
|
|
4828
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
4829
|
+
if (geometries[i].intersectsExtent(extent)) {
|
|
4830
|
+
return true;
|
|
4831
|
+
}
|
|
4832
|
+
}
|
|
4833
|
+
return false;
|
|
4834
|
+
}
|
|
4835
|
+
/**
|
|
4836
|
+
* @return {boolean} Is empty.
|
|
4837
|
+
*/
|
|
4838
|
+
isEmpty() {
|
|
4839
|
+
return this.geometries_.length === 0;
|
|
4840
|
+
}
|
|
4841
|
+
/**
|
|
4842
|
+
* Rotate the geometry around a given coordinate. This modifies the geometry
|
|
4843
|
+
* coordinates in place.
|
|
4844
|
+
* @param {number} angle Rotation angle in radians.
|
|
4845
|
+
* @param {import("../coordinate.js").Coordinate} anchor The rotation center.
|
|
4846
|
+
* @api
|
|
4847
|
+
* @override
|
|
4848
|
+
*/
|
|
4849
|
+
rotate(angle, anchor) {
|
|
4850
|
+
const geometries = this.geometries_;
|
|
4851
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
4852
|
+
geometries[i].rotate(angle, anchor);
|
|
4853
|
+
}
|
|
4854
|
+
this.changed();
|
|
4855
|
+
}
|
|
4856
|
+
/**
|
|
4857
|
+
* Scale the geometry (with an optional origin). This modifies the geometry
|
|
4858
|
+
* coordinates in place.
|
|
4859
|
+
* @abstract
|
|
4860
|
+
* @param {number} sx The scaling factor in the x-direction.
|
|
4861
|
+
* @param {number} [sy] The scaling factor in the y-direction (defaults to sx).
|
|
4862
|
+
* @param {import("../coordinate.js").Coordinate} [anchor] The scale origin (defaults to the center
|
|
4863
|
+
* of the geometry extent).
|
|
4864
|
+
* @api
|
|
4865
|
+
* @override
|
|
4866
|
+
*/
|
|
4867
|
+
scale(sx, sy, anchor) {
|
|
4868
|
+
if (!anchor) {
|
|
4869
|
+
anchor = getCenter(this.getExtent());
|
|
4870
|
+
}
|
|
4871
|
+
const geometries = this.geometries_;
|
|
4872
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
4873
|
+
geometries[i].scale(sx, sy, anchor);
|
|
4874
|
+
}
|
|
4875
|
+
this.changed();
|
|
4876
|
+
}
|
|
4877
|
+
/**
|
|
4878
|
+
* Set the geometries that make up this geometry collection.
|
|
4879
|
+
* @param {Array<Geometry>} geometries Geometries.
|
|
4880
|
+
* @api
|
|
4881
|
+
*/
|
|
4882
|
+
setGeometries(geometries) {
|
|
4883
|
+
this.setGeometriesArray(cloneGeometries(geometries));
|
|
4884
|
+
}
|
|
4885
|
+
/**
|
|
4886
|
+
* @param {Array<Geometry>} geometries Geometries.
|
|
4887
|
+
*/
|
|
4888
|
+
setGeometriesArray(geometries) {
|
|
4889
|
+
this.unlistenGeometriesChange_();
|
|
4890
|
+
this.geometries_ = geometries;
|
|
4891
|
+
this.listenGeometriesChange_();
|
|
4892
|
+
this.changed();
|
|
4893
|
+
}
|
|
4894
|
+
/**
|
|
4895
|
+
* Apply a transform function to the coordinates of the geometry.
|
|
4896
|
+
* The geometry is modified in place.
|
|
4897
|
+
* If you do not want the geometry modified in place, first `clone()` it and
|
|
4898
|
+
* then use this function on the clone.
|
|
4899
|
+
* @param {import("../proj.js").TransformFunction} transformFn Transform function.
|
|
4900
|
+
* Called with a flat array of geometry coordinates.
|
|
4901
|
+
* @api
|
|
4902
|
+
* @override
|
|
4903
|
+
*/
|
|
4904
|
+
applyTransform(transformFn) {
|
|
4905
|
+
const geometries = this.geometries_;
|
|
4906
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
4907
|
+
geometries[i].applyTransform(transformFn);
|
|
4908
|
+
}
|
|
4909
|
+
this.changed();
|
|
4910
|
+
}
|
|
4911
|
+
/**
|
|
4912
|
+
* Translate the geometry. This modifies the geometry coordinates in place. If
|
|
4913
|
+
* instead you want a new geometry, first `clone()` this geometry.
|
|
4914
|
+
* @param {number} deltaX Delta X.
|
|
4915
|
+
* @param {number} deltaY Delta Y.
|
|
4916
|
+
* @api
|
|
4917
|
+
* @override
|
|
4918
|
+
*/
|
|
4919
|
+
translate(deltaX, deltaY) {
|
|
4920
|
+
const geometries = this.geometries_;
|
|
4921
|
+
for (let i = 0, ii = geometries.length; i < ii; ++i) {
|
|
4922
|
+
geometries[i].translate(deltaX, deltaY);
|
|
4923
|
+
}
|
|
4924
|
+
this.changed();
|
|
4925
|
+
}
|
|
4926
|
+
/**
|
|
4927
|
+
* Clean up.
|
|
4928
|
+
* @override
|
|
4929
|
+
*/
|
|
4930
|
+
disposeInternal() {
|
|
4931
|
+
this.unlistenGeometriesChange_();
|
|
4932
|
+
super.disposeInternal();
|
|
4933
|
+
}
|
|
4934
|
+
};
|
|
4935
|
+
function cloneGeometries(geometries) {
|
|
4936
|
+
return geometries.map((geometry) => geometry.clone());
|
|
4937
|
+
}
|
|
4938
|
+
var GeometryCollection_default = GeometryCollection;
|
|
4939
|
+
|
|
4940
|
+
export {
|
|
4941
|
+
shared,
|
|
4942
|
+
asColorLike,
|
|
4943
|
+
defaultFont,
|
|
4944
|
+
defaultFillStyle,
|
|
4945
|
+
defaultLineCap,
|
|
4946
|
+
defaultLineDash,
|
|
4947
|
+
defaultLineDashOffset,
|
|
4948
|
+
defaultLineJoin,
|
|
4949
|
+
defaultMiterLimit,
|
|
4950
|
+
defaultStrokeOffset,
|
|
4951
|
+
defaultStrokeStyle,
|
|
4952
|
+
defaultTextAlign,
|
|
4953
|
+
defaultTextBaseline,
|
|
4954
|
+
defaultPadding,
|
|
4955
|
+
defaultLineWidth,
|
|
4956
|
+
checkedFonts,
|
|
4957
|
+
registerFont,
|
|
4958
|
+
measureAndCacheTextWidth,
|
|
4959
|
+
getTextDimensions,
|
|
4960
|
+
drawImageOrLabel,
|
|
4961
|
+
lineStringLength,
|
|
4962
|
+
Icon_default,
|
|
4963
|
+
RegularShape_default,
|
|
4964
|
+
Circle_default,
|
|
4965
|
+
Fill_default,
|
|
4966
|
+
Stroke_default,
|
|
4967
|
+
toFunction,
|
|
4968
|
+
createDefaultStyle,
|
|
4969
|
+
createEditingStyle,
|
|
4970
|
+
Style_default,
|
|
4971
|
+
Text_default,
|
|
4972
|
+
interpolatePoint,
|
|
4973
|
+
LineString_default,
|
|
4974
|
+
MultiLineString_default,
|
|
4975
|
+
MultiPoint_default,
|
|
4976
|
+
linearRingss2 as linearRingss,
|
|
4977
|
+
MultiPolygon_default,
|
|
4978
|
+
Feature_default,
|
|
4979
|
+
GeometryCollection_default
|
|
4980
|
+
};
|