iclient-classic.js 503 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922109231092410925109261092710928109291093010931109321093310934109351093610937109381093910940109411094210943109441094510946109471094810949109501095110952109531095410955109561095710958109591096010961109621096310964109651096610967109681096910970109711097210973109741097510976109771097810979109801098110982109831098410985109861098710988109891099010991109921099310994109951099610997109981099911000110011100211003110041100511006110071100811009110101101111012110131101411015110161101711018110191102011021110221102311024110251102611027110281102911030110311103211033110341103511036110371103811039110401104111042110431104411045110461104711048110491105011051110521105311054110551105611057110581105911060110611106211063110641106511066110671106811069110701107111072110731107411075110761107711078110791108011081110821108311084110851108611087110881108911090110911109211093110941109511096110971109811099111001110111102111031110411105111061110711108111091111011111111121111311114111151111611117111181111911120111211112211123111241112511126111271112811129111301113111132111331113411135111361113711138111391114011141111421114311144111451114611147111481114911150111511115211153111541115511156111571115811159111601116111162111631116411165111661116711168111691117011171111721117311174111751117611177111781117911180111811118211183111841118511186111871118811189111901119111192111931119411195111961119711198111991120011201112021120311204112051120611207112081120911210112111121211213112141121511216112171121811219112201122111222112231122411225112261122711228112291123011231112321123311234112351123611237112381123911240112411124211243112441124511246112471124811249112501125111252112531125411255112561125711258112591126011261112621126311264112651126611267112681126911270112711127211273112741127511276112771127811279112801128111282112831128411285112861128711288112891129011291112921129311294112951129611297112981129911300113011130211303113041130511306113071130811309113101131111312113131131411315113161131711318113191132011321113221132311324113251132611327113281132911330113311133211333113341133511336113371133811339113401134111342113431134411345113461134711348113491135011351113521135311354113551135611357113581135911360113611136211363113641136511366113671136811369113701137111372113731137411375113761137711378113791138011381113821138311384113851138611387113881138911390113911139211393113941139511396113971139811399114001140111402114031140411405114061140711408114091141011411114121141311414114151141611417114181141911420114211142211423114241142511426114271142811429114301143111432114331143411435114361143711438114391144011441114421144311444114451144611447114481144911450114511145211453114541145511456114571145811459114601146111462114631146411465114661146711468114691147011471114721147311474114751147611477114781147911480114811148211483114841148511486114871148811489114901149111492114931149411495114961149711498114991150011501115021150311504115051150611507115081150911510115111151211513115141151511516115171151811519115201152111522115231152411525115261152711528115291153011531115321153311534115351153611537115381153911540115411154211543115441154511546115471154811549115501155111552115531155411555115561155711558115591156011561115621156311564115651156611567115681156911570115711157211573115741157511576115771157811579115801158111582115831158411585115861158711588115891159011591115921159311594115951159611597115981159911600116011160211603116041160511606116071160811609116101161111612116131161411615116161161711618116191162011621116221162311624116251162611627116281162911630116311163211633116341163511636116371163811639116401164111642116431164411645116461164711648116491165011651116521165311654116551165611657116581165911660116611166211663116641166511666116671166811669116701167111672116731167411675116761167711678116791168011681116821168311684116851168611687116881168911690116911169211693116941169511696116971169811699117001170111702117031170411705117061170711708117091171011711117121171311714117151171611717117181171911720117211172211723117241172511726117271172811729117301173111732117331173411735117361173711738117391174011741117421174311744117451174611747117481174911750117511175211753117541175511756117571175811759117601176111762117631176411765117661176711768117691177011771117721177311774117751177611777117781177911780117811178211783117841178511786117871178811789117901179111792117931179411795117961179711798117991180011801118021180311804118051180611807118081180911810118111181211813118141181511816118171181811819118201182111822118231182411825118261182711828118291183011831118321183311834118351183611837118381183911840118411184211843118441184511846118471184811849118501185111852118531185411855118561185711858118591186011861118621186311864118651186611867118681186911870118711187211873118741187511876118771187811879118801188111882118831188411885118861188711888118891189011891118921189311894118951189611897118981189911900119011190211903119041190511906119071190811909119101191111912119131191411915119161191711918119191192011921119221192311924119251192611927119281192911930119311193211933119341193511936119371193811939119401194111942119431194411945119461194711948119491195011951119521195311954119551195611957119581195911960119611196211963119641196511966119671196811969119701197111972119731197411975119761197711978119791198011981119821198311984119851198611987119881198911990119911199211993119941199511996119971199811999120001200112002120031200412005120061200712008120091201012011120121201312014120151201612017120181201912020120211202212023120241202512026120271202812029120301203112032120331203412035120361203712038120391204012041120421204312044120451204612047120481204912050120511205212053120541205512056120571205812059120601206112062120631206412065120661206712068120691207012071120721207312074120751207612077120781207912080120811208212083120841208512086120871208812089120901209112092120931209412095120961209712098120991210012101121021210312104121051210612107121081210912110121111211212113121141211512116121171211812119121201212112122121231212412125121261212712128121291213012131121321213312134121351213612137121381213912140121411214212143121441214512146121471214812149121501215112152121531215412155121561215712158121591216012161121621216312164121651216612167121681216912170121711217212173121741217512176121771217812179121801218112182121831218412185121861218712188121891219012191121921219312194121951219612197121981219912200122011220212203122041220512206122071220812209122101221112212122131221412215122161221712218122191222012221122221222312224122251222612227122281222912230122311223212233122341223512236122371223812239122401224112242122431224412245122461224712248122491225012251122521225312254122551225612257122581225912260122611226212263122641226512266122671226812269122701227112272122731227412275122761227712278122791228012281122821228312284122851228612287122881228912290122911229212293122941229512296122971229812299123001230112302123031230412305123061230712308123091231012311123121231312314123151231612317123181231912320123211232212323123241232512326123271232812329123301233112332123331233412335123361233712338123391234012341123421234312344123451234612347123481234912350123511235212353123541235512356123571235812359123601236112362123631236412365123661236712368123691237012371123721237312374123751237612377123781237912380123811238212383123841238512386123871238812389123901239112392123931239412395123961239712398123991240012401124021240312404124051240612407124081240912410124111241212413124141241512416124171241812419124201242112422124231242412425124261242712428124291243012431124321243312434124351243612437124381243912440124411244212443124441244512446124471244812449124501245112452124531245412455124561245712458124591246012461124621246312464124651246612467124681246912470124711247212473124741247512476124771247812479124801248112482124831248412485124861248712488124891249012491124921249312494124951249612497124981249912500125011250212503125041250512506125071250812509125101251112512125131251412515125161251712518125191252012521125221252312524125251252612527125281252912530125311253212533125341253512536125371253812539125401254112542125431254412545125461254712548125491255012551125521255312554125551255612557125581255912560125611256212563125641256512566125671256812569125701257112572125731257412575125761257712578125791258012581125821258312584125851258612587125881258912590125911259212593125941259512596125971259812599126001260112602126031260412605126061260712608126091261012611126121261312614126151261612617126181261912620126211262212623126241262512626126271262812629126301263112632126331263412635126361263712638126391264012641126421264312644126451264612647126481264912650126511265212653126541265512656126571265812659126601266112662126631266412665126661266712668126691267012671126721267312674126751267612677126781267912680126811268212683126841268512686126871268812689126901269112692126931269412695126961269712698126991270012701127021270312704127051270612707127081270912710127111271212713127141271512716127171271812719127201272112722127231272412725127261272712728127291273012731127321273312734127351273612737127381273912740127411274212743127441274512746127471274812749127501275112752127531275412755127561275712758127591276012761127621276312764127651276612767127681276912770127711277212773127741277512776127771277812779127801278112782127831278412785127861278712788127891279012791127921279312794127951279612797127981279912800128011280212803128041280512806128071280812809128101281112812128131281412815128161281712818128191282012821128221282312824128251282612827128281282912830128311283212833128341283512836128371283812839128401284112842128431284412845128461284712848128491285012851128521285312854128551285612857128581285912860128611286212863128641286512866128671286812869128701287112872128731287412875128761287712878128791288012881128821288312884128851288612887128881288912890128911289212893128941289512896128971289812899129001290112902129031290412905129061290712908129091291012911129121291312914129151291612917129181291912920129211292212923129241292512926129271292812929129301293112932129331293412935129361293712938129391294012941129421294312944129451294612947129481294912950129511295212953129541295512956129571295812959129601296112962129631296412965129661296712968129691297012971129721297312974129751297612977129781297912980129811298212983129841298512986129871298812989129901299112992129931299412995129961299712998129991300013001130021300313004130051300613007130081300913010130111301213013130141301513016130171301813019130201302113022130231302413025130261302713028130291303013031130321303313034130351303613037130381303913040130411304213043130441304513046130471304813049130501305113052130531305413055130561305713058130591306013061130621306313064130651306613067130681306913070130711307213073130741307513076130771307813079130801308113082130831308413085130861308713088130891309013091130921309313094130951309613097130981309913100131011310213103131041310513106131071310813109131101311113112131131311413115131161311713118131191312013121131221312313124131251312613127131281312913130131311313213133131341313513136131371313813139131401314113142131431314413145131461314713148131491315013151131521315313154131551315613157131581315913160131611316213163131641316513166131671316813169131701317113172131731317413175131761317713178131791318013181131821318313184131851318613187131881318913190131911319213193131941319513196131971319813199132001320113202132031320413205132061320713208132091321013211132121321313214132151321613217132181321913220132211322213223132241322513226132271322813229132301323113232132331323413235132361323713238132391324013241132421324313244132451324613247132481324913250132511325213253132541325513256132571325813259132601326113262132631326413265132661326713268132691327013271132721327313274132751327613277132781327913280132811328213283132841328513286132871328813289132901329113292132931329413295132961329713298132991330013301133021330313304133051330613307133081330913310133111331213313133141331513316133171331813319133201332113322133231332413325133261332713328133291333013331133321333313334133351333613337133381333913340133411334213343133441334513346133471334813349133501335113352133531335413355133561335713358133591336013361133621336313364133651336613367133681336913370133711337213373133741337513376133771337813379133801338113382133831338413385133861338713388133891339013391133921339313394133951339613397133981339913400134011340213403134041340513406134071340813409134101341113412134131341413415134161341713418134191342013421134221342313424134251342613427134281342913430134311343213433134341343513436134371343813439134401344113442134431344413445134461344713448134491345013451134521345313454134551345613457134581345913460134611346213463134641346513466134671346813469134701347113472134731347413475134761347713478134791348013481134821348313484134851348613487134881348913490134911349213493134941349513496134971349813499135001350113502135031350413505135061350713508135091351013511135121351313514135151351613517135181351913520135211352213523135241352513526135271352813529135301353113532135331353413535135361353713538135391354013541135421354313544135451354613547135481354913550135511355213553135541355513556135571355813559135601356113562135631356413565135661356713568135691357013571135721357313574135751357613577135781357913580135811358213583135841358513586135871358813589135901359113592135931359413595135961359713598135991360013601136021360313604136051360613607136081360913610136111361213613136141361513616136171361813619136201362113622136231362413625136261362713628136291363013631136321363313634136351363613637136381363913640136411364213643136441364513646136471364813649136501365113652136531365413655136561365713658136591366013661136621366313664136651366613667136681366913670136711367213673136741367513676136771367813679136801368113682136831368413685136861368713688136891369013691136921369313694136951369613697136981369913700137011370213703137041370513706137071370813709137101371113712137131371413715137161371713718137191372013721137221372313724137251372613727137281372913730137311373213733137341373513736137371373813739137401374113742137431374413745137461374713748137491375013751137521375313754137551375613757137581375913760137611376213763137641376513766137671376813769137701377113772137731377413775137761377713778137791378013781137821378313784137851378613787137881378913790137911379213793137941379513796137971379813799138001380113802138031380413805138061380713808138091381013811138121381313814138151381613817138181381913820138211382213823138241382513826138271382813829138301383113832138331383413835138361383713838138391384013841138421384313844138451384613847138481384913850138511385213853138541385513856138571385813859138601386113862138631386413865138661386713868138691387013871138721387313874138751387613877138781387913880138811388213883138841388513886138871388813889138901389113892138931389413895138961389713898138991390013901139021390313904139051390613907139081390913910139111391213913139141391513916139171391813919139201392113922139231392413925139261392713928139291393013931139321393313934139351393613937139381393913940139411394213943139441394513946139471394813949139501395113952139531395413955139561395713958139591396013961139621396313964139651396613967139681396913970139711397213973139741397513976139771397813979139801398113982139831398413985139861398713988139891399013991139921399313994139951399613997139981399914000140011400214003140041400514006140071400814009140101401114012
  1. /*!
  2. *
  3. * iclient-classic.(https://iclient.supermap.io)
  4. * Copyright© 2000 - 2020 SuperMap Software Co.Ltd
  5. * license: Apache-2.0
  6. * version: v10.1.0
  7. *
  8. */
  9. /******/ (function(modules) { // webpackBootstrap
  10. /******/ // The module cache
  11. /******/ var installedModules = {};
  12. /******/
  13. /******/ // The require function
  14. /******/ function __webpack_require__(moduleId) {
  15. /******/
  16. /******/ // Check if module is in cache
  17. /******/ if(installedModules[moduleId]) {
  18. /******/ return installedModules[moduleId].exports;
  19. /******/ }
  20. /******/ // Create a new module (and put it into the cache)
  21. /******/ var module = installedModules[moduleId] = {
  22. /******/ i: moduleId,
  23. /******/ l: false,
  24. /******/ exports: {}
  25. /******/ };
  26. /******/
  27. /******/ // Execute the module function
  28. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  29. /******/
  30. /******/ // Flag the module as loaded
  31. /******/ module.l = true;
  32. /******/
  33. /******/ // Return the exports of the module
  34. /******/ return module.exports;
  35. /******/ }
  36. /******/
  37. /******/
  38. /******/ // expose the modules object (__webpack_modules__)
  39. /******/ __webpack_require__.m = modules;
  40. /******/
  41. /******/ // expose the module cache
  42. /******/ __webpack_require__.c = installedModules;
  43. /******/
  44. /******/ // define getter function for harmony exports
  45. /******/ __webpack_require__.d = function(exports, name, getter) {
  46. /******/ if(!__webpack_require__.o(exports, name)) {
  47. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  48. /******/ }
  49. /******/ };
  50. /******/
  51. /******/ // define __esModule on exports
  52. /******/ __webpack_require__.r = function(exports) {
  53. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  54. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  55. /******/ }
  56. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  57. /******/ };
  58. /******/
  59. /******/ // create a fake namespace object
  60. /******/ // mode & 1: value is a module id, require it
  61. /******/ // mode & 2: merge all properties of value into the ns
  62. /******/ // mode & 4: return value when already ns object
  63. /******/ // mode & 8|1: behave like require
  64. /******/ __webpack_require__.t = function(value, mode) {
  65. /******/ if(mode & 1) value = __webpack_require__(value);
  66. /******/ if(mode & 8) return value;
  67. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  68. /******/ var ns = Object.create(null);
  69. /******/ __webpack_require__.r(ns);
  70. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  71. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  72. /******/ return ns;
  73. /******/ };
  74. /******/
  75. /******/ // getDefaultExport function for compatibility with non-harmony modules
  76. /******/ __webpack_require__.n = function(module) {
  77. /******/ var getter = module && module.__esModule ?
  78. /******/ function getDefault() { return module['default']; } :
  79. /******/ function getModuleExports() { return module; };
  80. /******/ __webpack_require__.d(getter, 'a', getter);
  81. /******/ return getter;
  82. /******/ };
  83. /******/
  84. /******/ // Object.prototype.hasOwnProperty.call
  85. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  86. /******/
  87. /******/ // __webpack_public_path__
  88. /******/ __webpack_require__.p = "";
  89. /******/
  90. /******/
  91. /******/ // Load entry module and return exports
  92. /******/ return __webpack_require__(__webpack_require__.s = 9);
  93. /******/ })
  94. /************************************************************************/
  95. /******/ ([
  96. /* 0 */
  97. /***/ (function(module, exports) {
  98. module.exports = function(){try{return mapv}catch(e){return {}}}();
  99. /***/ }),
  100. /* 1 */
  101. /***/ (function(module, exports) {
  102. function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  103. var g; // This works in non-strict mode
  104. g = function () {
  105. return this;
  106. }();
  107. try {
  108. // This works if eval is allowed (see CSP)
  109. g = g || new Function("return this")();
  110. } catch (e) {
  111. // This works if the window reference is available
  112. if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window;
  113. } // g can still be undefined, but nothing to do about it...
  114. // We return undefined, instead of nothing here, so it's
  115. // easier to handle this case. if(!global) { ...}
  116. module.exports = g;
  117. /***/ }),
  118. /* 2 */
  119. /***/ (function(module, exports, __webpack_require__) {
  120. var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;(function (global, factory) {
  121. if (true) {
  122. !(__WEBPACK_AMD_DEFINE_ARRAY__ = [exports, module], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  123. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  124. (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__),
  125. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
  126. } else { var mod; }
  127. })(this, function (exports, module) {
  128. 'use strict';
  129. var defaultOptions = {
  130. timeout: 5000,
  131. jsonpCallback: 'callback',
  132. jsonpCallbackFunction: null
  133. };
  134. function generateCallbackFunction() {
  135. return 'jsonp_' + Date.now() + '_' + Math.ceil(Math.random() * 100000);
  136. }
  137. function clearFunction(functionName) {
  138. // IE8 throws an exception when you try to delete a property on window
  139. // http://stackoverflow.com/a/1824228/751089
  140. try {
  141. delete window[functionName];
  142. } catch (e) {
  143. window[functionName] = undefined;
  144. }
  145. }
  146. function removeScript(scriptId) {
  147. var script = document.getElementById(scriptId);
  148. if (script) {
  149. document.getElementsByTagName('head')[0].removeChild(script);
  150. }
  151. }
  152. function fetchJsonp(_url) {
  153. var options = arguments.length <= 1 || arguments[1] === undefined ? {} : arguments[1]; // to avoid param reassign
  154. var url = _url;
  155. var timeout = options.timeout || defaultOptions.timeout;
  156. var jsonpCallback = options.jsonpCallback || defaultOptions.jsonpCallback;
  157. var timeoutId = undefined;
  158. return new Promise(function (resolve, reject) {
  159. var callbackFunction = options.jsonpCallbackFunction || generateCallbackFunction();
  160. var scriptId = jsonpCallback + '_' + callbackFunction;
  161. window[callbackFunction] = function (response) {
  162. resolve({
  163. ok: true,
  164. // keep consistent with fetch API
  165. json: function json() {
  166. return Promise.resolve(response);
  167. }
  168. });
  169. if (timeoutId) clearTimeout(timeoutId);
  170. removeScript(scriptId);
  171. clearFunction(callbackFunction);
  172. }; // Check if the user set their own params, and if not add a ? to start a list of params
  173. url += url.indexOf('?') === -1 ? '?' : '&';
  174. var jsonpScript = document.createElement('script');
  175. jsonpScript.setAttribute('src', '' + url + jsonpCallback + '=' + callbackFunction);
  176. if (options.charset) {
  177. jsonpScript.setAttribute('charset', options.charset);
  178. }
  179. jsonpScript.id = scriptId;
  180. document.getElementsByTagName('head')[0].appendChild(jsonpScript);
  181. timeoutId = setTimeout(function () {
  182. reject(new Error('JSONP request to ' + _url + ' timed out'));
  183. clearFunction(callbackFunction);
  184. removeScript(scriptId);
  185. window[callbackFunction] = function () {
  186. clearFunction(callbackFunction);
  187. };
  188. }, timeout); // Caught if got 404/500
  189. jsonpScript.onerror = function () {
  190. reject(new Error('JSONP request to ' + _url + ' failed'));
  191. clearFunction(callbackFunction);
  192. removeScript(scriptId);
  193. if (timeoutId) clearTimeout(timeoutId);
  194. };
  195. });
  196. } // export as global function
  197. /*
  198. let local;
  199. if (typeof global !== 'undefined') {
  200. local = global;
  201. } else if (typeof self !== 'undefined') {
  202. local = self;
  203. } else {
  204. try {
  205. local = Function('return this')();
  206. } catch (e) {
  207. throw new Error('polyfill failed because global object is unavailable in this environment');
  208. }
  209. }
  210. local.fetchJsonp = fetchJsonp;
  211. */
  212. module.exports = fetchJsonp;
  213. });
  214. /***/ }),
  215. /* 3 */
  216. /***/ (function(module, exports) {
  217. module.exports = function(){try{return elasticsearch}catch(e){return {}}}();
  218. /***/ }),
  219. /* 4 */
  220. /***/ (function(module, exports, __webpack_require__) {
  221. /* WEBPACK VAR INJECTION */(function(setImmediate, global) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  222. (function (global, factory) {
  223. ( false ? undefined : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? factory() : true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory),
  224. __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ?
  225. (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) :
  226. __WEBPACK_AMD_DEFINE_FACTORY__),
  227. __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : undefined;
  228. })(this, function () {
  229. 'use strict';
  230. /**
  231. * @this {Promise}
  232. */
  233. function finallyConstructor(callback) {
  234. var constructor = this.constructor;
  235. return this.then(function (value) {
  236. // @ts-ignore
  237. return constructor.resolve(callback()).then(function () {
  238. return value;
  239. });
  240. }, function (reason) {
  241. // @ts-ignore
  242. return constructor.resolve(callback()).then(function () {
  243. // @ts-ignore
  244. return constructor.reject(reason);
  245. });
  246. });
  247. } // Store setTimeout reference so promise-polyfill will be unaffected by
  248. // other code modifying setTimeout (like sinon.useFakeTimers())
  249. var setTimeoutFunc = setTimeout;
  250. function isArray(x) {
  251. return Boolean(x && typeof x.length !== 'undefined');
  252. }
  253. function noop() {} // Polyfill for Function.prototype.bind
  254. function bind(fn, thisArg) {
  255. return function () {
  256. fn.apply(thisArg, arguments);
  257. };
  258. }
  259. /**
  260. * @constructor
  261. * @param {Function} fn
  262. */
  263. function Promise(fn) {
  264. if (!(this instanceof Promise)) throw new TypeError('Promises must be constructed via new');
  265. if (typeof fn !== 'function') throw new TypeError('not a function');
  266. /** @type {!number} */
  267. this._state = 0;
  268. /** @type {!boolean} */
  269. this._handled = false;
  270. /** @type {Promise|undefined} */
  271. this._value = undefined;
  272. /** @type {!Array<!Function>} */
  273. this._deferreds = [];
  274. doResolve(fn, this);
  275. }
  276. function handle(self, deferred) {
  277. while (self._state === 3) {
  278. self = self._value;
  279. }
  280. if (self._state === 0) {
  281. self._deferreds.push(deferred);
  282. return;
  283. }
  284. self._handled = true;
  285. Promise._immediateFn(function () {
  286. var cb = self._state === 1 ? deferred.onFulfilled : deferred.onRejected;
  287. if (cb === null) {
  288. (self._state === 1 ? resolve : reject)(deferred.promise, self._value);
  289. return;
  290. }
  291. var ret;
  292. try {
  293. ret = cb(self._value);
  294. } catch (e) {
  295. reject(deferred.promise, e);
  296. return;
  297. }
  298. resolve(deferred.promise, ret);
  299. });
  300. }
  301. function resolve(self, newValue) {
  302. try {
  303. // Promise Resolution Procedure: https://github.com/promises-aplus/promises-spec#the-promise-resolution-procedure
  304. if (newValue === self) throw new TypeError('A promise cannot be resolved with itself.');
  305. if (newValue && (_typeof(newValue) === 'object' || typeof newValue === 'function')) {
  306. var then = newValue.then;
  307. if (newValue instanceof Promise) {
  308. self._state = 3;
  309. self._value = newValue;
  310. finale(self);
  311. return;
  312. } else if (typeof then === 'function') {
  313. doResolve(bind(then, newValue), self);
  314. return;
  315. }
  316. }
  317. self._state = 1;
  318. self._value = newValue;
  319. finale(self);
  320. } catch (e) {
  321. reject(self, e);
  322. }
  323. }
  324. function reject(self, newValue) {
  325. self._state = 2;
  326. self._value = newValue;
  327. finale(self);
  328. }
  329. function finale(self) {
  330. if (self._state === 2 && self._deferreds.length === 0) {
  331. Promise._immediateFn(function () {
  332. if (!self._handled) {
  333. Promise._unhandledRejectionFn(self._value);
  334. }
  335. });
  336. }
  337. for (var i = 0, len = self._deferreds.length; i < len; i++) {
  338. handle(self, self._deferreds[i]);
  339. }
  340. self._deferreds = null;
  341. }
  342. /**
  343. * @constructor
  344. */
  345. function Handler(onFulfilled, onRejected, promise) {
  346. this.onFulfilled = typeof onFulfilled === 'function' ? onFulfilled : null;
  347. this.onRejected = typeof onRejected === 'function' ? onRejected : null;
  348. this.promise = promise;
  349. }
  350. /**
  351. * Take a potentially misbehaving resolver function and make sure
  352. * onFulfilled and onRejected are only called once.
  353. *
  354. * Makes no guarantees about asynchrony.
  355. */
  356. function doResolve(fn, self) {
  357. var done = false;
  358. try {
  359. fn(function (value) {
  360. if (done) return;
  361. done = true;
  362. resolve(self, value);
  363. }, function (reason) {
  364. if (done) return;
  365. done = true;
  366. reject(self, reason);
  367. });
  368. } catch (ex) {
  369. if (done) return;
  370. done = true;
  371. reject(self, ex);
  372. }
  373. }
  374. Promise.prototype['catch'] = function (onRejected) {
  375. return this.then(null, onRejected);
  376. };
  377. Promise.prototype.then = function (onFulfilled, onRejected) {
  378. // @ts-ignore
  379. var prom = new this.constructor(noop);
  380. handle(this, new Handler(onFulfilled, onRejected, prom));
  381. return prom;
  382. };
  383. Promise.prototype['finally'] = finallyConstructor;
  384. Promise.all = function (arr) {
  385. return new Promise(function (resolve, reject) {
  386. if (!isArray(arr)) {
  387. return reject(new TypeError('Promise.all accepts an array'));
  388. }
  389. var args = Array.prototype.slice.call(arr);
  390. if (args.length === 0) return resolve([]);
  391. var remaining = args.length;
  392. function res(i, val) {
  393. try {
  394. if (val && (_typeof(val) === 'object' || typeof val === 'function')) {
  395. var then = val.then;
  396. if (typeof then === 'function') {
  397. then.call(val, function (val) {
  398. res(i, val);
  399. }, reject);
  400. return;
  401. }
  402. }
  403. args[i] = val;
  404. if (--remaining === 0) {
  405. resolve(args);
  406. }
  407. } catch (ex) {
  408. reject(ex);
  409. }
  410. }
  411. for (var i = 0; i < args.length; i++) {
  412. res(i, args[i]);
  413. }
  414. });
  415. };
  416. Promise.resolve = function (value) {
  417. if (value && _typeof(value) === 'object' && value.constructor === Promise) {
  418. return value;
  419. }
  420. return new Promise(function (resolve) {
  421. resolve(value);
  422. });
  423. };
  424. Promise.reject = function (value) {
  425. return new Promise(function (resolve, reject) {
  426. reject(value);
  427. });
  428. };
  429. Promise.race = function (arr) {
  430. return new Promise(function (resolve, reject) {
  431. if (!isArray(arr)) {
  432. return reject(new TypeError('Promise.race accepts an array'));
  433. }
  434. for (var i = 0, len = arr.length; i < len; i++) {
  435. Promise.resolve(arr[i]).then(resolve, reject);
  436. }
  437. });
  438. }; // Use polyfill for setImmediate for performance gains
  439. Promise._immediateFn = // @ts-ignore
  440. typeof setImmediate === 'function' && function (fn) {
  441. // @ts-ignore
  442. setImmediate(fn);
  443. } || function (fn) {
  444. setTimeoutFunc(fn, 0);
  445. };
  446. Promise._unhandledRejectionFn = function _unhandledRejectionFn(err) {
  447. if (typeof console !== 'undefined' && console) {
  448. console.warn('Possible Unhandled Promise Rejection:', err); // eslint-disable-line no-console
  449. }
  450. };
  451. /** @suppress {undefinedVars} */
  452. var globalNS = function () {
  453. // the only reliable means to get the global object is
  454. // `Function('return this')()`
  455. // However, this causes CSP violations in Chrome apps.
  456. if (typeof self !== 'undefined') {
  457. return self;
  458. }
  459. if (typeof window !== 'undefined') {
  460. return window;
  461. }
  462. if (typeof global !== 'undefined') {
  463. return global;
  464. }
  465. throw new Error('unable to locate global object');
  466. }();
  467. if (!('Promise' in globalNS)) {
  468. globalNS['Promise'] = Promise;
  469. } else if (!globalNS.Promise.prototype['finally']) {
  470. globalNS.Promise.prototype['finally'] = finallyConstructor;
  471. }
  472. });
  473. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(5).setImmediate, __webpack_require__(1)))
  474. /***/ }),
  475. /* 5 */
  476. /***/ (function(module, exports, __webpack_require__) {
  477. /* WEBPACK VAR INJECTION */(function(global) {var scope = typeof global !== "undefined" && global || typeof self !== "undefined" && self || window;
  478. var apply = Function.prototype.apply; // DOM APIs, for completeness
  479. exports.setTimeout = function () {
  480. return new Timeout(apply.call(setTimeout, scope, arguments), clearTimeout);
  481. };
  482. exports.setInterval = function () {
  483. return new Timeout(apply.call(setInterval, scope, arguments), clearInterval);
  484. };
  485. exports.clearTimeout = exports.clearInterval = function (timeout) {
  486. if (timeout) {
  487. timeout.close();
  488. }
  489. };
  490. function Timeout(id, clearFn) {
  491. this._id = id;
  492. this._clearFn = clearFn;
  493. }
  494. Timeout.prototype.unref = Timeout.prototype.ref = function () {};
  495. Timeout.prototype.close = function () {
  496. this._clearFn.call(scope, this._id);
  497. }; // Does not start the time, just sets up the members needed.
  498. exports.enroll = function (item, msecs) {
  499. clearTimeout(item._idleTimeoutId);
  500. item._idleTimeout = msecs;
  501. };
  502. exports.unenroll = function (item) {
  503. clearTimeout(item._idleTimeoutId);
  504. item._idleTimeout = -1;
  505. };
  506. exports._unrefActive = exports.active = function (item) {
  507. clearTimeout(item._idleTimeoutId);
  508. var msecs = item._idleTimeout;
  509. if (msecs >= 0) {
  510. item._idleTimeoutId = setTimeout(function onTimeout() {
  511. if (item._onTimeout) item._onTimeout();
  512. }, msecs);
  513. }
  514. }; // setimmediate attaches itself to the global object
  515. __webpack_require__(6); // On some exotic environments, it's not clear which object `setimmediate` was
  516. // able to install onto. Search each possibility in the same order as the
  517. // `setimmediate` library.
  518. exports.setImmediate = typeof self !== "undefined" && self.setImmediate || typeof global !== "undefined" && global.setImmediate || this && this.setImmediate;
  519. exports.clearImmediate = typeof self !== "undefined" && self.clearImmediate || typeof global !== "undefined" && global.clearImmediate || this && this.clearImmediate;
  520. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(1)))
  521. /***/ }),
  522. /* 6 */
  523. /***/ (function(module, exports, __webpack_require__) {
  524. /* WEBPACK VAR INJECTION */(function(global, process) {(function (global, undefined) {
  525. "use strict";
  526. if (global.setImmediate) {
  527. return;
  528. }
  529. var nextHandle = 1; // Spec says greater than zero
  530. var tasksByHandle = {};
  531. var currentlyRunningATask = false;
  532. var doc = global.document;
  533. var registerImmediate;
  534. function setImmediate(callback) {
  535. // Callback can either be a function or a string
  536. if (typeof callback !== "function") {
  537. callback = new Function("" + callback);
  538. } // Copy function arguments
  539. var args = new Array(arguments.length - 1);
  540. for (var i = 0; i < args.length; i++) {
  541. args[i] = arguments[i + 1];
  542. } // Store and register the task
  543. var task = {
  544. callback: callback,
  545. args: args
  546. };
  547. tasksByHandle[nextHandle] = task;
  548. registerImmediate(nextHandle);
  549. return nextHandle++;
  550. }
  551. function clearImmediate(handle) {
  552. delete tasksByHandle[handle];
  553. }
  554. function run(task) {
  555. var callback = task.callback;
  556. var args = task.args;
  557. switch (args.length) {
  558. case 0:
  559. callback();
  560. break;
  561. case 1:
  562. callback(args[0]);
  563. break;
  564. case 2:
  565. callback(args[0], args[1]);
  566. break;
  567. case 3:
  568. callback(args[0], args[1], args[2]);
  569. break;
  570. default:
  571. callback.apply(undefined, args);
  572. break;
  573. }
  574. }
  575. function runIfPresent(handle) {
  576. // From the spec: "Wait until any invocations of this algorithm started before this one have completed."
  577. // So if we're currently running a task, we'll need to delay this invocation.
  578. if (currentlyRunningATask) {
  579. // Delay by doing a setTimeout. setImmediate was tried instead, but in Firefox 7 it generated a
  580. // "too much recursion" error.
  581. setTimeout(runIfPresent, 0, handle);
  582. } else {
  583. var task = tasksByHandle[handle];
  584. if (task) {
  585. currentlyRunningATask = true;
  586. try {
  587. run(task);
  588. } finally {
  589. clearImmediate(handle);
  590. currentlyRunningATask = false;
  591. }
  592. }
  593. }
  594. }
  595. function installNextTickImplementation() {
  596. registerImmediate = function registerImmediate(handle) {
  597. process.nextTick(function () {
  598. runIfPresent(handle);
  599. });
  600. };
  601. }
  602. function canUsePostMessage() {
  603. // The test against `importScripts` prevents this implementation from being installed inside a web worker,
  604. // where `global.postMessage` means something completely different and can't be used for this purpose.
  605. if (global.postMessage && !global.importScripts) {
  606. var postMessageIsAsynchronous = true;
  607. var oldOnMessage = global.onmessage;
  608. global.onmessage = function () {
  609. postMessageIsAsynchronous = false;
  610. };
  611. global.postMessage("", "*");
  612. global.onmessage = oldOnMessage;
  613. return postMessageIsAsynchronous;
  614. }
  615. }
  616. function installPostMessageImplementation() {
  617. // Installs an event handler on `global` for the `message` event: see
  618. // * https://developer.mozilla.org/en/DOM/window.postMessage
  619. // * http://www.whatwg.org/specs/web-apps/current-work/multipage/comms.html#crossDocumentMessages
  620. var messagePrefix = "setImmediate$" + Math.random() + "$";
  621. var onGlobalMessage = function onGlobalMessage(event) {
  622. if (event.source === global && typeof event.data === "string" && event.data.indexOf(messagePrefix) === 0) {
  623. runIfPresent(+event.data.slice(messagePrefix.length));
  624. }
  625. };
  626. if (global.addEventListener) {
  627. global.addEventListener("message", onGlobalMessage, false);
  628. } else {
  629. global.attachEvent("onmessage", onGlobalMessage);
  630. }
  631. registerImmediate = function registerImmediate(handle) {
  632. global.postMessage(messagePrefix + handle, "*");
  633. };
  634. }
  635. function installMessageChannelImplementation() {
  636. var channel = new MessageChannel();
  637. channel.port1.onmessage = function (event) {
  638. var handle = event.data;
  639. runIfPresent(handle);
  640. };
  641. registerImmediate = function registerImmediate(handle) {
  642. channel.port2.postMessage(handle);
  643. };
  644. }
  645. function installReadyStateChangeImplementation() {
  646. var html = doc.documentElement;
  647. registerImmediate = function registerImmediate(handle) {
  648. // Create a <script> element; its readystatechange event will be fired asynchronously once it is inserted
  649. // into the document. Do so, thus queuing up the task. Remember to clean up once it's been called.
  650. var script = doc.createElement("script");
  651. script.onreadystatechange = function () {
  652. runIfPresent(handle);
  653. script.onreadystatechange = null;
  654. html.removeChild(script);
  655. script = null;
  656. };
  657. html.appendChild(script);
  658. };
  659. }
  660. function installSetTimeoutImplementation() {
  661. registerImmediate = function registerImmediate(handle) {
  662. setTimeout(runIfPresent, 0, handle);
  663. };
  664. } // If supported, we should attach to the prototype of global, since that is where setTimeout et al. live.
  665. var attachTo = Object.getPrototypeOf && Object.getPrototypeOf(global);
  666. attachTo = attachTo && attachTo.setTimeout ? attachTo : global; // Don't get fooled by e.g. browserify environments.
  667. if ({}.toString.call(global.process) === "[object process]") {
  668. // For Node.js before 0.9
  669. installNextTickImplementation();
  670. } else if (canUsePostMessage()) {
  671. // For non-IE10 modern browsers
  672. installPostMessageImplementation();
  673. } else if (global.MessageChannel) {
  674. // For web workers, where supported
  675. installMessageChannelImplementation();
  676. } else if (doc && "onreadystatechange" in doc.createElement("script")) {
  677. // For IE 6–8
  678. installReadyStateChangeImplementation();
  679. } else {
  680. // For older browsers
  681. installSetTimeoutImplementation();
  682. }
  683. attachTo.setImmediate = setImmediate;
  684. attachTo.clearImmediate = clearImmediate;
  685. })(typeof self === "undefined" ? typeof global === "undefined" ? this : global : self);
  686. /* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(1), __webpack_require__(7)))
  687. /***/ }),
  688. /* 7 */
  689. /***/ (function(module, exports) {
  690. // shim for using process in browser
  691. var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it
  692. // don't break things. But we need to wrap it in a try catch in case it is
  693. // wrapped in strict mode code which doesn't define any globals. It's inside a
  694. // function because try/catches deoptimize in certain engines.
  695. var cachedSetTimeout;
  696. var cachedClearTimeout;
  697. function defaultSetTimout() {
  698. throw new Error('setTimeout has not been defined');
  699. }
  700. function defaultClearTimeout() {
  701. throw new Error('clearTimeout has not been defined');
  702. }
  703. (function () {
  704. try {
  705. if (typeof setTimeout === 'function') {
  706. cachedSetTimeout = setTimeout;
  707. } else {
  708. cachedSetTimeout = defaultSetTimout;
  709. }
  710. } catch (e) {
  711. cachedSetTimeout = defaultSetTimout;
  712. }
  713. try {
  714. if (typeof clearTimeout === 'function') {
  715. cachedClearTimeout = clearTimeout;
  716. } else {
  717. cachedClearTimeout = defaultClearTimeout;
  718. }
  719. } catch (e) {
  720. cachedClearTimeout = defaultClearTimeout;
  721. }
  722. })();
  723. function runTimeout(fun) {
  724. if (cachedSetTimeout === setTimeout) {
  725. //normal enviroments in sane situations
  726. return setTimeout(fun, 0);
  727. } // if setTimeout wasn't available but was latter defined
  728. if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) {
  729. cachedSetTimeout = setTimeout;
  730. return setTimeout(fun, 0);
  731. }
  732. try {
  733. // when when somebody has screwed with setTimeout but no I.E. maddness
  734. return cachedSetTimeout(fun, 0);
  735. } catch (e) {
  736. try {
  737. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  738. return cachedSetTimeout.call(null, fun, 0);
  739. } catch (e) {
  740. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error
  741. return cachedSetTimeout.call(this, fun, 0);
  742. }
  743. }
  744. }
  745. function runClearTimeout(marker) {
  746. if (cachedClearTimeout === clearTimeout) {
  747. //normal enviroments in sane situations
  748. return clearTimeout(marker);
  749. } // if clearTimeout wasn't available but was latter defined
  750. if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) {
  751. cachedClearTimeout = clearTimeout;
  752. return clearTimeout(marker);
  753. }
  754. try {
  755. // when when somebody has screwed with setTimeout but no I.E. maddness
  756. return cachedClearTimeout(marker);
  757. } catch (e) {
  758. try {
  759. // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally
  760. return cachedClearTimeout.call(null, marker);
  761. } catch (e) {
  762. // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error.
  763. // Some versions of I.E. have different rules for clearTimeout vs setTimeout
  764. return cachedClearTimeout.call(this, marker);
  765. }
  766. }
  767. }
  768. var queue = [];
  769. var draining = false;
  770. var currentQueue;
  771. var queueIndex = -1;
  772. function cleanUpNextTick() {
  773. if (!draining || !currentQueue) {
  774. return;
  775. }
  776. draining = false;
  777. if (currentQueue.length) {
  778. queue = currentQueue.concat(queue);
  779. } else {
  780. queueIndex = -1;
  781. }
  782. if (queue.length) {
  783. drainQueue();
  784. }
  785. }
  786. function drainQueue() {
  787. if (draining) {
  788. return;
  789. }
  790. var timeout = runTimeout(cleanUpNextTick);
  791. draining = true;
  792. var len = queue.length;
  793. while (len) {
  794. currentQueue = queue;
  795. queue = [];
  796. while (++queueIndex < len) {
  797. if (currentQueue) {
  798. currentQueue[queueIndex].run();
  799. }
  800. }
  801. queueIndex = -1;
  802. len = queue.length;
  803. }
  804. currentQueue = null;
  805. draining = false;
  806. runClearTimeout(timeout);
  807. }
  808. process.nextTick = function (fun) {
  809. var args = new Array(arguments.length - 1);
  810. if (arguments.length > 1) {
  811. for (var i = 1; i < arguments.length; i++) {
  812. args[i - 1] = arguments[i];
  813. }
  814. }
  815. queue.push(new Item(fun, args));
  816. if (queue.length === 1 && !draining) {
  817. runTimeout(drainQueue);
  818. }
  819. }; // v8 likes predictible objects
  820. function Item(fun, array) {
  821. this.fun = fun;
  822. this.array = array;
  823. }
  824. Item.prototype.run = function () {
  825. this.fun.apply(null, this.array);
  826. };
  827. process.title = 'browser';
  828. process.browser = true;
  829. process.env = {};
  830. process.argv = [];
  831. process.version = ''; // empty string to avoid regexp issues
  832. process.versions = {};
  833. function noop() {}
  834. process.on = noop;
  835. process.addListener = noop;
  836. process.once = noop;
  837. process.off = noop;
  838. process.removeListener = noop;
  839. process.removeAllListeners = noop;
  840. process.emit = noop;
  841. process.prependListener = noop;
  842. process.prependOnceListener = noop;
  843. process.listeners = function (name) {
  844. return [];
  845. };
  846. process.binding = function (name) {
  847. throw new Error('process.binding is not supported');
  848. };
  849. process.cwd = function () {
  850. return '/';
  851. };
  852. process.chdir = function (dir) {
  853. throw new Error('process.chdir is not supported');
  854. };
  855. process.umask = function () {
  856. return 0;
  857. };
  858. /***/ }),
  859. /* 8 */
  860. /***/ (function(module, exports, __webpack_require__) {
  861. (function (self) {
  862. 'use strict'; // if __disableNativeFetch is set to true, the it will always polyfill fetch
  863. // with Ajax.
  864. if (!self.__disableNativeFetch && self.fetch) {
  865. return;
  866. }
  867. function normalizeName(name) {
  868. if (typeof name !== 'string') {
  869. name = String(name);
  870. }
  871. if (/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(name)) {
  872. throw new TypeError('Invalid character in header field name');
  873. }
  874. return name.toLowerCase();
  875. }
  876. function normalizeValue(value) {
  877. if (typeof value !== 'string') {
  878. value = String(value);
  879. }
  880. return value;
  881. }
  882. function Headers(headers) {
  883. this.map = {};
  884. if (headers instanceof Headers) {
  885. headers.forEach(function (value, name) {
  886. this.append(name, value);
  887. }, this);
  888. } else if (headers) {
  889. Object.getOwnPropertyNames(headers).forEach(function (name) {
  890. this.append(name, headers[name]);
  891. }, this);
  892. }
  893. }
  894. Headers.prototype.append = function (name, value) {
  895. name = normalizeName(name);
  896. value = normalizeValue(value);
  897. var list = this.map[name];
  898. if (!list) {
  899. list = [];
  900. this.map[name] = list;
  901. }
  902. list.push(value);
  903. };
  904. Headers.prototype['delete'] = function (name) {
  905. delete this.map[normalizeName(name)];
  906. };
  907. Headers.prototype.get = function (name) {
  908. var values = this.map[normalizeName(name)];
  909. return values ? values[0] : null;
  910. };
  911. Headers.prototype.getAll = function (name) {
  912. return this.map[normalizeName(name)] || [];
  913. };
  914. Headers.prototype.has = function (name) {
  915. return this.map.hasOwnProperty(normalizeName(name));
  916. };
  917. Headers.prototype.set = function (name, value) {
  918. this.map[normalizeName(name)] = [normalizeValue(value)];
  919. };
  920. Headers.prototype.forEach = function (callback, thisArg) {
  921. Object.getOwnPropertyNames(this.map).forEach(function (name) {
  922. this.map[name].forEach(function (value) {
  923. callback.call(thisArg, value, name, this);
  924. }, this);
  925. }, this);
  926. };
  927. function consumed(body) {
  928. if (body.bodyUsed) {
  929. return Promise.reject(new TypeError('Already read'));
  930. }
  931. body.bodyUsed = true;
  932. }
  933. function fileReaderReady(reader) {
  934. return new Promise(function (resolve, reject) {
  935. reader.onload = function () {
  936. resolve(reader.result);
  937. };
  938. reader.onerror = function () {
  939. reject(reader.error);
  940. };
  941. });
  942. }
  943. function readBlobAsArrayBuffer(blob) {
  944. var reader = new FileReader();
  945. reader.readAsArrayBuffer(blob);
  946. return fileReaderReady(reader);
  947. }
  948. function readBlobAsText(blob, options) {
  949. var reader = new FileReader();
  950. var contentType = options.headers.map['content-type'] ? options.headers.map['content-type'].toString() : '';
  951. var regex = /charset\=[0-9a-zA-Z\-\_]*;?/;
  952. var _charset = blob.type.match(regex) || contentType.match(regex);
  953. var args = [blob];
  954. if (_charset) {
  955. args.push(_charset[0].replace(/^charset\=/, '').replace(/;$/, ''));
  956. }
  957. reader.readAsText.apply(reader, args);
  958. return fileReaderReady(reader);
  959. }
  960. var support = {
  961. blob: 'FileReader' in self && 'Blob' in self && function () {
  962. try {
  963. new Blob();
  964. return true;
  965. } catch (e) {
  966. return false;
  967. }
  968. }(),
  969. formData: 'FormData' in self,
  970. arrayBuffer: 'ArrayBuffer' in self
  971. };
  972. function Body() {
  973. this.bodyUsed = false;
  974. this._initBody = function (body, options) {
  975. this._bodyInit = body;
  976. if (typeof body === 'string') {
  977. this._bodyText = body;
  978. } else if (support.blob && Blob.prototype.isPrototypeOf(body)) {
  979. this._bodyBlob = body;
  980. this._options = options;
  981. } else if (support.formData && FormData.prototype.isPrototypeOf(body)) {
  982. this._bodyFormData = body;
  983. } else if (!body) {
  984. this._bodyText = '';
  985. } else if (support.arrayBuffer && ArrayBuffer.prototype.isPrototypeOf(body)) {// Only support ArrayBuffers for POST method.
  986. // Receiving ArrayBuffers happens via Blobs, instead.
  987. } else {
  988. throw new Error('unsupported BodyInit type');
  989. }
  990. };
  991. if (support.blob) {
  992. this.blob = function () {
  993. var rejected = consumed(this);
  994. if (rejected) {
  995. return rejected;
  996. }
  997. if (this._bodyBlob) {
  998. return Promise.resolve(this._bodyBlob);
  999. } else if (this._bodyFormData) {
  1000. throw new Error('could not read FormData body as blob');
  1001. } else {
  1002. return Promise.resolve(new Blob([this._bodyText]));
  1003. }
  1004. };
  1005. this.arrayBuffer = function () {
  1006. return this.blob().then(readBlobAsArrayBuffer);
  1007. };
  1008. this.text = function () {
  1009. var rejected = consumed(this);
  1010. if (rejected) {
  1011. return rejected;
  1012. }
  1013. if (this._bodyBlob) {
  1014. return readBlobAsText(this._bodyBlob, this._options);
  1015. } else if (this._bodyFormData) {
  1016. throw new Error('could not read FormData body as text');
  1017. } else {
  1018. return Promise.resolve(this._bodyText);
  1019. }
  1020. };
  1021. } else {
  1022. this.text = function () {
  1023. var rejected = consumed(this);
  1024. return rejected ? rejected : Promise.resolve(this._bodyText);
  1025. };
  1026. }
  1027. if (support.formData) {
  1028. this.formData = function () {
  1029. return this.text().then(decode);
  1030. };
  1031. }
  1032. this.json = function () {
  1033. return this.text().then(JSON.parse);
  1034. };
  1035. return this;
  1036. } // HTTP methods whose capitalization should be normalized
  1037. var methods = ['DELETE', 'GET', 'HEAD', 'OPTIONS', 'POST', 'PUT'];
  1038. function normalizeMethod(method) {
  1039. var upcased = method.toUpperCase();
  1040. return methods.indexOf(upcased) > -1 ? upcased : method;
  1041. }
  1042. function Request(input, options) {
  1043. options = options || {};
  1044. var body = options.body;
  1045. if (Request.prototype.isPrototypeOf(input)) {
  1046. if (input.bodyUsed) {
  1047. throw new TypeError('Already read');
  1048. }
  1049. this.url = input.url;
  1050. this.credentials = input.credentials;
  1051. if (!options.headers) {
  1052. this.headers = new Headers(input.headers);
  1053. }
  1054. this.method = input.method;
  1055. this.mode = input.mode;
  1056. if (!body) {
  1057. body = input._bodyInit;
  1058. input.bodyUsed = true;
  1059. }
  1060. } else {
  1061. this.url = input;
  1062. }
  1063. this.credentials = options.credentials || this.credentials || 'omit';
  1064. if (options.headers || !this.headers) {
  1065. this.headers = new Headers(options.headers);
  1066. }
  1067. this.method = normalizeMethod(options.method || this.method || 'GET');
  1068. this.mode = options.mode || this.mode || null;
  1069. this.referrer = null;
  1070. if ((this.method === 'GET' || this.method === 'HEAD') && body) {
  1071. throw new TypeError('Body not allowed for GET or HEAD requests');
  1072. }
  1073. this._initBody(body, options);
  1074. }
  1075. Request.prototype.clone = function () {
  1076. return new Request(this);
  1077. };
  1078. function decode(body) {
  1079. var form = new FormData();
  1080. body.trim().split('&').forEach(function (bytes) {
  1081. if (bytes) {
  1082. var split = bytes.split('=');
  1083. var name = split.shift().replace(/\+/g, ' ');
  1084. var value = split.join('=').replace(/\+/g, ' ');
  1085. form.append(decodeURIComponent(name), decodeURIComponent(value));
  1086. }
  1087. });
  1088. return form;
  1089. }
  1090. function headers(xhr) {
  1091. var head = new Headers();
  1092. var pairs = xhr.getAllResponseHeaders().trim().split('\n');
  1093. pairs.forEach(function (header) {
  1094. var split = header.trim().split(':');
  1095. var key = split.shift().trim();
  1096. var value = split.join(':').trim();
  1097. head.append(key, value);
  1098. });
  1099. return head;
  1100. }
  1101. Body.call(Request.prototype);
  1102. function Response(bodyInit, options) {
  1103. if (!options) {
  1104. options = {};
  1105. }
  1106. this._initBody(bodyInit, options);
  1107. this.type = 'default';
  1108. this.status = options.status;
  1109. this.ok = this.status >= 200 && this.status < 300;
  1110. this.statusText = options.statusText;
  1111. this.headers = options.headers instanceof Headers ? options.headers : new Headers(options.headers);
  1112. this.url = options.url || '';
  1113. }
  1114. Body.call(Response.prototype);
  1115. Response.prototype.clone = function () {
  1116. return new Response(this._bodyInit, {
  1117. status: this.status,
  1118. statusText: this.statusText,
  1119. headers: new Headers(this.headers),
  1120. url: this.url
  1121. });
  1122. };
  1123. Response.error = function () {
  1124. var response = new Response(null, {
  1125. status: 0,
  1126. statusText: ''
  1127. });
  1128. response.type = 'error';
  1129. return response;
  1130. };
  1131. var redirectStatuses = [301, 302, 303, 307, 308];
  1132. Response.redirect = function (url, status) {
  1133. if (redirectStatuses.indexOf(status) === -1) {
  1134. throw new RangeError('Invalid status code');
  1135. }
  1136. return new Response(null, {
  1137. status: status,
  1138. headers: {
  1139. location: url
  1140. }
  1141. });
  1142. };
  1143. self.Headers = Headers;
  1144. self.Request = Request;
  1145. self.Response = Response;
  1146. self.fetch = function (input, init) {
  1147. return new Promise(function (resolve, reject) {
  1148. var request;
  1149. if (Request.prototype.isPrototypeOf(input) && !init) {
  1150. request = input;
  1151. } else {
  1152. request = new Request(input, init);
  1153. }
  1154. var xhr = new XMLHttpRequest();
  1155. function responseURL() {
  1156. if ('responseURL' in xhr) {
  1157. return xhr.responseURL;
  1158. } // Avoid security warnings on getResponseHeader when not allowed by CORS
  1159. if (/^X-Request-URL:/m.test(xhr.getAllResponseHeaders())) {
  1160. return xhr.getResponseHeader('X-Request-URL');
  1161. }
  1162. return;
  1163. }
  1164. var __onLoadHandled = false;
  1165. function onload() {
  1166. if (xhr.readyState !== 4) {
  1167. return;
  1168. }
  1169. var status = xhr.status === 1223 ? 204 : xhr.status;
  1170. if (status < 100 || status > 599) {
  1171. if (__onLoadHandled) {
  1172. return;
  1173. } else {
  1174. __onLoadHandled = true;
  1175. }
  1176. reject(new TypeError('Network request failed'));
  1177. return;
  1178. }
  1179. var options = {
  1180. status: status,
  1181. statusText: xhr.statusText,
  1182. headers: headers(xhr),
  1183. url: responseURL()
  1184. };
  1185. var body = 'response' in xhr ? xhr.response : xhr.responseText;
  1186. if (__onLoadHandled) {
  1187. return;
  1188. } else {
  1189. __onLoadHandled = true;
  1190. }
  1191. resolve(new Response(body, options));
  1192. }
  1193. xhr.onreadystatechange = onload;
  1194. xhr.onload = onload;
  1195. xhr.onerror = function () {
  1196. if (__onLoadHandled) {
  1197. return;
  1198. } else {
  1199. __onLoadHandled = true;
  1200. }
  1201. reject(new TypeError('Network request failed'));
  1202. };
  1203. xhr.open(request.method, request.url, true); // `withCredentials` should be setted after calling `.open` in IE10
  1204. // http://stackoverflow.com/a/19667959/1219343
  1205. try {
  1206. if (request.credentials === 'include') {
  1207. if ('withCredentials' in xhr) {
  1208. xhr.withCredentials = true;
  1209. } else {
  1210. console && console.warn && console.warn('withCredentials is not supported, you can ignore this warning');
  1211. }
  1212. }
  1213. } catch (e) {
  1214. console && console.warn && console.warn('set withCredentials error:' + e);
  1215. }
  1216. if ('responseType' in xhr && support.blob) {
  1217. xhr.responseType = 'blob';
  1218. }
  1219. request.headers.forEach(function (value, name) {
  1220. xhr.setRequestHeader(name, value);
  1221. });
  1222. xhr.send(typeof request._bodyInit === 'undefined' ? null : request._bodyInit);
  1223. });
  1224. };
  1225. self.fetch.polyfill = true; // Support CommonJS
  1226. if ( true && module.exports) {
  1227. module.exports = self.fetch;
  1228. }
  1229. })(typeof self !== 'undefined' ? self : this);
  1230. /***/ }),
  1231. /* 9 */
  1232. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  1233. "use strict";
  1234. // ESM COMPAT FLAG
  1235. __webpack_require__.r(__webpack_exports__);
  1236. // EXPORTS
  1237. __webpack_require__.d(__webpack_exports__, "ElasticSearch", function() { return /* reexport */ ElasticSearch_ElasticSearch; });
  1238. __webpack_require__.d(__webpack_exports__, "SecurityManager", function() { return /* reexport */ SecurityManager_SecurityManager; });
  1239. __webpack_require__.d(__webpack_exports__, "KernelDensityJobParameter", function() { return /* reexport */ KernelDensityJobParameter_KernelDensityJobParameter; });
  1240. __webpack_require__.d(__webpack_exports__, "SingleObjectQueryJobsParameter", function() { return /* reexport */ SingleObjectQueryJobsParameter_SingleObjectQueryJobsParameter; });
  1241. __webpack_require__.d(__webpack_exports__, "SummaryAttributesJobsParameter", function() { return /* reexport */ SummaryAttributesJobsParameter_SummaryAttributesJobsParameter; });
  1242. __webpack_require__.d(__webpack_exports__, "SummaryMeshJobParameter", function() { return /* reexport */ SummaryMeshJobParameter_SummaryMeshJobParameter; });
  1243. __webpack_require__.d(__webpack_exports__, "SummaryRegionJobParameter", function() { return /* reexport */ SummaryRegionJobParameter_SummaryRegionJobParameter; });
  1244. __webpack_require__.d(__webpack_exports__, "OverlayGeoJobParameter", function() { return /* reexport */ OverlayGeoJobParameter_OverlayGeoJobParameter; });
  1245. __webpack_require__.d(__webpack_exports__, "BuffersAnalystJobsParameter", function() { return /* reexport */ BuffersAnalystJobsParameter_BuffersAnalystJobsParameter; });
  1246. __webpack_require__.d(__webpack_exports__, "TopologyValidatorJobsParameter", function() { return /* reexport */ TopologyValidatorJobsParameter_TopologyValidatorJobsParameter; });
  1247. __webpack_require__.d(__webpack_exports__, "OutputSetting", function() { return /* reexport */ OutputSetting_OutputSetting; });
  1248. __webpack_require__.d(__webpack_exports__, "MappingParameters", function() { return /* reexport */ MappingParameters_MappingParameters; });
  1249. __webpack_require__.d(__webpack_exports__, "GeoCodingParameter", function() { return /* reexport */ GeoCodingParameter_GeoCodingParameter; });
  1250. __webpack_require__.d(__webpack_exports__, "GeoDecodingParameter", function() { return /* reexport */ GeoDecodingParameter_GeoDecodingParameter; });
  1251. __webpack_require__.d(__webpack_exports__, "MapVLayer", function() { return /* reexport */ MapVLayer_MapVLayer; });
  1252. __webpack_require__.d(__webpack_exports__, "MapVRenderer", function() { return /* reexport */ MapVRenderer_MapVRenderer; });
  1253. __webpack_require__.d(__webpack_exports__, "AddressMatchService", function() { return /* reexport */ services_AddressMatchService_AddressMatchService; });
  1254. __webpack_require__.d(__webpack_exports__, "ProcessingService", function() { return /* reexport */ ProcessingService_ProcessingService; });
  1255. __webpack_require__.d(__webpack_exports__, "SuperMap", function() { return /* reexport */ SuperMap_SuperMap; });
  1256. // CONCATENATED MODULE: ./src/common/SuperMap.js
  1257. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1258. * This program are made available under the terms of the Apache License, Version 2.0
  1259. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1260. var SuperMap = window.SuperMap = window.SuperMap || {};
  1261. SuperMap.Components = window.SuperMap.Components || {};
  1262. // CONCATENATED MODULE: ./src/common/commontypes/Pixel.js
  1263. function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1264. function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  1265. function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
  1266. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1267. * This program are made available under the terms of the Apache License, Version 2.0
  1268. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1269. /**
  1270. * @class SuperMap.Pixel
  1271. * @category BaseTypes Geometry
  1272. * @classdesc 此类用 x,y 坐标描绘屏幕坐标(像素点)。
  1273. * @param {number} [x=0.0] - x 坐标。
  1274. * @param {number} [y=0.0] - y 坐标。
  1275. * @param {SuperMap.Pixel.Mode} [mode=SuperMap.Pixel.Mode.LeftTop] - 坐标模式。
  1276. *
  1277. * @example
  1278. * //单独创建一个对象
  1279. * var pixcel = new SuperMap.Pixel(100,50);
  1280. *
  1281. * //依据 size 创建
  1282. * var size = new SuperMap.Size(21,25);
  1283. * var offset = new SuperMap.Pixel(-(size.w/2), -size.h);
  1284. */
  1285. var Pixel_Pixel = /*#__PURE__*/function () {
  1286. function Pixel(x, y, mode) {
  1287. _classCallCheck(this, Pixel);
  1288. /**
  1289. * @member {number} [SuperMap.Pixel.prototype.x=0.0]
  1290. * @description x 坐标。
  1291. */
  1292. this.x = x ? parseFloat(x) : 0.0;
  1293. /**
  1294. * @member {number} [SuperMap.Pixel.prototype.y=0.0]
  1295. * @description y 坐标。
  1296. */
  1297. this.y = y ? parseFloat(y) : 0.0;
  1298. /**
  1299. * @member {SuperMap.Pixel.Mode} [SuperMap.Pixel.prototype.mode=SuperMap.Pixel.Mode.LeftTop]
  1300. * @description 坐标模式,有左上、右上、右下、左下这几种模式,分别表示相对于左上角、右上角、右下角、左下角的坐标。
  1301. */
  1302. this.mode = mode;
  1303. this.CLASS_NAME = "SuperMap.Pixel";
  1304. /**
  1305. * @enum SuperMap.Pixel.Mode
  1306. * @readonly
  1307. * @description 模式。
  1308. * @type {string}
  1309. */
  1310. SuperMap.Pixel.Mode = {
  1311. /** 左上模式。*/
  1312. LeftTop: "lefttop",
  1313. /** 右上模式。 */
  1314. RightTop: "righttop",
  1315. /** 右下模式。 */
  1316. RightBottom: "rightbottom",
  1317. /** 左下模式。 */
  1318. LeftBottom: "leftbottom"
  1319. };
  1320. }
  1321. /**
  1322. * @function SuperMap.Pixel.prototype.toString
  1323. * @description 返回此对象的字符串形式。
  1324. * @example
  1325. *
  1326. * var pixcel = new SuperMap.Pixel(100,50);
  1327. * var str = pixcel.toString();
  1328. *
  1329. * @returns {string} 例如: "x=200.4,y=242.2"
  1330. */
  1331. _createClass(Pixel, [{
  1332. key: "toString",
  1333. value: function toString() {
  1334. return "x=" + this.x + ",y=" + this.y;
  1335. }
  1336. /**
  1337. * @function SuperMap.Pixel.prototype.clone
  1338. * @description 克隆当前的 pixel 对象。
  1339. * @example
  1340. * var pixcel = new SuperMap.Pixel(100,50);
  1341. * var pixcel2 = pixcel.clone();
  1342. * @returns {SuperMap.Pixel} 返回一个新的与当前 pixel 对象有相同 x、y 坐标的 pixel 对象。
  1343. */
  1344. }, {
  1345. key: "clone",
  1346. value: function clone() {
  1347. return new Pixel(this.x, this.y, this.mode);
  1348. }
  1349. /**
  1350. * @function SuperMap.Pixel.prototype.equals
  1351. * @description 比较两 pixel 是否相等。
  1352. * @example
  1353. * var pixcel = new SuperMap.Pixel(100,50);
  1354. * var pixcel2 = new SuperMap.Pixel(100,50);
  1355. * var isEquals = pixcel.equals(pixcel2);
  1356. *
  1357. * @param {SuperMap.Pixel} px - 用于比较相等的 pixel 对象。
  1358. * @returns {boolean} 如果传入的像素点和当前像素点相同返回 true,如果不同或传入参数为 NULL 则返回 false。
  1359. */
  1360. }, {
  1361. key: "equals",
  1362. value: function equals(px) {
  1363. var equals = false;
  1364. if (px != null) {
  1365. equals = this.x == px.x && this.y == px.y || isNaN(this.x) && isNaN(this.y) && isNaN(px.x) && isNaN(px.y);
  1366. }
  1367. return equals;
  1368. }
  1369. /**
  1370. * @function SuperMap.Pixel.prototype.distanceTo
  1371. * @description 返回两个 pixel 的距离。
  1372. * @example
  1373. * var pixcel = new SuperMap.Pixel(100,50);
  1374. * var pixcel2 = new SuperMap.Pixel(110,30);
  1375. * var distance = pixcel.distanceTo(pixcel2);
  1376. *
  1377. * @param {SuperMap.Pixel} px - 用于计算的一个 pixel。
  1378. * @returns {float} 作为参数传入的像素与当前像素点的距离。
  1379. */
  1380. }, {
  1381. key: "distanceTo",
  1382. value: function distanceTo(px) {
  1383. return Math.sqrt(Math.pow(this.x - px.x, 2) + Math.pow(this.y - px.y, 2));
  1384. }
  1385. /**
  1386. * @function SuperMap.Pixel.prototype.add
  1387. * @description 在原来像素坐标基础上,x 值加上传入的 x 参数,y 值加上传入的 y 参数。
  1388. * @example
  1389. * var pixcel = new SuperMap.Pixel(100,50);
  1390. * //pixcel2是新的对象
  1391. * var pixcel2 = pixcel.add(20,30);
  1392. *
  1393. * @param {number} x - 传入的 x 值。
  1394. * @param {number} y - 传入的 y 值。
  1395. * @returns {SuperMap.Pixel} 返回一个新的 pixel 对象,该 pixel 是由当前的 pixel 与传入的 x,y 相加得到。
  1396. */
  1397. }, {
  1398. key: "add",
  1399. value: function add(x, y) {
  1400. if (x == null || y == null) {
  1401. throw new TypeError('Pixel.add cannot receive null values');
  1402. }
  1403. return new Pixel(this.x + x, this.y + y);
  1404. }
  1405. /**
  1406. * @function SuperMap.Pixel.prototype.offset
  1407. * @description 通过传入的 {@link SuperMap.Pixel} 参数对原屏幕坐标进行偏移。
  1408. * @example
  1409. * var pixcel = new SuperMap.Pixel(100,50);
  1410. * var pixcel2 = new SuperMap.Pixel(130,20);
  1411. * //pixcel3 是新的对象
  1412. * var pixcel3 = pixcel.offset(pixcel2);
  1413. *
  1414. * @param {SuperMap.Pixel} px - 传入的 <SuperMap.Pixel> 对象。
  1415. * @returns {SuperMap.Pixel} 返回一个新的 pixel,该 pixel 是由当前的 pixel 对象的 x,y 值与传入的 Pixel 对象的 x,y 值相加得到。
  1416. */
  1417. }, {
  1418. key: "offset",
  1419. value: function offset(px) {
  1420. var newPx = this.clone();
  1421. if (px) {
  1422. newPx = this.add(px.x, px.y);
  1423. }
  1424. return newPx;
  1425. }
  1426. /**
  1427. *
  1428. * @function SuperMap.Pixel.prototype.destroy
  1429. * @description 销毁此对象。销毁后此对象的所有属性为 null,而不是初始值。
  1430. * @example
  1431. * var pixcel = new SuperMap.Pixel(100,50);
  1432. * pixcel.destroy();
  1433. */
  1434. }, {
  1435. key: "destroy",
  1436. value: function destroy() {
  1437. this.x = null;
  1438. this.y = null;
  1439. this.mode = null;
  1440. }
  1441. }]);
  1442. return Pixel;
  1443. }();
  1444. SuperMap.Pixel = Pixel_Pixel;
  1445. // CONCATENATED MODULE: ./src/common/commontypes/BaseTypes.js
  1446. function BaseTypes_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  1447. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1448. * This program are made available under the terms of the Apache License, Version 2.0
  1449. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1450. /**
  1451. *@namespace SuperMap
  1452. *@category BaseTypes Namespace
  1453. */
  1454. /**
  1455. * @function SuperMap.inherit
  1456. * @description 除了 C 和 P 两个必要参数外,可以传递任意数量的对象,这些对象都将继承C。
  1457. * @memberOf SuperMap
  1458. * @param {Object} C - 继承的类。
  1459. * @param {Object} P - 被继承的父类。
  1460. */
  1461. SuperMap.inherit = function (C, P) {
  1462. var F = function F() {};
  1463. F.prototype = P.prototype;
  1464. C.prototype = new F();
  1465. var i, l, o;
  1466. for (i = 2, l = arguments.length; i < l; i++) {
  1467. o = arguments[i];
  1468. if (typeof o === "function") {
  1469. o = o.prototype;
  1470. }
  1471. SuperMap.Util.extend(C.prototype, o);
  1472. }
  1473. };
  1474. /**
  1475. * @function SuperMap.mixin
  1476. * @description 实现多重继承。
  1477. * @memberOf SuperMap
  1478. * @param {Class|Object} ...mixins - 继承的类。
  1479. */
  1480. SuperMap.mixin = function () {
  1481. for (var _len = arguments.length, mixins = new Array(_len), _key = 0; _key < _len; _key++) {
  1482. mixins[_key] = arguments[_key];
  1483. }
  1484. var Mix = function Mix(options) {
  1485. BaseTypes_classCallCheck(this, Mix);
  1486. for (var index = 0; index < mixins.length; index++) {
  1487. copyProperties(this, new mixins[index](options));
  1488. }
  1489. };
  1490. for (var index = 0; index < mixins.length; index++) {
  1491. var mixin = mixins[index];
  1492. copyProperties(Mix, mixin);
  1493. copyProperties(Mix.prototype, mixin.prototype);
  1494. copyProperties(Mix.prototype, new mixin());
  1495. }
  1496. return Mix;
  1497. function copyProperties(target, source) {
  1498. var ownKeys = Object.getOwnPropertyNames(source);
  1499. if (Object.getOwnPropertySymbols) {
  1500. ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source));
  1501. }
  1502. for (var index = 0; index < ownKeys.length; index++) {
  1503. var key = ownKeys[index];
  1504. if (key !== "constructor" && key !== "prototype" && key !== "name" && key !== "length") {
  1505. var desc = Object.getOwnPropertyDescriptor(source, key);
  1506. if (window["ActiveXObject"]) {
  1507. Object.defineProperty(target, key, desc || {});
  1508. } else {
  1509. Object.defineProperty(target, key, desc);
  1510. }
  1511. }
  1512. }
  1513. }
  1514. };
  1515. /**
  1516. * @name String
  1517. * @namespace
  1518. * @memberOf SuperMap
  1519. * @category BaseTypes Util
  1520. * @description 字符串操作的一系列常用扩展函数。
  1521. */
  1522. var StringExt = SuperMap.String = {
  1523. /**
  1524. * @function SuperMap.String.startsWith
  1525. * @description 判断目标字符串是否以指定的子字符串开头。
  1526. * @param {string} str - 目标字符串。
  1527. * @param {string} sub - 查找的子字符串。
  1528. * @returns {boolean} 目标字符串以指定的子字符串开头,则返回 true;否则返回 false。
  1529. */
  1530. startsWith: function startsWith(str, sub) {
  1531. return str.indexOf(sub) == 0;
  1532. },
  1533. /**
  1534. * @function SuperMap.String.contains
  1535. * @description 判断目标字符串是否包含指定的子字符串。
  1536. * @param {string} str - 目标字符串。
  1537. * @param {string} sub - 查找的子字符串。
  1538. * @returns {boolean} 目标字符串中包含指定的子字符串,则返回 true;否则返回 false。
  1539. */
  1540. contains: function contains(str, sub) {
  1541. return str.indexOf(sub) != -1;
  1542. },
  1543. /**
  1544. * @function SuperMap.String.trim
  1545. * @description 删除一个字符串的开头和结尾处的所有空白字符。
  1546. * @param {string} str - (可能)存在空白字符填塞的字符串。
  1547. * @returns {string} 删除开头和结尾处空白字符后的字符串。
  1548. */
  1549. trim: function trim(str) {
  1550. return str.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
  1551. },
  1552. /**
  1553. * @function SuperMap.String.camelize
  1554. * @description 骆驼式("-")连字符的字符串处理。
  1555. * 例如:"chicken-head" becomes "chickenHead",
  1556. * "-chicken-head" becomes "ChickenHead"。
  1557. * @param {string} str - 要处理的字符串,原始内容不应被修改。
  1558. * @returns {string}
  1559. */
  1560. camelize: function camelize(str) {
  1561. var oStringList = str.split('-');
  1562. var camelizedString = oStringList[0];
  1563. for (var i = 1, len = oStringList.length; i < len; i++) {
  1564. var s = oStringList[i];
  1565. camelizedString += s.charAt(0).toUpperCase() + s.substring(1);
  1566. }
  1567. return camelizedString;
  1568. },
  1569. /**
  1570. * @function SuperMap.String.format
  1571. * @description 提供带 ${token} 标记的字符串, 返回 context 对象属性中指定标记的属性值。
  1572. * @example
  1573. * 示例:
  1574. * (code)
  1575. * 1、template = "${value,getValue}";
  1576. * context = {value: {getValue:function(){return Math.max.apply(null,argument);}}};
  1577. * args = [2,23,12,36,21];
  1578. * 返回值:36
  1579. * (end)
  1580. * 示例:
  1581. * (code)
  1582. * 2、template = "$${{value,getValue}}";
  1583. * context = {value: {getValue:function(){return Math.max.apply(null,argument);}}};
  1584. * args = [2,23,12,36,21];
  1585. * 返回值:"${36}"
  1586. * (end)
  1587. * 示例:
  1588. * (code)
  1589. * 3、template = "${a,b}";
  1590. * context = {a: {b:"format"}};
  1591. * args = null;
  1592. * 返回值:"format"
  1593. * (end)
  1594. * 示例:
  1595. * (code)
  1596. * 3、template = "${a,b}";
  1597. * context = null;
  1598. * args = null;
  1599. * 返回值:"${a.b}"
  1600. * (end)
  1601. * @param {string} template - 带标记的字符串将要被替换。参数 template 格式为"${token}",此处的 token 标记会替换为 context["token"] 属性的值。
  1602. * @param {Object} [context=window] - 带有属性的可选对象的属性用于匹配格式化字符串中的标记。如果该参数为空,将使用 window 对象。
  1603. * @param {Array} [args] - 可选参数传递给在 context 对象上找到的函数。
  1604. * @returns {string} 从 context 对象属性中替换字符串标记位的字符串。
  1605. */
  1606. format: function format(template, context, args) {
  1607. if (!context) {
  1608. context = window;
  1609. } // Example matching:
  1610. // str = ${foo.bar}
  1611. // match = foo.bar
  1612. var replacer = function replacer(str, match) {
  1613. var replacement; // Loop through all subs. Example: ${a.b.c}
  1614. // 0 -> replacement = context[a];
  1615. // 1 -> replacement = context[a][b];
  1616. // 2 -> replacement = context[a][b][c];
  1617. var subs = match.split(/\.+/);
  1618. for (var i = 0; i < subs.length; i++) {
  1619. if (i == 0) {
  1620. replacement = context;
  1621. }
  1622. replacement = replacement[subs[i]];
  1623. }
  1624. if (typeof replacement === "function") {
  1625. replacement = args ? replacement.apply(null, args) : replacement();
  1626. } // If replacement is undefined, return the string 'undefined'.
  1627. // This is a workaround for a bugs in browsers not properly
  1628. // dealing with non-participating groups in regular expressions:
  1629. // http://blog.stevenlevithan.com/archives/npcg-javascript
  1630. if (typeof replacement == 'undefined') {
  1631. return 'undefined';
  1632. } else {
  1633. return replacement;
  1634. }
  1635. };
  1636. return template.replace(SuperMap.String.tokenRegEx, replacer);
  1637. },
  1638. /**
  1639. * @member {RegExp} [SuperMap.String.tokenRegEx]
  1640. * @description 寻找带 token 的字符串,默认为 tokenRegEx=/\$\{([\w.]+?)\}/g。
  1641. * @example
  1642. * Examples: ${a}, ${a.b.c}, ${a-b}, ${5}
  1643. */
  1644. tokenRegEx: /\$\{([\w.]+?)\}/g,
  1645. /**
  1646. * @member {RegExp} [SuperMap.String.numberRegEx]
  1647. * @description 判断一个字符串是否只包含一个数值,默认为 numberRegEx=/^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/。
  1648. */
  1649. numberRegEx: /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/,
  1650. /**
  1651. * @function SuperMap.String.isNumeric
  1652. * @description 判断一个字符串是否只包含一个数值。
  1653. * @example
  1654. * (code)
  1655. * SuperMap.String.isNumeric("6.02e23") // true
  1656. * SuperMap.String.isNumeric("12 dozen") // false
  1657. * SuperMap.String.isNumeric("4") // true
  1658. * SuperMap.String.isNumeric(" 4 ") // false
  1659. * (end)
  1660. * @returns {boolean} 字符串包含唯一的数值,返回 true;否则返回 false。
  1661. */
  1662. isNumeric: function isNumeric(value) {
  1663. return SuperMap.String.numberRegEx.test(value);
  1664. },
  1665. /**
  1666. * @function SuperMap.String.numericIf
  1667. * @description 把一个看似数值型的字符串转化为一个数值。
  1668. * @returns {(number|string)} 如果能转换为数值则返回数值,否则返回字符串本身。
  1669. */
  1670. numericIf: function numericIf(value) {
  1671. return SuperMap.String.isNumeric(value) ? parseFloat(value) : value;
  1672. }
  1673. };
  1674. /**
  1675. * @name Number
  1676. * @memberOf SuperMap
  1677. * @namespace
  1678. * @category BaseTypes Util
  1679. * @description 数值操作的一系列常用扩展函数。
  1680. */
  1681. var NumberExt = SuperMap.Number = {
  1682. /**
  1683. * @member {string} [SuperMap.Number.decimalSeparator='.']
  1684. * @description 格式化数字时默认的小数点分隔符。
  1685. * @constant
  1686. */
  1687. decimalSeparator: ".",
  1688. /**
  1689. * @member {string} [SuperMap.Number.thousandsSeparator=',']
  1690. * @description 格式化数字时默认的千位分隔符。
  1691. * @constant
  1692. */
  1693. thousandsSeparator: ",",
  1694. /**
  1695. * @function SuperMap.Number.limitSigDigs
  1696. * @description 限制浮点数的有效数字位数。
  1697. * @param {number} num - 浮点数。
  1698. * @param {integer} sig - 有效位数。
  1699. * @returns {number} 将数字四舍五入到指定数量的有效位数。
  1700. */
  1701. limitSigDigs: function limitSigDigs(num, sig) {
  1702. var fig = 0;
  1703. if (sig > 0) {
  1704. fig = parseFloat(num.toPrecision(sig));
  1705. }
  1706. return fig;
  1707. },
  1708. /**
  1709. * @function SuperMap.Number.format
  1710. * @description 数字格式化输出。
  1711. * @param {number} num - 数字。
  1712. * @param {integer} [dec=0] - 数字的小数部分四舍五入到指定的位数。设置为 null 值时小数部分不变。
  1713. * @param {string} [tsep=','] - 千位分隔符。
  1714. * @param {string} [dsep='.'] - 小数点分隔符。
  1715. * @returns {string} 数字格式化后的字符串。
  1716. */
  1717. format: function format(num, dec, tsep, dsep) {
  1718. dec = typeof dec != "undefined" ? dec : 0;
  1719. tsep = typeof tsep != "undefined" ? tsep : SuperMap.Number.thousandsSeparator;
  1720. dsep = typeof dsep != "undefined" ? dsep : SuperMap.Number.decimalSeparator;
  1721. if (dec != null) {
  1722. num = parseFloat(num.toFixed(dec));
  1723. }
  1724. var parts = num.toString().split(".");
  1725. if (parts.length === 1 && dec == null) {
  1726. // integer where we do not want to touch the decimals
  1727. dec = 0;
  1728. }
  1729. var integer = parts[0];
  1730. if (tsep) {
  1731. var thousands = /(-?[0-9]+)([0-9]{3})/;
  1732. while (thousands.test(integer)) {
  1733. integer = integer.replace(thousands, "$1" + tsep + "$2");
  1734. }
  1735. }
  1736. var str;
  1737. if (dec == 0) {
  1738. str = integer;
  1739. } else {
  1740. var rem = parts.length > 1 ? parts[1] : "0";
  1741. if (dec != null) {
  1742. rem = rem + new Array(dec - rem.length + 1).join("0");
  1743. }
  1744. str = integer + dsep + rem;
  1745. }
  1746. return str;
  1747. }
  1748. };
  1749. if (!Number.prototype.limitSigDigs) {
  1750. /**
  1751. * APIMethod: Number.limitSigDigs
  1752. * 限制浮点数的有效数字位数.
  1753. * @param {integer} sig -有效位数。
  1754. * @returns {integer} 将数字四舍五入到指定数量的有效位数。
  1755. * 如果传入值 为 null、0、或者是负数, 返回值 0。
  1756. */
  1757. Number.prototype.limitSigDigs = function (sig) {
  1758. return NumberExt.limitSigDigs(this, sig);
  1759. };
  1760. }
  1761. /**
  1762. * @name Function
  1763. * @memberOf SuperMap
  1764. * @namespace
  1765. * @category BaseTypes Util
  1766. * @description 函数操作的一系列常用扩展函数。
  1767. */
  1768. var FunctionExt = SuperMap.Function = {
  1769. /**
  1770. * @function SuperMap.Function.bind
  1771. * @description 绑定函数到对象。方便创建 this 的作用域。
  1772. * @param {function} func - 输入函数。
  1773. * @param {Object} object - 对象绑定到输入函数(作为输入函数的 this 对象)。
  1774. * @returns {function} object 参数作为 func 函数的 this 对象。
  1775. */
  1776. bind: function bind(func, object) {
  1777. // create a reference to all arguments past the second one
  1778. var args = Array.prototype.slice.apply(arguments, [2]);
  1779. return function () {
  1780. // Push on any additional arguments from the actual function call.
  1781. // These will come after those sent to the bind call.
  1782. var newArgs = args.concat(Array.prototype.slice.apply(arguments, [0]));
  1783. return func.apply(object, newArgs);
  1784. };
  1785. },
  1786. /**
  1787. * @function SuperMap.Function.bindAsEventListener
  1788. * @description 绑定函数到对象,在调用该函数时配置并使用事件对象作为第一个参数。
  1789. * @param {function} func - 用于监听事件的函数。
  1790. * @param {Object} object - this 对象的引用。
  1791. * @returns {function}
  1792. */
  1793. bindAsEventListener: function bindAsEventListener(func, object) {
  1794. return function (event) {
  1795. return func.call(object, event || window.event);
  1796. };
  1797. },
  1798. /**
  1799. * @function SuperMap.Function.False
  1800. * @description 该函数仅仅返回 false。该函数主要是避免在 IE8 以下浏览中 DOM 事件句柄的匿名函数问题。
  1801. * @example
  1802. * document.onclick = SuperMap.Function.False;
  1803. * @returns {boolean}
  1804. */
  1805. False: function False() {
  1806. return false;
  1807. },
  1808. /**
  1809. * @function SuperMap.Function.True
  1810. * @description 该函数仅仅返回 true。该函数主要是避免在 IE8 以下浏览中 DOM 事件句柄的匿名函数问题。
  1811. * @example
  1812. * document.onclick = SuperMap.Function.True;
  1813. * @returns {boolean}
  1814. */
  1815. True: function True() {
  1816. return true;
  1817. },
  1818. /**
  1819. * @function SuperMap.Function.Void
  1820. * @description 可重用函数,仅仅返回 "undefined"。
  1821. * @returns {undefined}
  1822. */
  1823. Void: function Void() {}
  1824. };
  1825. /**
  1826. * @name Array
  1827. * @memberOf SuperMap
  1828. * @namespace
  1829. * @category BaseTypes Util
  1830. * @description 数组操作的一系列常用扩展函数。
  1831. */
  1832. var ArrayExt = SuperMap.Array = {
  1833. /**
  1834. * @function SuperMap.Array.filter
  1835. * @description 过滤数组,提供了 ECMA-262 标准中 Array.prototype.filter 函数的扩展。详见:{@link http://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Global_Objects/Array/filter}
  1836. * @param {Array} array - 要过滤的数组。
  1837. * @param {function} callback - 数组中的每一个元素调用该函数。</br>
  1838. * 如果函数的返回值为 true,该元素将包含在返回的数组中。该函数有三个参数: 数组中的元素,元素的索引,数组自身。</br>
  1839. * 如果设置了可选参数 caller,在调用 callback 时,使用可选参数 caller 设置为 callback 的参数。</br>
  1840. * @param {Object} [caller] - 在调用 callback 时,使用参数 caller 设置为 callback 的参数。
  1841. * @returns {Array} callback 函数返回 true 时的元素将作为返回数组中的元素。
  1842. */
  1843. filter: function filter(array, callback, caller) {
  1844. var selected = [];
  1845. if (Array.prototype.filter) {
  1846. selected = array.filter(callback, caller);
  1847. } else {
  1848. var len = array.length;
  1849. if (typeof callback != "function") {
  1850. throw new TypeError();
  1851. }
  1852. for (var i = 0; i < len; i++) {
  1853. if (i in array) {
  1854. var val = array[i];
  1855. if (callback.call(caller, val, i, array)) {
  1856. selected.push(val);
  1857. }
  1858. }
  1859. }
  1860. }
  1861. return selected;
  1862. }
  1863. };
  1864. // CONCATENATED MODULE: ./src/common/commontypes/Util.js
  1865. function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
  1866. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  1867. * This program are made available under the terms of the Apache License, Version 2.0
  1868. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  1869. var Util = SuperMap.Util = SuperMap.Util || {};
  1870. /**
  1871. * @name Util
  1872. * @memberOf SuperMap
  1873. * @namespace
  1874. * @category BaseTypes Util
  1875. * @description common 工具类。
  1876. */
  1877. /**
  1878. * @description 复制源对象的所有属性到目标对象上,源对象上的没有定义的属性在目标对象上也不会被设置。
  1879. * @example
  1880. * 要复制 SuperMap.Size 对象的所有属性到自定义对象上,使用方法如下:
  1881. * var size = new SuperMap.Size(100, 100);
  1882. * var obj = {};
  1883. * SuperMap.Util.extend(obj, size);
  1884. * @param {Object} [destination] - 目标对象。
  1885. * @param {Object} source - 源对象,其属性将被设置到目标对象上。
  1886. * @returns {Object} 目标对象。
  1887. */
  1888. SuperMap.Util.extend = function (destination, source) {
  1889. destination = destination || {};
  1890. if (source) {
  1891. for (var property in source) {
  1892. var value = source[property];
  1893. if (value !== undefined) {
  1894. destination[property] = value;
  1895. }
  1896. }
  1897. /**
  1898. * IE doesn't include the toString property when iterating over an object's
  1899. * properties with the for(property in object) syntax. Explicitly check if
  1900. * the source has its own toString property.
  1901. */
  1902. /*
  1903. * FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative
  1904. * prototype object" when calling hawOwnProperty if the source object
  1905. * is an instance of window.Event.
  1906. */
  1907. var sourceIsEvt = typeof window.Event === "function" && source instanceof window.Event;
  1908. if (!sourceIsEvt && source.hasOwnProperty && source.hasOwnProperty("toString")) {
  1909. destination.toString = source.toString;
  1910. }
  1911. }
  1912. return destination;
  1913. };
  1914. /**
  1915. * @description 对象拷贝。
  1916. * @param {Object} [des] - 目标对象。
  1917. * @param {Object} soc - 源对象。
  1918. */
  1919. SuperMap.Util.copy = function (des, soc) {
  1920. des = des || {};
  1921. var v;
  1922. if (soc) {
  1923. for (var p in des) {
  1924. v = soc[p];
  1925. if (typeof v !== 'undefined') {
  1926. des[p] = v;
  1927. }
  1928. }
  1929. }
  1930. };
  1931. /**
  1932. * @description 销毁对象,将其属性置空。
  1933. * @param {Object} [obj] - 目标对象。
  1934. */
  1935. SuperMap.Util.reset = function (obj) {
  1936. obj = obj || {};
  1937. for (var p in obj) {
  1938. if (obj.hasOwnProperty(p)) {
  1939. if (_typeof(obj[p]) === "object" && obj[p] instanceof Array) {
  1940. for (var i in obj[p]) {
  1941. if (obj[p][i].destroy) {
  1942. obj[p][i].destroy();
  1943. }
  1944. }
  1945. obj[p].length = 0;
  1946. } else if (_typeof(obj[p]) === "object" && obj[p] instanceof Object) {
  1947. if (obj[p].destroy) {
  1948. obj[p].destroy();
  1949. }
  1950. }
  1951. obj[p] = null;
  1952. }
  1953. }
  1954. };
  1955. /**
  1956. * @description 获取 HTML 元素数组。
  1957. * @returns {Array.<HTMLElement>} HTML 元素数组。
  1958. */
  1959. SuperMap.Util.getElement = function () {
  1960. var elements = [];
  1961. for (var i = 0, len = arguments.length; i < len; i++) {
  1962. var element = arguments[i];
  1963. if (typeof element === 'string') {
  1964. element = document.getElementById(element);
  1965. }
  1966. if (arguments.length === 1) {
  1967. return element;
  1968. }
  1969. elements.push(element);
  1970. }
  1971. return elements;
  1972. };
  1973. /**
  1974. * @description instance of 的跨浏览器实现。
  1975. * @param {Object} o - 对象。
  1976. * @returns {boolean} 是否是页面元素。
  1977. */
  1978. SuperMap.Util.isElement = function (o) {
  1979. return !!(o && o.nodeType === 1);
  1980. };
  1981. /**
  1982. * @description 判断一个对象是否是数组。
  1983. * @param {Object} a - 对象。
  1984. * @returns {boolean} 是否是数组。
  1985. */
  1986. SuperMap.Util.isArray = function (a) {
  1987. return Object.prototype.toString.call(a) === '[object Array]';
  1988. };
  1989. /**
  1990. * @description 从数组中删除某一项。
  1991. * @param {Array} array - 数组。
  1992. * @param {Object} item - 数组中要删除的一项。
  1993. * @returns {Array} 执行删除操作后的数组。
  1994. */
  1995. SuperMap.Util.removeItem = function (array, item) {
  1996. for (var i = array.length - 1; i >= 0; i--) {
  1997. if (array[i] === item) {
  1998. array.splice(i, 1); //break;more than once??
  1999. }
  2000. }
  2001. return array;
  2002. };
  2003. /**
  2004. * @description 获取某对象再数组中的索引值。
  2005. * @param {Array} array - 数组。
  2006. * @param {Object} obj - 对象。
  2007. * @returns {number} 某对象再数组中的索引值。
  2008. */
  2009. SuperMap.Util.indexOf = function (array, obj) {
  2010. if (array == null) {
  2011. return -1;
  2012. } else {
  2013. // use the build-in function if available.
  2014. if (typeof array.indexOf === "function") {
  2015. return array.indexOf(obj);
  2016. } else {
  2017. for (var i = 0, len = array.length; i < len; i++) {
  2018. if (array[i] === obj) {
  2019. return i;
  2020. }
  2021. }
  2022. return -1;
  2023. }
  2024. }
  2025. };
  2026. /**
  2027. * @description 修改某 DOM 元素的许多属性。
  2028. * @param {HTMLElement} element - 待修改的 DOM 元素。
  2029. * @param {string} [id] - DOM 元素的 ID。
  2030. * @param {SuperMap.Pixel} [px] - 包含 DOM 元素的 style 属性的 left 和 top 属性。
  2031. * @param {SuperMap.Size} [sz] - 包含 DOM 元素的 width 和 height 属性。
  2032. * @param {string} [position] - DOM 元素的 position 属性。
  2033. * @param {string} [border] - DOM 元素的 style 属性的 border 属性。
  2034. * @param {string} [overflow] - DOM 元素的 style 属性的 overflow 属性。
  2035. * @param {number} [opacity] - 不透明度值。取值范围为(0.0 - 1.0)。
  2036. */
  2037. SuperMap.Util.modifyDOMElement = function (element, id, px, sz, position, border, overflow, opacity) {
  2038. if (id) {
  2039. element.id = id;
  2040. }
  2041. if (px) {
  2042. element.style.left = px.x + "px";
  2043. element.style.top = px.y + "px";
  2044. }
  2045. if (sz) {
  2046. element.style.width = sz.w + "px";
  2047. element.style.height = sz.h + "px";
  2048. }
  2049. if (position) {
  2050. element.style.position = position;
  2051. }
  2052. if (border) {
  2053. element.style.border = border;
  2054. }
  2055. if (overflow) {
  2056. element.style.overflow = overflow;
  2057. }
  2058. if (parseFloat(opacity) >= 0.0 && parseFloat(opacity) < 1.0) {
  2059. element.style.filter = 'alpha(opacity=' + opacity * 100 + ')';
  2060. element.style.opacity = opacity;
  2061. } else if (parseFloat(opacity) === 1.0) {
  2062. element.style.filter = '';
  2063. element.style.opacity = '';
  2064. }
  2065. };
  2066. /**
  2067. * @description Takes an object and copies any properties that don't exist from
  2068. * another properties, by analogy with SuperMap.Util.extend() from
  2069. * Prototype.js.
  2070. *
  2071. * @param {Object} [to] - 目标对象。
  2072. * @param {Object} from - 源对象。Any properties of this object that
  2073. * are undefined in the to object will be set on the to object.
  2074. *
  2075. * @returns {Object} A reference to the to object. Note that the to argument is modified
  2076. * in place and returned by this function.
  2077. */
  2078. SuperMap.Util.applyDefaults = function (to, from) {
  2079. to = to || {};
  2080. /*
  2081. * FF/Windows < 2.0.0.13 reports "Illegal operation on WrappedNative
  2082. * prototype object" when calling hawOwnProperty if the source object is an
  2083. * instance of window.Event.
  2084. */
  2085. var fromIsEvt = typeof window.Event === "function" && from instanceof window.Event;
  2086. for (var key in from) {
  2087. if (to[key] === undefined || !fromIsEvt && from.hasOwnProperty && from.hasOwnProperty(key) && !to.hasOwnProperty(key)) {
  2088. to[key] = from[key];
  2089. }
  2090. }
  2091. /**
  2092. * IE doesn't include the toString property when iterating over an object's
  2093. * properties with the for(property in object) syntax. Explicitly check if
  2094. * the source has its own toString property.
  2095. */
  2096. if (!fromIsEvt && from && from.hasOwnProperty && from.hasOwnProperty('toString') && !to.hasOwnProperty('toString')) {
  2097. to.toString = from.toString;
  2098. }
  2099. return to;
  2100. };
  2101. /**
  2102. * @description 将参数对象转换为 HTTP 的 GET 请求中的参数字符串。例如:"key1=value1&key2=value2&key3=value3"。
  2103. * @param {Object} params - 参数对象。
  2104. * @returns {string} HTTP 的 GET 请求中的参数字符串。
  2105. */
  2106. SuperMap.Util.getParameterString = function (params) {
  2107. var paramsArray = [];
  2108. for (var key in params) {
  2109. var value = params[key];
  2110. if (value != null && typeof value !== 'function') {
  2111. var encodedValue;
  2112. if (Array.isArray(value) || value.toString() === '[object Object]') {
  2113. encodedValue = encodeURIComponent(JSON.stringify(value));
  2114. } else {
  2115. /* value is a string; simply encode */
  2116. encodedValue = encodeURIComponent(value);
  2117. }
  2118. paramsArray.push(encodeURIComponent(key) + "=" + encodedValue);
  2119. }
  2120. }
  2121. return paramsArray.join("&");
  2122. };
  2123. /**
  2124. * @description 给 URL 追加查询参数。
  2125. * @param {string} url - 待追加参数的 URL 字符串。
  2126. * @param {string} paramStr - 待追加的查询参数。
  2127. * @returns {string} 新的 URL。
  2128. */
  2129. SuperMap.Util.urlAppend = function (url, paramStr) {
  2130. var newUrl = url;
  2131. if (paramStr) {
  2132. if (paramStr.indexOf('?') === 0) {
  2133. paramStr = paramStr.substring(1);
  2134. }
  2135. var parts = (url + " ").split(/[?&]/);
  2136. newUrl += parts.pop() === " " ? paramStr : parts.length ? "&" + paramStr : "?" + paramStr;
  2137. }
  2138. return newUrl;
  2139. };
  2140. /**
  2141. * @description 给 URL 追加 path 参数。
  2142. * @param {string} url - 待追加参数的 URL 字符串。
  2143. * @param {string} paramStr - 待追加的path参数。
  2144. * @returns {string} 新的 URL。
  2145. */
  2146. SuperMap.Util.urlPathAppend = function (url, pathStr) {
  2147. var newUrl = url;
  2148. if (!pathStr) {
  2149. return newUrl;
  2150. }
  2151. if (pathStr.indexOf('/') === 0) {
  2152. pathStr = pathStr.substring(1);
  2153. }
  2154. var parts = url.split('?');
  2155. if (parts[0].indexOf('/', parts[0].length - 1) < 0) {
  2156. parts[0] += '/';
  2157. }
  2158. newUrl = "".concat(parts[0]).concat(pathStr).concat(parts.length > 1 ? "?".concat(parts[1]) : '');
  2159. return newUrl;
  2160. };
  2161. /**
  2162. * @description 为了避免浮点精度错误而保留的有效位数。
  2163. * @type {number}
  2164. * @default 14
  2165. */
  2166. SuperMap.Util.DEFAULT_PRECISION = 14;
  2167. /**
  2168. * @description 将字符串以接近的精度转换为数字。
  2169. * @param {string} number - 字符串。
  2170. * @param {number} [precision=14] - 精度。
  2171. * @returns {number} 数字。
  2172. */
  2173. SuperMap.Util.toFloat = function (number, precision) {
  2174. if (precision == null) {
  2175. precision = SuperMap.Util.DEFAULT_PRECISION;
  2176. }
  2177. if (typeof number !== "number") {
  2178. number = parseFloat(number);
  2179. }
  2180. return precision === 0 ? number : parseFloat(number.toPrecision(precision));
  2181. };
  2182. /**
  2183. * @description 角度转弧度。
  2184. * @param {number} x - 角度。
  2185. * @returns {number} 弧度。
  2186. */
  2187. SuperMap.Util.rad = function (x) {
  2188. return x * Math.PI / 180;
  2189. };
  2190. /**
  2191. * @description 从 URL 字符串中解析出参数对象。
  2192. * @param {string} url - URL。
  2193. * @returns {Object} 解析出的参数对象。
  2194. */
  2195. SuperMap.Util.getParameters = function (url) {
  2196. // if no url specified, take it from the location bar
  2197. url = url === null || url === undefined ? window.location.href : url; //parse out parameters portion of url string
  2198. var paramsString = "";
  2199. if (SuperMap.String.contains(url, '?')) {
  2200. var start = url.indexOf('?') + 1;
  2201. var end = SuperMap.String.contains(url, "#") ? url.indexOf('#') : url.length;
  2202. paramsString = url.substring(start, end);
  2203. }
  2204. var parameters = {};
  2205. var pairs = paramsString.split(/[&;]/);
  2206. for (var i = 0, len = pairs.length; i < len; ++i) {
  2207. var keyValue = pairs[i].split('=');
  2208. if (keyValue[0]) {
  2209. var key = keyValue[0];
  2210. try {
  2211. key = decodeURIComponent(key);
  2212. } catch (err) {
  2213. key = unescape(key);
  2214. } // being liberal by replacing "+" with " "
  2215. var value = (keyValue[1] || '').replace(/\+/g, " ");
  2216. try {
  2217. value = decodeURIComponent(value);
  2218. } catch (err) {
  2219. value = unescape(value);
  2220. } // follow OGC convention of comma delimited values
  2221. value = value.split(","); //if there's only one value, do not return as array
  2222. if (value.length == 1) {
  2223. value = value[0];
  2224. }
  2225. parameters[key] = value;
  2226. }
  2227. }
  2228. return parameters;
  2229. };
  2230. /**
  2231. * @description 不断递增计数变量,用于生成唯一 ID。
  2232. * @type {number}
  2233. * @default 0
  2234. */
  2235. SuperMap.Util.lastSeqID = 0;
  2236. /**
  2237. * @description 创建唯一 ID 值。
  2238. * @param {string} [prefix] - 前缀。
  2239. * @returns {string} 唯一的 ID 值。
  2240. */
  2241. SuperMap.Util.createUniqueID = function (prefix) {
  2242. if (prefix == null) {
  2243. prefix = "id_";
  2244. }
  2245. SuperMap.Util.lastSeqID += 1;
  2246. return prefix + SuperMap.Util.lastSeqID;
  2247. };
  2248. /**
  2249. * @memberOf SuperMap
  2250. * @description 每单位的英尺数。
  2251. * @type {Object}
  2252. * @constant
  2253. */
  2254. SuperMap.INCHES_PER_UNIT = {
  2255. 'inches': 1.0,
  2256. 'ft': 12.0,
  2257. 'mi': 63360.0,
  2258. 'm': 39.3701,
  2259. 'km': 39370.1,
  2260. 'dd': 4374754,
  2261. 'yd': 36
  2262. };
  2263. SuperMap.INCHES_PER_UNIT["in"] = SuperMap.INCHES_PER_UNIT.inches;
  2264. SuperMap.INCHES_PER_UNIT["degrees"] = SuperMap.INCHES_PER_UNIT.dd;
  2265. SuperMap.INCHES_PER_UNIT["nmi"] = 1852 * SuperMap.INCHES_PER_UNIT.m; // Units from CS-Map
  2266. SuperMap.METERS_PER_INCH = 0.02540005080010160020;
  2267. SuperMap.Util.extend(SuperMap.INCHES_PER_UNIT, {
  2268. "Inch": SuperMap.INCHES_PER_UNIT.inches,
  2269. "Meter": 1.0 / SuperMap.METERS_PER_INCH,
  2270. //EPSG:9001
  2271. "Foot": 0.30480060960121920243 / SuperMap.METERS_PER_INCH,
  2272. //EPSG:9003
  2273. "IFoot": 0.30480000000000000000 / SuperMap.METERS_PER_INCH,
  2274. //EPSG:9002
  2275. "ClarkeFoot": 0.3047972651151 / SuperMap.METERS_PER_INCH,
  2276. //EPSG:9005
  2277. "SearsFoot": 0.30479947153867624624 / SuperMap.METERS_PER_INCH,
  2278. //EPSG:9041
  2279. "GoldCoastFoot": 0.30479971018150881758 / SuperMap.METERS_PER_INCH,
  2280. //EPSG:9094
  2281. "IInch": 0.02540000000000000000 / SuperMap.METERS_PER_INCH,
  2282. "MicroInch": 0.00002540000000000000 / SuperMap.METERS_PER_INCH,
  2283. "Mil": 0.00000002540000000000 / SuperMap.METERS_PER_INCH,
  2284. "Centimeter": 0.01000000000000000000 / SuperMap.METERS_PER_INCH,
  2285. "Kilometer": 1000.00000000000000000000 / SuperMap.METERS_PER_INCH,
  2286. //EPSG:9036
  2287. "Yard": 0.91440182880365760731 / SuperMap.METERS_PER_INCH,
  2288. "SearsYard": 0.914398414616029 / SuperMap.METERS_PER_INCH,
  2289. //EPSG:9040
  2290. "IndianYard": 0.91439853074444079983 / SuperMap.METERS_PER_INCH,
  2291. //EPSG:9084
  2292. "IndianYd37": 0.91439523 / SuperMap.METERS_PER_INCH,
  2293. //EPSG:9085
  2294. "IndianYd62": 0.9143988 / SuperMap.METERS_PER_INCH,
  2295. //EPSG:9086
  2296. "IndianYd75": 0.9143985 / SuperMap.METERS_PER_INCH,
  2297. //EPSG:9087
  2298. "IndianFoot": 0.30479951 / SuperMap.METERS_PER_INCH,
  2299. //EPSG:9080
  2300. "IndianFt37": 0.30479841 / SuperMap.METERS_PER_INCH,
  2301. //EPSG:9081
  2302. "IndianFt62": 0.3047996 / SuperMap.METERS_PER_INCH,
  2303. //EPSG:9082
  2304. "IndianFt75": 0.3047995 / SuperMap.METERS_PER_INCH,
  2305. //EPSG:9083
  2306. "Mile": 1609.34721869443738887477 / SuperMap.METERS_PER_INCH,
  2307. "IYard": 0.91440000000000000000 / SuperMap.METERS_PER_INCH,
  2308. //EPSG:9096
  2309. "IMile": 1609.34400000000000000000 / SuperMap.METERS_PER_INCH,
  2310. //EPSG:9093
  2311. "NautM": 1852.00000000000000000000 / SuperMap.METERS_PER_INCH,
  2312. //EPSG:9030
  2313. "Lat-66": 110943.316488932731 / SuperMap.METERS_PER_INCH,
  2314. "Lat-83": 110946.25736872234125 / SuperMap.METERS_PER_INCH,
  2315. "Decimeter": 0.10000000000000000000 / SuperMap.METERS_PER_INCH,
  2316. "Millimeter": 0.00100000000000000000 / SuperMap.METERS_PER_INCH,
  2317. "Dekameter": 10.00000000000000000000 / SuperMap.METERS_PER_INCH,
  2318. "Decameter": 10.00000000000000000000 / SuperMap.METERS_PER_INCH,
  2319. "Hectometer": 100.00000000000000000000 / SuperMap.METERS_PER_INCH,
  2320. "GermanMeter": 1.0000135965 / SuperMap.METERS_PER_INCH,
  2321. //EPSG:9031
  2322. "CaGrid": 0.999738 / SuperMap.METERS_PER_INCH,
  2323. "ClarkeChain": 20.1166194976 / SuperMap.METERS_PER_INCH,
  2324. //EPSG:9038
  2325. "GunterChain": 20.11684023368047 / SuperMap.METERS_PER_INCH,
  2326. //EPSG:9033
  2327. "BenoitChain": 20.116782494375872 / SuperMap.METERS_PER_INCH,
  2328. //EPSG:9062
  2329. "SearsChain": 20.11676512155 / SuperMap.METERS_PER_INCH,
  2330. //EPSG:9042
  2331. "ClarkeLink": 0.201166194976 / SuperMap.METERS_PER_INCH,
  2332. //EPSG:9039
  2333. "GunterLink": 0.2011684023368047 / SuperMap.METERS_PER_INCH,
  2334. //EPSG:9034
  2335. "BenoitLink": 0.20116782494375872 / SuperMap.METERS_PER_INCH,
  2336. //EPSG:9063
  2337. "SearsLink": 0.2011676512155 / SuperMap.METERS_PER_INCH,
  2338. //EPSG:9043
  2339. "Rod": 5.02921005842012 / SuperMap.METERS_PER_INCH,
  2340. "IntnlChain": 20.1168 / SuperMap.METERS_PER_INCH,
  2341. //EPSG:9097
  2342. "IntnlLink": 0.201168 / SuperMap.METERS_PER_INCH,
  2343. //EPSG:9098
  2344. "Perch": 5.02921005842012 / SuperMap.METERS_PER_INCH,
  2345. "Pole": 5.02921005842012 / SuperMap.METERS_PER_INCH,
  2346. "Furlong": 201.1684023368046 / SuperMap.METERS_PER_INCH,
  2347. "Rood": 3.778266898 / SuperMap.METERS_PER_INCH,
  2348. "CapeFoot": 0.3047972615 / SuperMap.METERS_PER_INCH,
  2349. "Brealey": 375.00000000000000000000 / SuperMap.METERS_PER_INCH,
  2350. "ModAmFt": 0.304812252984505969011938 / SuperMap.METERS_PER_INCH,
  2351. "Fathom": 1.8288 / SuperMap.METERS_PER_INCH,
  2352. "NautM-UK": 1853.184 / SuperMap.METERS_PER_INCH,
  2353. "50kilometers": 50000.0 / SuperMap.METERS_PER_INCH,
  2354. "150kilometers": 150000.0 / SuperMap.METERS_PER_INCH
  2355. }); //unit abbreviations supported by PROJ.4
  2356. SuperMap.Util.extend(SuperMap.INCHES_PER_UNIT, {
  2357. "mm": SuperMap.INCHES_PER_UNIT["Meter"] / 1000.0,
  2358. "cm": SuperMap.INCHES_PER_UNIT["Meter"] / 100.0,
  2359. "dm": SuperMap.INCHES_PER_UNIT["Meter"] * 100.0,
  2360. "km": SuperMap.INCHES_PER_UNIT["Meter"] * 1000.0,
  2361. "kmi": SuperMap.INCHES_PER_UNIT["nmi"],
  2362. //International Nautical Mile
  2363. "fath": SuperMap.INCHES_PER_UNIT["Fathom"],
  2364. //International Fathom
  2365. "ch": SuperMap.INCHES_PER_UNIT["IntnlChain"],
  2366. //International Chain
  2367. "link": SuperMap.INCHES_PER_UNIT["IntnlLink"],
  2368. //International Link
  2369. "us-in": SuperMap.INCHES_PER_UNIT["inches"],
  2370. //U.S. Surveyor's Inch
  2371. "us-ft": SuperMap.INCHES_PER_UNIT["Foot"],
  2372. //U.S. Surveyor's Foot
  2373. "us-yd": SuperMap.INCHES_PER_UNIT["Yard"],
  2374. //U.S. Surveyor's Yard
  2375. "us-ch": SuperMap.INCHES_PER_UNIT["GunterChain"],
  2376. //U.S. Surveyor's Chain
  2377. "us-mi": SuperMap.INCHES_PER_UNIT["Mile"],
  2378. //U.S. Surveyor's Statute Mile
  2379. "ind-yd": SuperMap.INCHES_PER_UNIT["IndianYd37"],
  2380. //Indian Yard
  2381. "ind-ft": SuperMap.INCHES_PER_UNIT["IndianFt37"],
  2382. //Indian Foot
  2383. "ind-ch": 20.11669506 / SuperMap.METERS_PER_INCH //Indian Chain
  2384. });
  2385. /**
  2386. * @memberOf SuperMap
  2387. * @member [SuperMap.DOTS_PER_INCH=96]
  2388. * @description 分辨率与比例尺之间转换的常量。
  2389. * @type {Object}
  2390. */
  2391. SuperMap.DOTS_PER_INCH = 96;
  2392. /**
  2393. * @param {number} scale - 比例尺。
  2394. * @returns {number} 返回正常的 scale 值。
  2395. */
  2396. SuperMap.Util.normalizeScale = function (scale) {
  2397. var normScale = scale > 1.0 ? 1.0 / scale : scale;
  2398. return normScale;
  2399. };
  2400. /**
  2401. * @description 比例尺转分辨率。
  2402. * @param {number} scale - 比例尺。
  2403. * @param {string} [units='degrees'] - 比例尺单位。
  2404. * @returns {number} 分辨率。
  2405. */
  2406. SuperMap.Util.getResolutionFromScale = function (scale, units) {
  2407. var resolution;
  2408. if (scale) {
  2409. if (units == null) {
  2410. units = "degrees";
  2411. }
  2412. var normScale = SuperMap.Util.normalizeScale(scale);
  2413. resolution = 1 / (normScale * SuperMap.INCHES_PER_UNIT[units] * SuperMap.DOTS_PER_INCH);
  2414. }
  2415. return resolution;
  2416. };
  2417. /**
  2418. * @description 分辨率转比例尺。
  2419. * @param {number} resolution - 分辨率。
  2420. * @param {string} [units='degrees'] - 分辨率单位。
  2421. * @returns {number} 比例尺。
  2422. */
  2423. SuperMap.Util.getScaleFromResolution = function (resolution, units) {
  2424. if (units == null) {
  2425. units = "degrees";
  2426. }
  2427. var scale = resolution * SuperMap.INCHES_PER_UNIT[units] * SuperMap.DOTS_PER_INCH;
  2428. return scale;
  2429. };
  2430. /**
  2431. * @memberOf SuperMap
  2432. * @description 如果 userAgent 捕获到浏览器使用的是 Gecko 引擎则返回 true。
  2433. * @constant
  2434. */
  2435. SuperMap.IS_GECKO = function () {
  2436. var ua = navigator.userAgent.toLowerCase();
  2437. return ua.indexOf("webkit") === -1 && ua.indexOf("gecko") !== -1;
  2438. }();
  2439. /**
  2440. * @memberOf SuperMap
  2441. * @description 浏览器名称,依赖于 userAgent 属性,BROWSER_NAME 可以是空,或者以下浏览器:
  2442. * * "opera" -- Opera
  2443. * * "msie" -- Internet Explorer
  2444. * * "safari" -- Safari
  2445. * * "firefox" -- Firefox
  2446. * * "mozilla" -- Mozilla
  2447. * @constant
  2448. */
  2449. SuperMap.Browser = function () {
  2450. var name = '',
  2451. version = '',
  2452. device = 'pc',
  2453. uaMatch; //以下进行测试
  2454. var ua = navigator.userAgent.toLowerCase();
  2455. if (ua.indexOf("msie") > -1 || ua.indexOf("trident") > -1 && ua.indexOf("rv") > -1) {
  2456. name = 'msie';
  2457. uaMatch = ua.match(/msie ([\d.]+)/) || ua.match(/rv:([\d.]+)/);
  2458. } else if (ua.indexOf("chrome") > -1) {
  2459. name = 'chrome';
  2460. uaMatch = ua.match(/chrome\/([\d.]+)/);
  2461. } else if (ua.indexOf("firefox") > -1) {
  2462. name = 'firefox';
  2463. uaMatch = ua.match(/firefox\/([\d.]+)/);
  2464. } else if (ua.indexOf("opera") > -1) {
  2465. name = 'opera';
  2466. uaMatch = ua.match(/version\/([\d.]+)/);
  2467. } else if (ua.indexOf("safari") > -1) {
  2468. name = 'safari';
  2469. uaMatch = ua.match(/version\/([\d.]+)/);
  2470. }
  2471. version = uaMatch ? uaMatch[1] : '';
  2472. if (ua.indexOf("ipad") > -1 || ua.indexOf("ipod") > -1 || ua.indexOf("iphone") > -1) {
  2473. device = 'apple';
  2474. } else if (ua.indexOf("android") > -1) {
  2475. uaMatch = ua.match(/version\/([\d.]+)/);
  2476. version = uaMatch ? uaMatch[1] : '';
  2477. device = 'android';
  2478. }
  2479. return {
  2480. name: name,
  2481. version: version,
  2482. device: device
  2483. };
  2484. }();
  2485. /**
  2486. * @description 获取浏览器相关信息。支持的浏览器包括:Opera,Internet Explorer,Safari,Firefox。
  2487. * @returns {Object} 获取浏览器名称、版本、设备名称。对应的属性分别为 name, version, device。
  2488. */
  2489. SuperMap.Util.getBrowser = function () {
  2490. return SuperMap.Browser;
  2491. };
  2492. /**
  2493. * @description 浏览器是否支持 Canvas。
  2494. * @returns {boolean} 获取当前浏览器是否支持 HTML5 Canvas。
  2495. */
  2496. SuperMap.Util.isSupportCanvas = function () {
  2497. var checkRes = true,
  2498. broz = SuperMap.Util.getBrowser();
  2499. if (document.createElement("canvas").getContext) {
  2500. if (broz.name === 'firefox' && parseFloat(broz.version) < 5) {
  2501. checkRes = false;
  2502. }
  2503. if (broz.name === 'safari' && parseFloat(broz.version) < 4) {
  2504. checkRes = false;
  2505. }
  2506. if (broz.name === 'opera' && parseFloat(broz.version) < 10) {
  2507. checkRes = false;
  2508. }
  2509. if (broz.name === 'msie' && parseFloat(broz.version) < 9) {
  2510. checkRes = false;
  2511. }
  2512. } else {
  2513. checkRes = false;
  2514. }
  2515. return checkRes;
  2516. }();
  2517. /**
  2518. * @description 判断;浏览器是否支持 Canvas。
  2519. * @returns {boolean} 获取当前浏览器是否支持 HTML5 Canvas 。
  2520. */
  2521. SuperMap.Util.supportCanvas = function () {
  2522. return SuperMap.Util.isSupportCanvas;
  2523. }; //将服务端的地图单位转成SuperMap的地图单位
  2524. SuperMap.INCHES_PER_UNIT["degree"] = SuperMap.INCHES_PER_UNIT.dd;
  2525. SuperMap.INCHES_PER_UNIT["meter"] = SuperMap.INCHES_PER_UNIT.m;
  2526. SuperMap.INCHES_PER_UNIT["foot"] = SuperMap.INCHES_PER_UNIT.ft;
  2527. SuperMap.INCHES_PER_UNIT["inch"] = SuperMap.INCHES_PER_UNIT.inches;
  2528. SuperMap.INCHES_PER_UNIT["mile"] = SuperMap.INCHES_PER_UNIT.mi;
  2529. SuperMap.INCHES_PER_UNIT["kilometer"] = SuperMap.INCHES_PER_UNIT.km;
  2530. SuperMap.INCHES_PER_UNIT["yard"] = SuperMap.INCHES_PER_UNIT.yd;
  2531. /**
  2532. * @description 判断一个 URL 请求是否在当前域中。
  2533. * @param {string} url - URL 请求字符串。
  2534. * @returns {boolean} URL 请求是否在当前域中。
  2535. */
  2536. SuperMap.Util.isInTheSameDomain = function (url) {
  2537. if (!url) {
  2538. return true;
  2539. }
  2540. var index = url.indexOf("//");
  2541. var documentUrl = document.location.toString();
  2542. var documentIndex = documentUrl.indexOf("//");
  2543. if (index === -1) {
  2544. return true;
  2545. } else {
  2546. var protocol;
  2547. var substring = protocol = url.substring(0, index);
  2548. var documentSubString = documentUrl.substring(documentIndex + 2);
  2549. documentIndex = documentSubString.indexOf("/");
  2550. var documentPortIndex = documentSubString.indexOf(":");
  2551. var documentDomainWithPort = documentSubString.substring(0, documentIndex); //var documentPort;
  2552. var documentprotocol = document.location.protocol;
  2553. if (documentPortIndex !== -1) {// documentPort = +documentSubString.substring(documentPortIndex, documentIndex);
  2554. } else {
  2555. documentDomainWithPort += ':' + (documentprotocol.toLowerCase() === 'http:' ? 80 : 443);
  2556. }
  2557. if (documentprotocol.toLowerCase() !== substring.toLowerCase()) {
  2558. return false;
  2559. }
  2560. substring = url.substring(index + 2);
  2561. var portIndex = substring.indexOf(":");
  2562. index = substring.indexOf("/");
  2563. var domainWithPort = substring.substring(0, index);
  2564. var domain;
  2565. if (portIndex !== -1) {
  2566. domain = substring.substring(0, portIndex);
  2567. } else {
  2568. domain = substring.substring(0, index);
  2569. domainWithPort += ':' + (protocol.toLowerCase() === 'http:' ? 80 : 443);
  2570. }
  2571. var documentDomain = document.domain;
  2572. if (domain === documentDomain && domainWithPort === documentDomainWithPort) {
  2573. return true;
  2574. }
  2575. }
  2576. return false;
  2577. };
  2578. /**
  2579. * @description 计算 iServer 服务的 REST 图层的显示分辨率,需要从 iServer 的 REST 图层表述中获取 viewBounds、viewer、scale、coordUnit、datumAxis 五个参数,来进行计算。
  2580. * @param {SuperMap.Bounds} viewBounds - 地图的参照可视范围,即地图初始化时默认的地图显示范围。
  2581. * @param {SuperMap.Size} viewer - 地图初始化时默认的地图图片的尺寸。
  2582. * @param {number} scale - 地图初始化时默认的显示比例尺。
  2583. * @param {string} [coordUnit='degrees'] - 投影坐标系统的地图单位。
  2584. * @param {number} [datumAxis=6378137] - 地理坐标系统椭球体长半轴。用户自定义地图的 Options 时,若未指定该参数的值,则系统默认为 WGS84 参考系的椭球体长半轴 6378137。
  2585. * @returns {number} 返回图层显示分辨率。
  2586. */
  2587. SuperMap.Util.calculateDpi = function (viewBounds, viewer, scale, coordUnit, datumAxis) {
  2588. //10000 是 0.1毫米与米的转换。DPI的计算公式:Viewer / DPI * 0.0254 * 10000 = ViewBounds * scale ,公式中的10000是为了提高计算结果的精度,以下出现的ratio皆为如此。
  2589. if (!viewBounds || !viewer || !scale) {
  2590. return;
  2591. }
  2592. var ratio = 10000,
  2593. rvbWidth = viewBounds.getWidth(),
  2594. rvbHeight = viewBounds.getHeight(),
  2595. rvWidth = viewer.w,
  2596. rvHeight = viewer.h; //用户自定义地图的Options时,若未指定该参数的值,则系统默认为6378137米,即WGS84参考系的椭球体长半轴。
  2597. datumAxis = datumAxis || 6378137;
  2598. coordUnit = coordUnit || "degrees";
  2599. var dpi;
  2600. if (coordUnit.toLowerCase() === "degree" || coordUnit.toLowerCase() === "degrees" || coordUnit.toLowerCase() === "dd") {
  2601. var num1 = rvbWidth / rvWidth,
  2602. num2 = rvbHeight / rvHeight,
  2603. resolution = num1 > num2 ? num1 : num2;
  2604. dpi = 0.0254 * ratio / resolution / scale / (Math.PI * 2 * datumAxis / 360) / ratio;
  2605. } else {
  2606. var _resolution = rvbWidth / rvWidth;
  2607. dpi = 0.0254 * ratio / _resolution / scale / ratio;
  2608. }
  2609. return dpi;
  2610. };
  2611. /**
  2612. * @description 将对象转换成 JSON 字符串。
  2613. * @param {Object} obj - 要转换成 JSON 的 Object 对象。
  2614. * @returns {string} 返回转换后的 JSON 对象。
  2615. */
  2616. SuperMap.Util.toJSON = function (obj) {
  2617. var objInn = obj;
  2618. if (objInn == null) {
  2619. return null;
  2620. }
  2621. switch (objInn.constructor) {
  2622. case String:
  2623. //s = "'" + str.replace(/(["\\])/g, "\\$1") + "'"; string含有单引号出错
  2624. objInn = '"' + objInn.replace(/(["\\])/g, '\\$1') + '"';
  2625. objInn = objInn.replace(/\n/g, "\\n");
  2626. objInn = objInn.replace(/\r/g, "\\r");
  2627. objInn = objInn.replace("<", "&lt;");
  2628. objInn = objInn.replace(">", "&gt;");
  2629. objInn = objInn.replace(/%/g, "%25");
  2630. objInn = objInn.replace(/&/g, "%26");
  2631. return objInn;
  2632. case Array:
  2633. var arr = [];
  2634. for (var i = 0, len = objInn.length; i < len; i++) {
  2635. arr.push(SuperMap.Util.toJSON(objInn[i]));
  2636. }
  2637. return "[" + arr.join(",") + "]";
  2638. case Number:
  2639. return isFinite(objInn) ? String(objInn) : null;
  2640. case Boolean:
  2641. return String(objInn);
  2642. case Date:
  2643. var dateStr = "{" + "'__type':\"System.DateTime\"," + "'Year':" + objInn.getFullYear() + "," + "'Month':" + (objInn.getMonth() + 1) + "," + "'Day':" + objInn.getDate() + "," + "'Hour':" + objInn.getHours() + "," + "'Minute':" + objInn.getMinutes() + "," + "'Second':" + objInn.getSeconds() + "," + "'Millisecond':" + objInn.getMilliseconds() + "," + "'TimezoneOffset':" + objInn.getTimezoneOffset() + "}";
  2644. return dateStr;
  2645. default:
  2646. if (objInn["toJSON"] != null && typeof objInn["toJSON"] === "function") {
  2647. return objInn.toJSON();
  2648. }
  2649. if (_typeof(objInn) === "object") {
  2650. if (objInn.length) {
  2651. var _arr2 = [];
  2652. for (var _i = 0, _len = objInn.length; _i < _len; _i++) {
  2653. _arr2.push(SuperMap.Util.toJSON(objInn[_i]));
  2654. }
  2655. return "[" + _arr2.join(",") + "]";
  2656. }
  2657. var _arr = [];
  2658. for (var attr in objInn) {
  2659. //为解决SuperMap.Geometry类型头json时堆栈溢出的问题,attr == "parent"时不进行json转换
  2660. if (typeof objInn[attr] !== "function" && attr !== "CLASS_NAME" && attr !== "parent") {
  2661. _arr.push("'" + attr + "':" + SuperMap.Util.toJSON(objInn[attr]));
  2662. }
  2663. }
  2664. if (_arr.length > 0) {
  2665. return "{" + _arr.join(",") + "}";
  2666. } else {
  2667. return "{}";
  2668. }
  2669. }
  2670. return objInn.toString();
  2671. }
  2672. };
  2673. /**
  2674. * @description 根据比例尺和 dpi 计算屏幕分辨率。
  2675. * @param {number} scale - 比例尺。
  2676. * @param {number} dpi - 图像分辨率,表示每英寸内的像素个数。
  2677. * @param {string} [coordUnit] - 投影坐标系统的地图单位。
  2678. * @param {number} [datumAxis=6378137] - 地理坐标系统椭球体长半轴。用户自定义地图的 Options 时,若未指定该参数的值,则 DPI 默认按照 WGS84 参考系的椭球体长半轴 6378137 来计算。
  2679. * @returns {number} 返回当前比例尺下的屏幕分辨率。
  2680. */
  2681. SuperMap.Util.getResolutionFromScaleDpi = function (scale, dpi, coordUnit, datumAxis) {
  2682. var resolution = null,
  2683. ratio = 10000; //用户自定义地图的Options时,若未指定该参数的值,则系统默认为6378137米,即WGS84参考系的椭球体长半轴。
  2684. datumAxis = datumAxis || 6378137;
  2685. coordUnit = coordUnit || "";
  2686. if (scale > 0 && dpi > 0) {
  2687. scale = SuperMap.Util.normalizeScale(scale);
  2688. if (coordUnit.toLowerCase() === "degree" || coordUnit.toLowerCase() === "degrees" || coordUnit.toLowerCase() === "dd") {
  2689. //scale = SuperMap.Util.normalizeScale(scale);
  2690. resolution = 0.0254 * ratio / dpi / scale / (Math.PI * 2 * datumAxis / 360) / ratio;
  2691. return resolution;
  2692. } else {
  2693. resolution = 0.0254 * ratio / dpi / scale / ratio;
  2694. return resolution;
  2695. }
  2696. }
  2697. return -1;
  2698. };
  2699. /**
  2700. * @description 根据 resolution、dpi、coordUnit 和 datumAxis 计算比例尺。
  2701. * @param {number} resolution - 用于计算比例尺的地图分辨率。
  2702. * @param {number} dpi - 图像分辨率,表示每英寸内的像素个数。
  2703. * @param {string} [coordUnit] - 投影坐标系统的地图单位。
  2704. * @param {number} [datumAxis=6378137] - 地理坐标系统椭球体长半轴。用户自定义地图的 Options 时,若未指定该参数的值,则 DPI 默认按照 WGS84 参考系的椭球体长半轴 6378137 来计算。
  2705. * @returns {number} 返回当前屏幕分辨率下的比例尺。
  2706. */
  2707. SuperMap.Util.getScaleFromResolutionDpi = function (resolution, dpi, coordUnit, datumAxis) {
  2708. var scale = null,
  2709. ratio = 10000; //用户自定义地图的Options时,若未指定该参数的值,则系统默认为6378137米,即WGS84参考系的椭球体长半轴。
  2710. datumAxis = datumAxis || 6378137;
  2711. coordUnit = coordUnit || "";
  2712. if (resolution > 0 && dpi > 0) {
  2713. if (coordUnit.toLowerCase() === "degree" || coordUnit.toLowerCase() === "degrees" || coordUnit.toLowerCase() === "dd") {
  2714. scale = 0.0254 * ratio / dpi / resolution / (Math.PI * 2 * datumAxis / 360) / ratio;
  2715. return scale;
  2716. } else {
  2717. scale = 0.0254 * ratio / dpi / resolution / ratio;
  2718. return scale;
  2719. }
  2720. }
  2721. return -1;
  2722. };
  2723. /**
  2724. * @description 转换查询结果。
  2725. * @param {Object} result - 查询结果。
  2726. * @returns {Object} 转换后的查询结果。
  2727. */
  2728. SuperMap.Util.transformResult = function (result) {
  2729. if (result.responseText && typeof result.responseText === "string") {
  2730. result = JSON.parse(result.responseText);
  2731. }
  2732. return result;
  2733. };
  2734. /**
  2735. * @description 属性拷贝,不拷贝方法类名(CLASS_NAME)等。
  2736. * @param {Object} [destination] - 拷贝目标。
  2737. * @param {Object} source - 源对象。
  2738. *
  2739. */
  2740. SuperMap.Util.copyAttributes = function (destination, source) {
  2741. destination = destination || {};
  2742. if (source) {
  2743. for (var property in source) {
  2744. var value = source[property];
  2745. if (value !== undefined && property !== "CLASS_NAME" && typeof value !== "function") {
  2746. destination[property] = value;
  2747. }
  2748. }
  2749. }
  2750. return destination;
  2751. };
  2752. /**
  2753. * @description 将源对象上的属性拷贝到目标对象上。(不拷贝 CLASS_NAME 和方法)
  2754. * @param {Object} [destination] - 目标对象。
  2755. * @param {Object} source - 源对象。
  2756. * @param {Array.<string>} clip - 源对象中禁止拷贝到目标对象的属性,目的是防止目标对象上不可修改的属性被篡改。
  2757. *
  2758. */
  2759. SuperMap.Util.copyAttributesWithClip = function (destination, source, clip) {
  2760. destination = destination || {};
  2761. if (source) {
  2762. for (var property in source) {
  2763. //去掉禁止拷贝的属性
  2764. var isInClip = false;
  2765. if (clip && clip.length) {
  2766. for (var i = 0, len = clip.length; i < len; i++) {
  2767. if (property === clip[i]) {
  2768. isInClip = true;
  2769. break;
  2770. }
  2771. }
  2772. }
  2773. if (isInClip === true) {
  2774. continue;
  2775. }
  2776. var value = source[property];
  2777. if (value !== undefined && property !== "CLASS_NAME" && typeof value !== "function") {
  2778. destination[property] = value;
  2779. }
  2780. }
  2781. }
  2782. return destination;
  2783. };
  2784. /**
  2785. * @description 克隆一个 Object 对象
  2786. * @param {Object} obj - 需要克隆的对象。
  2787. * @returns {Object} 返回对象的拷贝对象,注意是新的对象,不是指向。
  2788. */
  2789. SuperMap.Util.cloneObject = function (obj) {
  2790. // Handle the 3 simple types, and null or undefined
  2791. if (null === obj || "object" !== _typeof(obj)) {
  2792. return obj;
  2793. } // Handle Date
  2794. if (obj instanceof Date) {
  2795. var copy = new Date();
  2796. copy.setTime(obj.getTime());
  2797. return copy;
  2798. } // Handle Array
  2799. if (obj instanceof Array) {
  2800. var _copy = obj.slice(0);
  2801. return _copy;
  2802. } // Handle Object
  2803. if (obj instanceof Object) {
  2804. var _copy2 = {};
  2805. for (var attr in obj) {
  2806. if (obj.hasOwnProperty(attr)) {
  2807. _copy2[attr] = SuperMap.Util.cloneObject(obj[attr]);
  2808. }
  2809. }
  2810. return _copy2;
  2811. }
  2812. throw new Error("Unable to copy obj! Its type isn't supported.");
  2813. };
  2814. /**
  2815. * @description 判断两条线段是不是有交点。
  2816. * @param {SuperMap.Geometry.Point} a1 - 第一条线段的起始节点。
  2817. * @param {SuperMap.Geometry.Point} a2 - 第一条线段的结束节点。
  2818. * @param {SuperMap.Geometry.Point} b1 - 第二条线段的起始节点。
  2819. * @param {SuperMap.Geometry.Point} b2 - 第二条线段的结束节点。
  2820. * @returns {Object} 如果相交返回交点,如果不相交返回两条线段的位置关系。
  2821. */
  2822. SuperMap.Util.lineIntersection = function (a1, a2, b1, b2) {
  2823. var intersectValue = null;
  2824. var k1;
  2825. var k2;
  2826. var b = (b2.x - b1.x) * (a1.y - b1.y) - (b2.y - b1.y) * (a1.x - b1.x);
  2827. var a = (a2.x - a1.x) * (a1.y - b1.y) - (a2.y - a1.y) * (a1.x - b1.x);
  2828. var ab = (b2.y - b1.y) * (a2.x - a1.x) - (b2.x - b1.x) * (a2.y - a1.y); //ab==0代表两条线断的斜率一样
  2829. if (ab != 0) {
  2830. k1 = b / ab;
  2831. k2 = a / ab;
  2832. if (k1 >= 0 && k2 <= 1 && k1 <= 1 && k2 >= 0) {
  2833. intersectValue = new SuperMap.Geometry.Point(a1.x + k1 * (a2.x - a1.x), a1.y + k1 * (a2.y - a1.y));
  2834. } else {
  2835. intersectValue = "No Intersection";
  2836. }
  2837. } else {
  2838. if (b == 0 && a == 0) {
  2839. var maxy = Math.max(a1.y, a2.y);
  2840. var miny = Math.min(a1.y, a2.y);
  2841. var maxx = Math.max(a1.x, a2.x);
  2842. var minx = Math.min(a1.x, a2.x);
  2843. if ((b1.y >= miny && b1.y <= maxy || b2.y >= miny && b2.y <= maxy) && b1.x >= minx && b1.x <= maxx || b2.x >= minx && b2.x <= maxx) {
  2844. intersectValue = "Coincident"; //重合
  2845. } else {
  2846. intersectValue = "Parallel"; //平行
  2847. }
  2848. } else {
  2849. intersectValue = "Parallel"; //平行
  2850. }
  2851. }
  2852. return intersectValue;
  2853. };
  2854. /**
  2855. * @description 获取文本外接矩形宽度与高度。
  2856. * @param {SuperMap.ThemeStyle} style - 文本样式。
  2857. * @param {string} text - 文本内容。
  2858. * @param {Object} element - DOM 元素。
  2859. * @returns {Object} 返回裁剪后的宽度,高度信息。
  2860. */
  2861. SuperMap.Util.getTextBounds = function (style, text, element) {
  2862. document.body.appendChild(element);
  2863. element.style.width = 'auto';
  2864. element.style.height = 'auto';
  2865. if (style.fontSize) {
  2866. element.style.fontSize = style.fontSize;
  2867. }
  2868. if (style.fontFamily) {
  2869. element.style.fontFamily = style.fontFamily;
  2870. }
  2871. if (style.fontWeight) {
  2872. element.style.fontWeight = style.fontWeight;
  2873. }
  2874. element.style.position = 'relative';
  2875. element.style.visibility = 'hidden'; //fix 在某些情况下,element内的文本变成竖起排列,导致宽度计算不正确的bug
  2876. element.style.display = 'inline-block';
  2877. element.innerHTML = text;
  2878. var textWidth = element.clientWidth;
  2879. var textHeight = element.clientHeight;
  2880. document.body.removeChild(element);
  2881. return {
  2882. textWidth: textWidth,
  2883. textHeight: textHeight
  2884. };
  2885. };
  2886. // CONCATENATED MODULE: ./src/common/commontypes/Event.js
  2887. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  2888. * This program are made available under the terms of the Apache License, Version 2.0
  2889. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  2890. /**
  2891. * @name Event
  2892. * @memberOf SuperMap
  2893. * @namespace
  2894. * @description 事件处理函数.
  2895. */
  2896. var Event = SuperMap.Event = {
  2897. /**
  2898. * @description A hash table cache of the event observers. Keyed by element._eventCacheID
  2899. * @type {boolean}
  2900. * @default false
  2901. */
  2902. observers: false,
  2903. /**
  2904. * @description KEY_SPACE
  2905. * @type {number}
  2906. * @default 32
  2907. */
  2908. KEY_SPACE: 32,
  2909. /**
  2910. * @description KEY_BACKSPACE
  2911. * @type {number}
  2912. * @default 8
  2913. */
  2914. KEY_BACKSPACE: 8,
  2915. /**
  2916. * @description KEY_TAB
  2917. * @type {number}
  2918. * @default 9
  2919. */
  2920. KEY_TAB: 9,
  2921. /**
  2922. * @description KEY_RETURN
  2923. * @type {number}
  2924. * @default 13
  2925. */
  2926. KEY_RETURN: 13,
  2927. /**
  2928. * @description KEY_ESC
  2929. * @type {number}
  2930. * @default 27
  2931. */
  2932. KEY_ESC: 27,
  2933. /**
  2934. * @description KEY_LEFT
  2935. * @type {number}
  2936. * @default 37
  2937. */
  2938. KEY_LEFT: 37,
  2939. /**
  2940. * @description KEY_UP
  2941. * @type {number}
  2942. * @default 38
  2943. */
  2944. KEY_UP: 38,
  2945. /**
  2946. * @description KEY_RIGHT
  2947. * @type {number}
  2948. * @default 39
  2949. */
  2950. KEY_RIGHT: 39,
  2951. /**
  2952. * @description KEY_DOWN
  2953. * @type {number}
  2954. * @default 40
  2955. */
  2956. KEY_DOWN: 40,
  2957. /**
  2958. * @description KEY_DELETE
  2959. * @type {number}
  2960. * @default 46
  2961. */
  2962. KEY_DELETE: 46,
  2963. /**
  2964. * @description Cross browser event element detection.
  2965. * @param {Event} event - The event
  2966. * @returns {HTMLElement} The element that caused the event
  2967. */
  2968. element: function element(event) {
  2969. return event.target || event.srcElement;
  2970. },
  2971. /**
  2972. * @description Determine whether event was caused by a single touch
  2973. * @param {Event} event - The event
  2974. * @returns {boolean}
  2975. */
  2976. isSingleTouch: function isSingleTouch(event) {
  2977. return event.touches && event.touches.length === 1;
  2978. },
  2979. /**
  2980. * @description Determine whether event was caused by a multi touch
  2981. * @param {Event} event - The event
  2982. * @returns {boolean}
  2983. */
  2984. isMultiTouch: function isMultiTouch(event) {
  2985. return event.touches && event.touches.length > 1;
  2986. },
  2987. /**
  2988. * @description Determine whether event was caused by a left click.
  2989. * @param {Event} event - The event
  2990. * @returns {boolean}
  2991. */
  2992. isLeftClick: function isLeftClick(event) {
  2993. return event.which && event.which === 1 || event.button && event.button === 1;
  2994. },
  2995. /**
  2996. * @description Determine whether event was caused by a right mouse click.
  2997. * @param {Event} event - The event
  2998. * @returns {boolean}
  2999. */
  3000. isRightClick: function isRightClick(event) {
  3001. return event.which && event.which === 3 || event.button && event.button === 2;
  3002. },
  3003. /**
  3004. * @description Stops an event from propagating.
  3005. * @param {Event} event - The event
  3006. * @param {boolean} allowDefault - If true, we stop the event chain but still allow the default browser behaviour (text selection, radio-button clicking, etc) Default false
  3007. */
  3008. stop: function stop(event, allowDefault) {
  3009. if (!allowDefault) {
  3010. if (event.preventDefault) {
  3011. event.preventDefault();
  3012. } else {
  3013. event.returnValue = false;
  3014. }
  3015. }
  3016. if (event.stopPropagation) {
  3017. event.stopPropagation();
  3018. } else {
  3019. event.cancelBubble = true;
  3020. }
  3021. },
  3022. /**
  3023. * @param {Event} event - The event。
  3024. * @param {string} tagName - html 标签名。
  3025. * @returns {HTMLElement} The first node with the given tagName, starting from the node the event was triggered on and traversing the DOM upwards
  3026. */
  3027. findElement: function findElement(event, tagName) {
  3028. var element = SuperMap.Event.element(event);
  3029. while (element.parentNode && (!element.tagName || element.tagName.toUpperCase() != tagName.toUpperCase())) {
  3030. element = element.parentNode;
  3031. }
  3032. return element;
  3033. },
  3034. /**
  3035. * @description 监听事件,注册事件处理方法。
  3036. * @param {(HTMLElement|string)} elementParam - 待监听的 DOM 对象或者其 ID 标识。
  3037. * @param {string} name - 监听事件的类别名称。
  3038. * @param {function} observer - 注册的事件处理方法。
  3039. * @param {boolean} [useCapture=false] - 是否捕获。
  3040. */
  3041. observe: function observe(elementParam, name, observer, useCapture) {
  3042. var element = Util.getElement(elementParam);
  3043. useCapture = useCapture || false;
  3044. if (name === 'keypress' && (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.attachEvent)) {
  3045. name = 'keydown';
  3046. } //if observers cache has not yet been created, create it
  3047. if (!this.observers) {
  3048. this.observers = {};
  3049. } //if not already assigned, make a new unique cache ID
  3050. if (!element._eventCacheID) {
  3051. var idPrefix = "eventCacheID_";
  3052. if (element.id) {
  3053. idPrefix = element.id + "_" + idPrefix;
  3054. }
  3055. element._eventCacheID = Util.createUniqueID(idPrefix);
  3056. }
  3057. var cacheID = element._eventCacheID; //if there is not yet a hash entry for this element, add one
  3058. if (!this.observers[cacheID]) {
  3059. this.observers[cacheID] = [];
  3060. } //add a new observer to this element's list
  3061. this.observers[cacheID].push({
  3062. 'element': element,
  3063. 'name': name,
  3064. 'observer': observer,
  3065. 'useCapture': useCapture
  3066. }); //add the actual browser event listener
  3067. if (element.addEventListener) {
  3068. if (name === 'mousewheel') {
  3069. // https://www.chromestatus.com/features/6662647093133312
  3070. element.addEventListener(name, observer, {
  3071. useCapture: useCapture,
  3072. passive: false
  3073. });
  3074. } else {
  3075. element.addEventListener(name, observer, useCapture);
  3076. }
  3077. } else if (element.attachEvent) {
  3078. element.attachEvent('on' + name, observer);
  3079. }
  3080. },
  3081. /**
  3082. * @description Given the id of an element to stop observing, cycle through the
  3083. * element's cached observers, calling stopObserving on each one,
  3084. * skipping those entries which can no longer be removed.
  3085. *
  3086. * @param {(HTMLElement|string)} elementParam -
  3087. */
  3088. stopObservingElement: function stopObservingElement(elementParam) {
  3089. var element = Util.getElement(elementParam);
  3090. var cacheID = element._eventCacheID;
  3091. this._removeElementObservers(SuperMap.Event.observers[cacheID]);
  3092. },
  3093. /**
  3094. * @param {Array.<Object>} elementObservers - Array of (element, name,
  3095. * observer, usecapture) objects,
  3096. * taken directly from hashtable
  3097. */
  3098. _removeElementObservers: function _removeElementObservers(elementObservers) {
  3099. if (elementObservers) {
  3100. for (var i = elementObservers.length - 1; i >= 0; i--) {
  3101. var entry = elementObservers[i];
  3102. var args = new Array(entry.element, entry.name, entry.observer, entry.useCapture);
  3103. SuperMap.Event.stopObserving.apply(this, args);
  3104. }
  3105. }
  3106. },
  3107. /**
  3108. * @description 移除事件监听和注册的事件处理方法。注意:事件的移除和监听相对应,移除时的各属性信息必须监听时
  3109. * 保持一致才能确保事件移除成功。
  3110. * @param {(HTMLElement|string)} elementParam - 被监听的 DOM 元素或者其 ID。
  3111. * @param {string} name - 需要移除的被监听事件名称。
  3112. * @param {function} observer - 需要移除的事件处理方法。
  3113. * @param {boolean} [useCapture=false] - 是否捕获。
  3114. * @returns {boolean} Whether or not the event observer was removed
  3115. */
  3116. stopObserving: function stopObserving(elementParam, name, observer, useCapture) {
  3117. useCapture = useCapture || false;
  3118. var element = Util.getElement(elementParam);
  3119. var cacheID = element._eventCacheID;
  3120. if (name === 'keypress') {
  3121. if (navigator.appVersion.match(/Konqueror|Safari|KHTML/) || element.detachEvent) {
  3122. name = 'keydown';
  3123. }
  3124. } // find element's entry in this.observers cache and remove it
  3125. var foundEntry = false;
  3126. var elementObservers = SuperMap.Event.observers[cacheID];
  3127. if (elementObservers) {
  3128. // find the specific event type in the element's list
  3129. var i = 0;
  3130. while (!foundEntry && i < elementObservers.length) {
  3131. var cacheEntry = elementObservers[i];
  3132. if (cacheEntry.name === name && cacheEntry.observer === observer && cacheEntry.useCapture === useCapture) {
  3133. elementObservers.splice(i, 1);
  3134. if (elementObservers.length == 0) {
  3135. delete SuperMap.Event.observers[cacheID];
  3136. }
  3137. foundEntry = true;
  3138. break;
  3139. }
  3140. i++;
  3141. }
  3142. } //actually remove the event listener from browser
  3143. if (foundEntry) {
  3144. if (element.removeEventListener) {
  3145. element.removeEventListener(name, observer, useCapture);
  3146. } else if (element && element.detachEvent) {
  3147. element.detachEvent('on' + name, observer);
  3148. }
  3149. }
  3150. return foundEntry;
  3151. },
  3152. /**
  3153. * @description Cycle through all the element entries in the events cache and call
  3154. * stopObservingElement on each.
  3155. */
  3156. unloadCache: function unloadCache() {
  3157. // check for SuperMap.Event before checking for observers, because
  3158. // SuperMap.Event may be undefined in IE if no map instance was
  3159. // created
  3160. if (SuperMap.Event && SuperMap.Event.observers) {
  3161. for (var cacheID in SuperMap.Event.observers) {
  3162. var elementObservers = SuperMap.Event.observers[cacheID];
  3163. SuperMap.Event._removeElementObservers.apply(this, [elementObservers]);
  3164. }
  3165. SuperMap.Event.observers = false;
  3166. }
  3167. },
  3168. CLASS_NAME: "SuperMap.Event"
  3169. };
  3170. SuperMap.Event = Event;
  3171. /* prevent memory leaks in IE */
  3172. SuperMap.Event.observe(window, 'unload', SuperMap.Event.unloadCache, false);
  3173. // CONCATENATED MODULE: ./src/common/commontypes/Events.js
  3174. function Events_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { Events_typeof = function _typeof(obj) { return typeof obj; }; } else { Events_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return Events_typeof(obj); }
  3175. function Events_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3176. function Events_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  3177. function Events_createClass(Constructor, protoProps, staticProps) { if (protoProps) Events_defineProperties(Constructor.prototype, protoProps); if (staticProps) Events_defineProperties(Constructor, staticProps); return Constructor; }
  3178. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  3179. * This program are made available under the terms of the Apache License, Version 2.0
  3180. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  3181. /**
  3182. * @class SuperMap.Events
  3183. * @classdesc 事件类。
  3184. * @param {Object} object - 当前事件对象被添加到的 JS 对象。
  3185. * @param {HTMLElement} element - 响应浏览器事件的 DOM 元素。
  3186. * @param {Array.<string>} eventTypes - 自定义应用事件的数组。
  3187. * @param {boolean} [fallThrough=false] - 是否允许事件处理之后向上传递(冒泡),为 false 的时候阻止事件冒泡。
  3188. * @param {Object} options - 事件对象选项。
  3189. */
  3190. var Events_Events = /*#__PURE__*/function () {
  3191. function Events(object, element, eventTypes, fallThrough, options) {
  3192. Events_classCallCheck(this, Events);
  3193. /**
  3194. * @member {Array.<string>} SuperMap.Events.prototype.BROWSER_EVENTS
  3195. * @description 支持的事件。
  3196. * @constant
  3197. * @default [
  3198. "mouseover", "mouseout","mousedown", "mouseup", "mousemove",
  3199. "click", "dblclick", "rightclick", "dblrightclick","resize",
  3200. "focus", "blur","touchstart", "touchmove", "touchend","keydown",
  3201. "MSPointerDown", "MSPointerUp", "pointerdown", "pointerup",
  3202. "MSGestureStart", "MSGestureChange", "MSGestureEnd","contextmenu"
  3203. ]
  3204. */
  3205. this.BROWSER_EVENTS = ["mouseover", "mouseout", "mousedown", "mouseup", "mousemove", "click", "dblclick", "rightclick", "dblrightclick", "resize", "focus", "blur", "touchstart", "touchmove", "touchend", "keydown", "MSPointerDown", "MSPointerUp", "pointerdown", "pointerup", "MSGestureStart", "MSGestureChange", "MSGestureEnd", "contextmenu"];
  3206. /**
  3207. * @member {Object} SuperMap.Events.prototype.listeners
  3208. * @description Hashtable of Array(function): events listener functions
  3209. */
  3210. this.listeners = {};
  3211. /**
  3212. * @member {Object} SuperMap.Events.prototype.object
  3213. * @description 发布应用程序事件的对象。
  3214. */
  3215. this.object = object;
  3216. /**
  3217. * @member {HTMLElement} SuperMap.Events.prototype.element
  3218. * @description 接受浏览器事件的 DOM 节点。
  3219. */
  3220. this.element = null;
  3221. /**
  3222. * @member {Array.<string>} SuperMap.Events.prototype.eventTypes
  3223. * @description 支持的事件类型列表。
  3224. */
  3225. this.eventTypes = [];
  3226. /**
  3227. * @member {function} SuperMap.Events.prototype.eventHandler
  3228. * @description 绑定在元素上的事件处理器对象。
  3229. */
  3230. this.eventHandler = null;
  3231. /**
  3232. * @member {boolean} [SuperMap.Events.prototype.fallThrough=false]
  3233. * @description 是否允许事件处理之后向上传递(冒泡),为 false 的时候阻止事件冒泡。
  3234. */
  3235. this.fallThrough = fallThrough;
  3236. /**
  3237. * @member {boolean} [SuperMap.Events.prototype.includeXY=false]
  3238. * @description 判断是否让 xy 属性自动创建到浏览器上的鼠标事件,一般设置为 false,如果设置为 true,鼠标事件将会在事件传递过程中自动产生 xy 属性。
  3239. * 可根据事件对象的 'evt.object' 属性在相关的事件句柄上调用 getMousePosition 函数。这个选项习惯默认为 false 的原因在于,当创建一个
  3240. * 事件对象,其主要目的是管理。在一个 div 的相对定位的鼠标事件,将其设为 true 也是有意义的。这个选项也可以用来控制是否抵消缓存。如果
  3241. * 设为 false 不抵消,如果设为 true,用 this.clearMouseCache() 清除缓存偏移(边界元素偏移,元素在页面的位置偏移)。
  3242. * @example
  3243. * function named(evt) {
  3244. * this.xy = this.object.events.getMousePosition(evt);
  3245. * }
  3246. */
  3247. this.includeXY = false;
  3248. /**
  3249. * @member {Object} SuperMap.Events.prototype.extensions
  3250. * @description 事件扩展。Keys 代表事件类型,values 代表事件对象。
  3251. * @example
  3252. * 以扩展 "foostart" 和 "fooend" 事件为例。展示替换 css 属性为 foo 的元素的 click 事件。
  3253. *
  3254. * SuperMap.Events.foostart = SuperMap.Class({
  3255. * initialize: function(target) {
  3256. * this.target = target;
  3257. * this.target.register("click", this, this.doStuff, {extension: true});
  3258. * // only required if extension provides more than one event type
  3259. * this.target.extensions["foostart"] = true;
  3260. * this.target.extensions["fooend"] = true;
  3261. * },
  3262. * destroy: function() {
  3263. * var target = this.target;
  3264. * target.unregister("click", this, this.doStuff);
  3265. * delete this.target;
  3266. * // only required if extension provides more than one event type
  3267. * delete target.extensions["foostart"];
  3268. * delete target.extensions["fooend"];
  3269. * },
  3270. * doStuff: function(evt) {
  3271. * var propagate = true;
  3272. * if (SuperMap.Event.element(evt).className === "foo") {
  3273. * propagate = false;
  3274. * var target = this.target;
  3275. * target.triggerEvent("foostart");
  3276. * window.setTimeout(function() {
  3277. * target.triggerEvent("fooend");
  3278. * }, 1000);
  3279. * }
  3280. * return propagate;
  3281. * }
  3282. * });
  3283. * // only required if extension provides more than one event type
  3284. * SuperMap.Events.fooend = SuperMap.Events.foostart;
  3285. */
  3286. this.extensions = {};
  3287. /**
  3288. * @member {Object} SuperMap.Events.prototype.extensionCount
  3289. */
  3290. this.extensionCount = {};
  3291. /**
  3292. * @member {Object} SuperMap.Events.prototype.clearMouseListener
  3293. */
  3294. this.clearMouseListener = null;
  3295. Util.extend(this, options);
  3296. if (eventTypes != null) {
  3297. for (var i = 0, len = eventTypes.length; i < len; i++) {
  3298. this.addEventType(eventTypes[i]);
  3299. }
  3300. }
  3301. if (element != null) {
  3302. this.attachToElement(element);
  3303. }
  3304. this.CLASS_NAME = "SuperMap.Events";
  3305. }
  3306. /**
  3307. * @function SuperMap.Events.prototype.destroy
  3308. * @description 移除当前要素 element 上的所有事件监听和处理。
  3309. */
  3310. Events_createClass(Events, [{
  3311. key: "destroy",
  3312. value: function destroy() {
  3313. for (var e in this.extensions) {
  3314. if (typeof this.extensions[e] !== "boolean") {
  3315. this.extensions[e].destroy();
  3316. }
  3317. }
  3318. this.extensions = null;
  3319. if (this.element) {
  3320. Event.stopObservingElement(this.element);
  3321. if (this.element.hasScrollEvent) {
  3322. Event.stopObserving(window, "scroll", this.clearMouseListener);
  3323. }
  3324. }
  3325. this.element = null;
  3326. this.listeners = null;
  3327. this.object = null;
  3328. this.eventTypes = null;
  3329. this.fallThrough = null;
  3330. this.eventHandler = null;
  3331. }
  3332. /**
  3333. * @function SuperMap.Events.prototype.addEventType
  3334. * @description 在此事件对象中添加新的事件类型,如果这个事件类型已经添加过了,则不做任何事情。
  3335. * @param {string} eventName - 事件名。
  3336. */
  3337. }, {
  3338. key: "addEventType",
  3339. value: function addEventType(eventName) {
  3340. if (!this.listeners[eventName]) {
  3341. this.eventTypes.push(eventName);
  3342. this.listeners[eventName] = [];
  3343. }
  3344. }
  3345. /**
  3346. * @function SuperMap.Events.prototype.attachToElement
  3347. * @description 给 DOM 元素绑定浏览器事件。
  3348. * @param {HTMLDOMElement} element - 绑定浏览器事件的 DOM 元素。
  3349. */
  3350. }, {
  3351. key: "attachToElement",
  3352. value: function attachToElement(element) {
  3353. if (this.element) {
  3354. Event.stopObservingElement(this.element);
  3355. } else {
  3356. // keep a bound copy of handleBrowserEvent() so that we can
  3357. // pass the same function to both Event.observe() and .stopObserving()
  3358. this.eventHandler = FunctionExt.bindAsEventListener(this.handleBrowserEvent, this); // to be used with observe and stopObserving
  3359. this.clearMouseListener = FunctionExt.bind(this.clearMouseCache, this);
  3360. }
  3361. this.element = element;
  3362. for (var i = 0, len = this.BROWSER_EVENTS.length; i < len; i++) {
  3363. var eventType = this.BROWSER_EVENTS[i]; // every browser event has a corresponding application event
  3364. // (whether it's listened for or not).
  3365. this.addEventType(eventType); // use Prototype to register the event cross-browser
  3366. Event.observe(element, eventType, this.eventHandler);
  3367. } // disable dragstart in IE so that mousedown/move/up works normally
  3368. Event.observe(element, "dragstart", Event.stop);
  3369. }
  3370. /**
  3371. * @function SuperMap.Events.prototype.on
  3372. * @description 在一个相同的范围内注册监听器的方法,此方法调用 register 函数。
  3373. * @example
  3374. * // 注册一个 "loadstart" 监听事件
  3375. * events.on({"loadstart": loadStartListener});
  3376. *
  3377. * // 同样注册一个 "loadstart" 监听事件
  3378. * events.register("loadstart", undefined, loadStartListener);
  3379. *
  3380. * // 同时为对象注册多个监听事件
  3381. * events.on({
  3382. * "loadstart": loadStartListener,
  3383. * "loadend": loadEndListener,
  3384. * scope: object
  3385. * });
  3386. *
  3387. * // 同时为对象注册多个监听事件,多次调用 register 方法
  3388. * events.register("loadstart", object, loadStartListener);
  3389. * events.register("loadend", object, loadEndListener);
  3390. *
  3391. *
  3392. * @param {Object} object - 添加监听的对象。
  3393. */
  3394. }, {
  3395. key: "on",
  3396. value: function on(object) {
  3397. for (var type in object) {
  3398. if (type !== "scope" && object.hasOwnProperty(type)) {
  3399. this.register(type, object.scope, object[type]);
  3400. }
  3401. }
  3402. }
  3403. /**
  3404. * @function SuperMap.Events.prototype.register
  3405. * @description 在事件对象上注册一个事件。当事件被触发时,'func' 函数被调用,假设我们触发一个事件,
  3406. * 指定 SuperMap.Bounds 作为 "obj",当事件被触发时,回调函数的上下文作为 Bounds 对象。
  3407. * @param {string} type - 事件注册者的名字。
  3408. * @param {Object} [obj=this.object] - 对象绑定的回调。
  3409. * @param {function} [func] - 回调函数,如果没有特定的回调,则这个函数不做任何事情。
  3410. * @param {(boolean|Object)} [priority] - 当为 true 时将新的监听加在事件队列的前面。
  3411. */
  3412. }, {
  3413. key: "register",
  3414. value: function register(type, obj, func, priority) {
  3415. if (type in Events && !this.extensions[type]) {
  3416. this.extensions[type] = new Events[type](this);
  3417. }
  3418. if (func != null && Util.indexOf(this.eventTypes, type) !== -1) {
  3419. if (obj == null) {
  3420. obj = this.object;
  3421. }
  3422. var listeners = this.listeners[type];
  3423. if (!listeners) {
  3424. listeners = [];
  3425. this.listeners[type] = listeners;
  3426. this.extensionCount[type] = 0;
  3427. }
  3428. var listener = {
  3429. obj: obj,
  3430. func: func
  3431. };
  3432. if (priority) {
  3433. listeners.splice(this.extensionCount[type], 0, listener);
  3434. if (Events_typeof(priority) === "object" && priority.extension) {
  3435. this.extensionCount[type]++;
  3436. }
  3437. } else {
  3438. listeners.push(listener);
  3439. }
  3440. }
  3441. }
  3442. /**
  3443. * @function SuperMap.Events.prototype.registerPriority
  3444. * @description 相同的注册方法,但是在前面增加新的监听者事件查询而代替到方法的结束。
  3445. * @param {string} type - 事件注册者的名字。
  3446. * @param {Object} [obj=this.object] - 对象绑定方面的回调。
  3447. * @param {function} [func] - 回调函数,如果没有特定的回调,则这个函数不做任何事情。
  3448. */
  3449. }, {
  3450. key: "registerPriority",
  3451. value: function registerPriority(type, obj, func) {
  3452. this.register(type, obj, func, true);
  3453. }
  3454. /**
  3455. * @function SuperMap.Events.prototype.un
  3456. * @description 在一个相同的范围内取消注册监听器的方法,此方法调用 unregister 函数。
  3457. * @example
  3458. * // 移除 "loadstart" 事件监听
  3459. * events.un({"loadstart": loadStartListener});
  3460. *
  3461. * // 使用 "unregister" 方法移除 "loadstart" 事件监听
  3462. * events.unregister("loadstart", undefined, loadStartListener);
  3463. *
  3464. * // 取消对象多个事件监听
  3465. * events.un({
  3466. * "loadstart": loadStartListener,
  3467. * "loadend": loadEndListener,
  3468. * scope: object
  3469. * });
  3470. *
  3471. * // 取消对象多个事件监听,多次调用unregister方法。
  3472. * events.unregister("loadstart", object, loadStartListener);
  3473. * events.unregister("loadend", object, loadEndListener);
  3474. *
  3475. * @param {Object} object - 移除监听的对象。
  3476. */
  3477. }, {
  3478. key: "un",
  3479. value: function un(object) {
  3480. for (var type in object) {
  3481. if (type !== "scope" && object.hasOwnProperty(type)) {
  3482. this.unregister(type, object.scope, object[type]);
  3483. }
  3484. }
  3485. }
  3486. /**
  3487. * @function SuperMap.Events.prototype.unregister
  3488. * @description 取消注册。
  3489. * @param {string} type - 事件类型。
  3490. * @param {Object} [obj=this.object] - 对象绑定方面的回调。
  3491. * @param {function} [func] - 回调函数,如果没有特定的回调,则这个函数不做任何事情。
  3492. */
  3493. }, {
  3494. key: "unregister",
  3495. value: function unregister(type, obj, func) {
  3496. if (obj == null) {
  3497. obj = this.object;
  3498. }
  3499. var listeners = this.listeners[type];
  3500. if (listeners != null) {
  3501. for (var i = 0, len = listeners.length; i < len; i++) {
  3502. if (listeners[i].obj === obj && listeners[i].func === func) {
  3503. listeners.splice(i, 1);
  3504. break;
  3505. }
  3506. }
  3507. }
  3508. }
  3509. /**
  3510. * @function SuperMap.Events.prototype.remove
  3511. * @description 删除某个事件类型的所有监听,如果该事件类型没有注册,则不做任何操作。
  3512. * @param {string} type - 事件类型。
  3513. */
  3514. }, {
  3515. key: "remove",
  3516. value: function remove(type) {
  3517. if (this.listeners[type] != null) {
  3518. this.listeners[type] = [];
  3519. }
  3520. }
  3521. /**
  3522. * @function SuperMap.Events.prototype.triggerEvent
  3523. * @description 触发一个特定的注册事件。
  3524. * @param {string} type - 触发事件类型。
  3525. * @param {Event} evt - 事件对象。
  3526. * @returns {boolean} 返回监听对象,如果返回是 false,则停止监听。
  3527. */
  3528. }, {
  3529. key: "triggerEvent",
  3530. value: function triggerEvent(type, evt) {
  3531. var listeners = this.listeners[type]; // fast path
  3532. if (!listeners || listeners.length == 0) {
  3533. return undefined;
  3534. } // prep evt object with object & div references
  3535. if (evt == null) {
  3536. evt = {};
  3537. }
  3538. evt.object = this.object;
  3539. evt.element = this.element;
  3540. if (!evt.type) {
  3541. evt.type = type;
  3542. } // execute all callbacks registered for specified type
  3543. // get a clone of the listeners array to
  3544. // allow for splicing during callbacks
  3545. listeners = listeners.slice();
  3546. var continueChain;
  3547. for (var i = 0, len = listeners.length; i < len; i++) {
  3548. var callback = listeners[i]; // bind the context to callback.obj
  3549. continueChain = callback.func.apply(callback.obj, [evt]);
  3550. if (continueChain != undefined && continueChain === false) {
  3551. // if callback returns false, execute no more callbacks.
  3552. break;
  3553. }
  3554. } // don't fall through to other DOM elements
  3555. if (!this.fallThrough) {
  3556. Event.stop(evt, true);
  3557. }
  3558. return continueChain;
  3559. }
  3560. /**
  3561. * @function SuperMap.Events.prototype.handleBrowserEvent
  3562. * @description 对 triggerEvent 函数的包装,给事件对象设置了 xy 属性(即当前鼠标点的 xy 坐标)。
  3563. * @param {Event} evt - 事件对象。
  3564. */
  3565. }, {
  3566. key: "handleBrowserEvent",
  3567. value: function handleBrowserEvent(evt) {
  3568. var type = evt.type,
  3569. listeners = this.listeners[type];
  3570. if (!listeners || listeners.length == 0) {
  3571. // noone's listening, bail out
  3572. return;
  3573. } // add clientX & clientY to all events - corresponds to average x, y
  3574. var touches = evt.touches;
  3575. if (touches && touches[0]) {
  3576. var x = 0;
  3577. var y = 0;
  3578. var num = touches.length;
  3579. var touch;
  3580. for (var i = 0; i < num; ++i) {
  3581. touch = touches[i];
  3582. x += touch.clientX;
  3583. y += touch.clientY;
  3584. }
  3585. evt.clientX = x / num;
  3586. evt.clientY = y / num;
  3587. }
  3588. if (this.includeXY) {
  3589. evt.xy = this.getMousePosition(evt);
  3590. }
  3591. this.triggerEvent(type, evt);
  3592. }
  3593. /**
  3594. * @function SuperMap.Events.prototype.clearMouseCache
  3595. * @description 清除鼠标缓存。
  3596. */
  3597. }, {
  3598. key: "clearMouseCache",
  3599. value: function clearMouseCache() {
  3600. this.element.scrolls = null;
  3601. this.element.lefttop = null;
  3602. var body = document.body;
  3603. if (body && !((body.scrollTop != 0 || body.scrollLeft != 0) && navigator.userAgent.match(/iPhone/i))) {
  3604. this.element.offsets = null;
  3605. }
  3606. }
  3607. /**
  3608. * @function SuperMap.Events.prototype.getMousePosition
  3609. * @param {Event} evt - 事件对象。
  3610. * @returns {SuperMap.Pixel} 当前的鼠标的 xy 坐标点。
  3611. */
  3612. }, {
  3613. key: "getMousePosition",
  3614. value: function getMousePosition(evt) {
  3615. if (!this.includeXY) {
  3616. this.clearMouseCache();
  3617. } else if (!this.element.hasScrollEvent) {
  3618. Event.observe(window, "scroll", this.clearMouseListener);
  3619. this.element.hasScrollEvent = true;
  3620. }
  3621. if (!this.element.scrolls) {
  3622. var viewportElement = Util.getViewportElement();
  3623. this.element.scrolls = [viewportElement.scrollLeft, viewportElement.scrollTop];
  3624. }
  3625. if (!this.element.lefttop) {
  3626. this.element.lefttop = [document.documentElement.clientLeft || 0, document.documentElement.clientTop || 0];
  3627. }
  3628. if (!this.element.offsets) {
  3629. this.element.offsets = Util.pagePosition(this.element);
  3630. }
  3631. return new Pixel_Pixel(evt.clientX + this.element.scrolls[0] - this.element.offsets[0] - this.element.lefttop[0], evt.clientY + this.element.scrolls[1] - this.element.offsets[1] - this.element.lefttop[1]);
  3632. }
  3633. }]);
  3634. return Events;
  3635. }();
  3636. SuperMap.Events = Events_Events;
  3637. SuperMap.Events.prototype.BROWSER_EVENTS = ["mouseover", "mouseout", "mousedown", "mouseup", "mousemove", "click", "dblclick", "rightclick", "dblrightclick", "resize", "focus", "blur", "touchstart", "touchmove", "touchend", "keydown", "MSPointerDown", "MSPointerUp", "pointerdown", "pointerup", "MSGestureStart", "MSGestureChange", "MSGestureEnd", "contextmenu"];
  3638. // EXTERNAL MODULE: external "function(){try{return elasticsearch}catch(e){return {}}}()"
  3639. var external_function_try_return_elasticsearch_catch_e_return_ = __webpack_require__(3);
  3640. var external_function_try_return_elasticsearch_catch_e_return_default = /*#__PURE__*/__webpack_require__.n(external_function_try_return_elasticsearch_catch_e_return_);
  3641. // CONCATENATED MODULE: ./src/common/thirdparty/elasticsearch/ElasticSearch.js
  3642. function ElasticSearch_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  3643. function ElasticSearch_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  3644. function ElasticSearch_createClass(Constructor, protoProps, staticProps) { if (protoProps) ElasticSearch_defineProperties(Constructor.prototype, protoProps); if (staticProps) ElasticSearch_defineProperties(Constructor, staticProps); return Constructor; }
  3645. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  3646. * This program are made available under the terms of the Apache License, Version 2.0
  3647. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  3648. /**
  3649. * @class SuperMap.ElasticSearch
  3650. * @classdesc ElasticSearch服务类。
  3651. * @category ElasticSearch
  3652. * @param {string} url - ElasticSearch服务地址。
  3653. * @param {Object} options - 参数。
  3654. * @param {function} [options.change] - 服务器返回数据后执行的函数。废弃,不建议使用。使用search或msearch方法。
  3655. * @param {boolean} [options.openGeoFence=false] - 是否开启地理围栏验证,默认为不开启。
  3656. * @param {function} [options.outOfGeoFence] - 数据超出地理围栏后执行的函数。
  3657. * @param {Object} [options.geoFence] - 地理围栏。
  3658. */
  3659. var ElasticSearch_ElasticSearch = /*#__PURE__*/function () {
  3660. function ElasticSearch(url, options) {
  3661. ElasticSearch_classCallCheck(this, ElasticSearch);
  3662. options = options || {};
  3663. /**
  3664. * @member {string} SuperMap.ElasticSearch.prototype.url
  3665. * @description ElasticSearch服务地址
  3666. */
  3667. this.url = url;
  3668. /**
  3669. * @member {Object} SuperMap.ElasticSearch.prototype.client
  3670. * @description client ES客户端
  3671. */
  3672. this.client = new external_function_try_return_elasticsearch_catch_e_return_default.a.Client({
  3673. host: this.url
  3674. });
  3675. /**
  3676. * @deprecated
  3677. * @member {function} [SuperMap.ElasticSearch.prototype.change]
  3678. * @description 服务器返回数据后执行的函数。废弃,不建议使用。使用search或msearch方法。
  3679. */
  3680. this.change = null;
  3681. /**
  3682. * @member {boolean} [SuperMap.ElasticSearch.prototype.openGeoFence=false]
  3683. * @description 是否开启地理围栏验证,默认为不开启。
  3684. */
  3685. this.openGeoFence = false;
  3686. /**
  3687. * @member {function} [SuperMap.ElasticSearch.prototype.outOfGeoFence]
  3688. * @description 数据超出地理围栏后执行的函数
  3689. */
  3690. this.outOfGeoFence = null;
  3691. /**
  3692. * @member {Object} [SuperMap.ElasticSearch.prototype.geoFence]
  3693. * @description 地理围栏
  3694. * @example {
  3695. * radius: 1000,//单位是m
  3696. * center: [104.40, 30.43],
  3697. * unit: 'meter|degree'
  3698. * }
  3699. */
  3700. this.geoFence = null;
  3701. /*
  3702. * Constant: EVENT_TYPES
  3703. * {Array.<String>}
  3704. * 此类支持的事件类型。
  3705. *
  3706. */
  3707. this.EVENT_TYPES = ['change', 'error', 'outOfGeoFence'];
  3708. /**
  3709. * @member {SuperMap.Events} SuperMap.ElasticSearch.prototype.events
  3710. * @description 事件
  3711. */
  3712. this.events = new Events_Events(this, null, this.EVENT_TYPES);
  3713. /**
  3714. * @member {Object} SuperMap.ElasticSearch.prototype.eventListeners
  3715. * @description 听器对象,在构造函数中设置此参数(可选),对 MapService 支持的两个事件 processCompleted 、processFailed 进行监听,
  3716. * 相当于调用 SuperMap.Events.on(eventListeners)。
  3717. */
  3718. this.eventListeners = null;
  3719. Util.extend(this, options);
  3720. if (this.eventListeners instanceof Object) {
  3721. this.events.on(this.eventListeners);
  3722. }
  3723. }
  3724. /**
  3725. * @function SuperMap.ElasticSearch.prototype.setGeoFence
  3726. * @description 设置地理围栏,openGeoFence参数为true的时候,设置的地理围栏才生效。
  3727. * @param {SuperMap.Geometry} geoFence - 地理围栏。
  3728. */
  3729. ElasticSearch_createClass(ElasticSearch, [{
  3730. key: "setGeoFence",
  3731. value: function setGeoFence(geoFence) {
  3732. this.geoFence = geoFence;
  3733. }
  3734. /**
  3735. * @function SuperMap.ElasticSearch.prototype.bulk
  3736. * @description 批量操作API,允许执行多个索引/删除操作。
  3737. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-bulk}</br>
  3738. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html}</br>
  3739. * @param {Object} params - 参数。
  3740. * @param {function} callback - 回调函数。
  3741. */
  3742. }, {
  3743. key: "bulk",
  3744. value: function bulk(params, callback) {
  3745. return this.client.bulk(params, callback);
  3746. }
  3747. /**
  3748. * @function SuperMap.ElasticSearch.prototype.clearScroll
  3749. * @description 通过指定scroll参数进行查询来清除已经创建的scroll请求。
  3750. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-clearscroll}</br>
  3751. *更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html}</br>
  3752. * @param {Object} params - 参数。
  3753. * @param {function} callback - 回调函数。
  3754. */
  3755. }, {
  3756. key: "clearScroll",
  3757. value: function clearScroll(params, callback) {
  3758. return this.client.clearScroll(params, callback);
  3759. }
  3760. /**
  3761. * @function SuperMap.ElasticSearch.prototype.count
  3762. * @description 获取集群、索引、类型或查询的文档个数。
  3763. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-count}</br>
  3764. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-count.html}</br>
  3765. * @param {Object} params - 参数。
  3766. * @param {function} callback - 回调函数。
  3767. */
  3768. }, {
  3769. key: "count",
  3770. value: function count(params, callback) {
  3771. return this.client.count(params, callback);
  3772. }
  3773. /**
  3774. * @function SuperMap.ElasticSearch.prototype.count
  3775. * @description 在特定索引中添加一个类型化的JSON文档,使其可搜索。如果具有相同index,type且id已经存在的文档将发生错误。</br>
  3776. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-create}
  3777. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html}
  3778. * @param {Object} params - 参数。
  3779. * @param {function} callback - 回调函数。
  3780. */
  3781. }, {
  3782. key: "create",
  3783. value: function create(params, callback) {
  3784. return this.client.create(params, callback);
  3785. }
  3786. /**
  3787. * @function SuperMap.ElasticSearch.prototype.delete
  3788. * @description 根据其ID从特定索引中删除键入的JSON文档。
  3789. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-delete}</br>
  3790. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete.html}</br>
  3791. * @param {Object} params - 参数。
  3792. * @param {function} callback - 回调函数。
  3793. */
  3794. }, {
  3795. key: "delete",
  3796. value: function _delete(params, callback) {
  3797. return this.client["delete"](params, callback);
  3798. }
  3799. /**
  3800. * @function SuperMap.ElasticSearch.prototype.delete
  3801. * @description 根据其ID从特定索引中删除键入的JSON文档。
  3802. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletebyquery}</br>
  3803. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-delete-by-query.html}</br>
  3804. * @param {Object} params - 参数。
  3805. * @param {function} callback - 回调函数。
  3806. */
  3807. }, {
  3808. key: "deleteByQuery",
  3809. value: function deleteByQuery(params, callback) {
  3810. return this.client.deleteByQuery(params, callback);
  3811. }
  3812. /**
  3813. * @function SuperMap.ElasticSearch.prototype.delete
  3814. * @description 根据其ID删除脚本。</br>
  3815. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletescript}</br>
  3816. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html}</br>
  3817. * @param {Object} params - 参数。
  3818. * @param {function} callback - 回调函数。
  3819. */
  3820. }, {
  3821. key: "deleteScript",
  3822. value: function deleteScript(params, callback) {
  3823. return this.client.deleteScript(params, callback);
  3824. }
  3825. /**
  3826. * @function SuperMap.ElasticSearch.prototype.deleteTemplate
  3827. * @description 根据其ID删除模板。</br>
  3828. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-deletetemplate}</br>
  3829. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}</br>
  3830. * @param {Object} params - 参数。
  3831. * @param {function} callback - 回调函数。
  3832. */
  3833. }, {
  3834. key: "deleteTemplate",
  3835. value: function deleteTemplate(params, callback) {
  3836. return this.client.deleteTemplate(params, callback);
  3837. }
  3838. /**
  3839. * @function SuperMap.ElasticSearch.prototype.exists
  3840. * @description 检查给定文档是否存在。</br>
  3841. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-exists}</br>
  3842. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html}</br>
  3843. * @param {Object} params - 参数。
  3844. * @param {function} callback - 回调函数。
  3845. */
  3846. }, {
  3847. key: "exists",
  3848. value: function exists(params, callback) {
  3849. return this.client.exists(params, callback);
  3850. }
  3851. /**
  3852. * @function SuperMap.ElasticSearch.prototype.existsSource
  3853. * @description 检查资源是否存在。</br>
  3854. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-existssource}</br>
  3855. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html}</br>
  3856. * @param {Object} params - 参数。
  3857. * @param {function} callback - 回调函数。
  3858. */
  3859. }, {
  3860. key: "existsSource",
  3861. value: function existsSource(params, callback) {
  3862. return this.client.existsSource(params, callback);
  3863. }
  3864. /**
  3865. * @function SuperMap.ElasticSearch.prototype.explain
  3866. * @description 提供与特定查询相关的特定文档分数的详细信息。它还会告诉您文档是否与指定的查询匹配。</br>
  3867. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-explain}</br>
  3868. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-explain.html}</br>
  3869. * @param {Object} params - 参数。
  3870. * @param {function} callback - 回调函数。
  3871. */
  3872. }, {
  3873. key: "explain",
  3874. value: function explain(params, callback) {
  3875. return this.client.explain(params, callback);
  3876. }
  3877. /**
  3878. * @function SuperMap.ElasticSearch.prototype.fieldCaps
  3879. * @description 允许检索多个索引之间的字段的功能。(实验性API,可能会在未来版本中删除)</br>
  3880. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-fieldcaps}</br>
  3881. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-field-caps.html}</br>
  3882. * @param {Object} params - 参数。
  3883. * @param {function} callback - 回调函数。
  3884. */
  3885. }, {
  3886. key: "fieldCaps",
  3887. value: function fieldCaps(params, callback) {
  3888. return this.client.fieldCaps(params, callback);
  3889. }
  3890. /**
  3891. * @function SuperMap.ElasticSearch.prototype.get
  3892. * @description 从索引获取一个基于其id的类型的JSON文档。</br>
  3893. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-get}</br>
  3894. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html}</br>
  3895. * @param {Object} params - 参数。
  3896. * @param {function} callback - 回调函数。
  3897. */
  3898. }, {
  3899. key: "get",
  3900. value: function get(params, callback) {
  3901. return this.client.get(params, callback);
  3902. }
  3903. /**
  3904. * @function SuperMap.ElasticSearch.prototype.getScript
  3905. * @description 获取脚本。</br>
  3906. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-getscript}</br>
  3907. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html}</br>
  3908. * @param {Object} params - 参数。
  3909. * @param {function} callback - 回调函数。
  3910. */
  3911. }, {
  3912. key: "getScript",
  3913. value: function getScript(params, callback) {
  3914. return this.client.getScript(params, callback);
  3915. }
  3916. /**
  3917. * @function SuperMap.ElasticSearch.prototype.getSource
  3918. * @description 通过索引,类型和ID获取文档的源。</br>
  3919. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-getsource}</br>
  3920. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-get.html}</br>
  3921. * @param {Object} params - 参数。
  3922. * @param {function} callback - 回调函数。
  3923. */
  3924. }, {
  3925. key: "getSource",
  3926. value: function getSource(params, callback) {
  3927. return this.client.getSource(params, callback);
  3928. }
  3929. /**
  3930. * @function SuperMap.ElasticSearch.prototype.getTemplate
  3931. * @description 获取模板。</br>
  3932. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-gettemplate}</br>
  3933. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}</br>
  3934. * @param {Object} params - 参数。
  3935. * @param {function} callback - 回调函数。
  3936. */
  3937. }, {
  3938. key: "getTemplate",
  3939. value: function getTemplate(params, callback) {
  3940. return this.client.getTemplate(params, callback);
  3941. }
  3942. /**
  3943. * @function SuperMap.ElasticSearch.prototype.index
  3944. * @description 在索引中存储一个键入的JSON文档,使其可搜索。</br>
  3945. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-index}</br>
  3946. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-index_.html}</br>
  3947. * @param {Object} params - 参数。
  3948. * @param {function} callback - 回调函数。
  3949. */
  3950. }, {
  3951. key: "index",
  3952. value: function index(params, callback) {
  3953. return this.client.index(params, callback);
  3954. }
  3955. /**
  3956. * @function SuperMap.ElasticSearch.prototype.info
  3957. * @description 从当前集群获取基本信息。</br>
  3958. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-info}</br>
  3959. * 更多信息参考 {@link https://www.elastic.co/guide/index.html}</br>
  3960. * @param {Object} params - 参数。
  3961. * @param {function} callback - 回调函数。
  3962. */
  3963. }, {
  3964. key: "info",
  3965. value: function info(params, callback) {
  3966. return this.client.info(params, callback);
  3967. }
  3968. /**
  3969. * @function SuperMap.ElasticSearch.prototype.mget
  3970. * @description 根据索引,类型(可选)和ids来获取多个文档。mget所需的主体可以采用两种形式:文档位置数组或文档ID数组。</br>
  3971. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-mget}</br>
  3972. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-get.html}</br>
  3973. * @param {Object} params - 参数。
  3974. * @param {function} callback - 回调函数。
  3975. */
  3976. }, {
  3977. key: "mget",
  3978. value: function mget(params, callback) {
  3979. return this.client.mget(params, callback);
  3980. }
  3981. /**
  3982. * @function SuperMap.ElasticSearch.prototype.msearch
  3983. * @description 在同一请求中执行多个搜索请求。</br>
  3984. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-msearch}</br>
  3985. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-multi-search.html}</br>
  3986. * @param {Object} params - 参数。
  3987. * @param {function} callback - 请求返回的回调函数。也可以使用then表达式获取返回结果。
  3988. * 回调参数:error,response。结果存储在response.responses中
  3989. */
  3990. }, {
  3991. key: "msearch",
  3992. value: function msearch(params, callback) {
  3993. var me = this;
  3994. return me.client.msearch(params).then(function (resp) {
  3995. me._update(resp.responses, callback);
  3996. return resp;
  3997. }, function (err) {
  3998. callback(err);
  3999. me.events.triggerEvent('error', {
  4000. error: err
  4001. });
  4002. return err;
  4003. });
  4004. }
  4005. /**
  4006. * @function SuperMap.ElasticSearch.prototype.msearchTemplate
  4007. * @description 在同一请求中执行多个搜索模板请求。</br>
  4008. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-msearchtemplate}</br>
  4009. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}</br>
  4010. * @param {Object} params - 参数。
  4011. * @param {function} callback - 回调函数。
  4012. */
  4013. }, {
  4014. key: "msearchTemplate",
  4015. value: function msearchTemplate(params, callback) {
  4016. return this.client.msearchTemplate(params, callback);
  4017. }
  4018. /**
  4019. * @function SuperMap.ElasticSearch.prototype.mtermvectors
  4020. * @description 多termvectors API允许一次获得多个termvectors。</br>
  4021. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-mtermvectors}</br>
  4022. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-multi-termvectors.html}</br>
  4023. * @param {Object} params - 参数。
  4024. * @param {function} callback - 回调函数。
  4025. */
  4026. }, {
  4027. key: "mtermvectors",
  4028. value: function mtermvectors(params, callback) {
  4029. return this.client.mtermvectors(params, callback);
  4030. }
  4031. /**
  4032. * @function SuperMap.ElasticSearch.prototype.ping
  4033. * @description 测试连接。</br>
  4034. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-ping}</br>
  4035. * 更多信息参考 {@link https://www.elastic.co/guide/index.html}</br>
  4036. * @param {Object} params - 参数。
  4037. * @param {function} callback - 回调函数。
  4038. */
  4039. }, {
  4040. key: "ping",
  4041. value: function ping(params, callback) {
  4042. return this.client.ping(params, callback);
  4043. }
  4044. /**
  4045. * @function SuperMap.ElasticSearch.prototype.putScript
  4046. * @description 添加脚本。</br>
  4047. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-putscript}</br>
  4048. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-scripting.html}</br>
  4049. * @param {Object} params - 参数。
  4050. * @param {function} callback - 回调函数。
  4051. */
  4052. }, {
  4053. key: "putScript",
  4054. value: function putScript(params, callback) {
  4055. return this.client.putScript(params, callback);
  4056. }
  4057. /**
  4058. * @function SuperMap.ElasticSearch.prototype.putTemplate
  4059. * @description 添加模板。</br>
  4060. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-puttemplate}</br>
  4061. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}</br>
  4062. * @param {Object} params - 参数。
  4063. * @param {function} callback - 回调函数。
  4064. */
  4065. }, {
  4066. key: "putTemplate",
  4067. value: function putTemplate(params, callback) {
  4068. return this.client.putTemplate(params, callback);
  4069. }
  4070. /**
  4071. * @function SuperMap.ElasticSearch.prototype.reindex
  4072. * @description 重新索引。</br>
  4073. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-reindex}</br>
  4074. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html}</br>
  4075. * @param {Object} params - 参数。
  4076. * @param {function} callback - 回调函数。
  4077. */
  4078. }, {
  4079. key: "reindex",
  4080. value: function reindex(params, callback) {
  4081. return this.client.reindex(params, callback);
  4082. }
  4083. /**
  4084. * @function SuperMap.ElasticSearch.prototype.reindexRessrottle
  4085. * @description 重新索引。</br>
  4086. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-reindexrethrottle}</br>
  4087. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-reindex.html}</br>
  4088. * @param {Object} params - 参数。
  4089. * @param {function} callback - 回调函数。
  4090. */
  4091. }, {
  4092. key: "reindexRessrottle",
  4093. value: function reindexRessrottle(params, callback) {
  4094. return this.client.reindexRessrottle(params, callback);
  4095. }
  4096. /**
  4097. * @function SuperMap.ElasticSearch.prototype.renderSearchTemplate
  4098. * @description 搜索模板。</br>
  4099. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-rendersearchtemplate}</br>
  4100. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-template.html}</br>
  4101. * @param {Object} params - 参数。
  4102. * @param {function} callback - 回调函数。
  4103. */
  4104. }, {
  4105. key: "renderSearchTemplate",
  4106. value: function renderSearchTemplate(params, callback) {
  4107. return this.client.renderSearchTemplate(params, callback);
  4108. }
  4109. /**
  4110. * @function SuperMap.ElasticSearch.prototype.scroll
  4111. * @description 在search()调用中指定滚动参数之后,滚动搜索请求(检索下一组结果)。</br>
  4112. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-scroll}</br>
  4113. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-request-scroll.html}</br>
  4114. * @param {Object} params - 参数。
  4115. * @param {function} callback - 回调函数。
  4116. */
  4117. }, {
  4118. key: "scroll",
  4119. value: function scroll(params, callback) {
  4120. return this.client.scroll(params, callback);
  4121. }
  4122. /**
  4123. * @function SuperMap.ElasticSearch.prototype.search
  4124. * @description 在search()调用中指定滚动参数之后,滚动搜索请求(检索下一组结果)。
  4125. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-search}</br>
  4126. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-search.html}</br>
  4127. * @param {Object} params - 参数。
  4128. * @param {function} callback - 请求返回的回调函数。也可以使用then表达式获取返回结果。
  4129. * 回调参数:error,response,结果存储在response.responses中
  4130. */
  4131. }, {
  4132. key: "search",
  4133. value: function search(params, callback) {
  4134. var me = this;
  4135. return me.client.search(params).then(function (resp) {
  4136. me._update(resp.responses, callback);
  4137. return resp;
  4138. }, function (err) {
  4139. callback(err);
  4140. me.events.triggerEvent('error', {
  4141. error: err
  4142. });
  4143. return err;
  4144. });
  4145. }
  4146. /**
  4147. * @function SuperMap.ElasticSearch.prototype.searchShards
  4148. * @description 返回要执行搜索请求的索引和分片。
  4149. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-searchshards}</br>
  4150. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-shards.html}</br>
  4151. * @param {Object} params - 参数。
  4152. * @param {function} callback - 回调函数。
  4153. */
  4154. }, {
  4155. key: "searchShards",
  4156. value: function searchShards(params, callback) {
  4157. return this.client.searchShards(params, callback);
  4158. }
  4159. /**
  4160. * @function SuperMap.ElasticSearch.prototype.searchTemplate
  4161. * @description 搜索模板。
  4162. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-searchtemplate}</br>
  4163. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html}</br>
  4164. * @param {Object} params - 参数。
  4165. * @param {function} callback - 回调函数。
  4166. */
  4167. }, {
  4168. key: "searchTemplate",
  4169. value: function searchTemplate(params, callback) {
  4170. return this.client.searchTemplate(params, callback);
  4171. }
  4172. /**
  4173. * @function SuperMap.ElasticSearch.prototype.suggest
  4174. * @description 该建议功能通过使用特定的建议者,基于所提供的文本来建议类似的术语。
  4175. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-suggest}</br>
  4176. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/search-suggesters.html}</br>
  4177. * @param {Object} params - 参数。
  4178. * @param {function} callback - 回调函数。
  4179. */
  4180. }, {
  4181. key: "suggest",
  4182. value: function suggest(params, callback) {
  4183. return this.client.suggest(params, callback);
  4184. }
  4185. /**
  4186. * @function SuperMap.ElasticSearch.prototype.termvectors
  4187. * @description 返回有关特定文档字段中的术语的信息和统计信息。
  4188. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-termvectors}</br>
  4189. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-termvectors.html}</br>
  4190. * @param {Object} params - 参数。
  4191. * @param {function} callback - 回调函数。
  4192. */
  4193. }, {
  4194. key: "termvectors",
  4195. value: function termvectors(params, callback) {
  4196. return this.client.termvectors(params, callback);
  4197. }
  4198. /**
  4199. * @function SuperMap.ElasticSearch.prototype.update
  4200. * @description 更新文档的部分。
  4201. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-update}</br>
  4202. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update.html}</br>
  4203. * @param {Object} params - 参数。
  4204. * @param {function} callback - 回调函数。
  4205. */
  4206. }, {
  4207. key: "update",
  4208. value: function update(params, callback) {
  4209. return this.client.update(params, callback);
  4210. }
  4211. /**
  4212. * @function SuperMap.ElasticSearch.prototype.update
  4213. * @description 通过查询API来更新文档。
  4214. * 参数设置参考 {@link https://www.elastic.co/guide/en/elasticsearch/client/javascript-api/current/api-reference.html#api-updatebyquery}</br>
  4215. * 更多信息参考 {@link https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-update-by-query.html}</br>
  4216. * @param {Object} params - 参数。
  4217. * @param {function} callback - 回调函数。
  4218. */
  4219. }, {
  4220. key: "updateByQuery",
  4221. value: function updateByQuery(params, callback) {
  4222. return this.client.updateByQuery(params, callback);
  4223. }
  4224. }, {
  4225. key: "_update",
  4226. value: function _update(data, callback) {
  4227. var me = this;
  4228. if (!data) {
  4229. return;
  4230. }
  4231. me.data = data;
  4232. if (me.openGeoFence && me.geoFence) {
  4233. me._validateDatas(data);
  4234. }
  4235. me.events.triggerEvent('change', {
  4236. data: me.data
  4237. }); //change方法已废弃,不建议使用。建议使用search方法的第二个参数传入请求成功的回调
  4238. if (me.change) {
  4239. me.change && me.change(data);
  4240. } else {
  4241. //加responses是为了保持跟原来es自身的数据结构一致
  4242. callback && callback(undefined, {
  4243. responses: data
  4244. });
  4245. }
  4246. }
  4247. }, {
  4248. key: "_validateDatas",
  4249. value: function _validateDatas(datas) {
  4250. if (!datas) {
  4251. return;
  4252. }
  4253. if (!(datas instanceof Array)) {
  4254. datas = [datas];
  4255. }
  4256. var i,
  4257. len = datas.length;
  4258. for (i = 0; i < len; i++) {
  4259. this._validateData(datas[i]);
  4260. }
  4261. }
  4262. }, {
  4263. key: "_validateData",
  4264. value: function _validateData(data) {
  4265. var me = this;
  4266. data.hits.hits.map(function (source) {
  4267. var content = source._source;
  4268. var meterUnit = me._getMeterPerMapUnit(me.geoFence.unit);
  4269. var geoFenceCX = me.geoFence.center[0] * meterUnit;
  4270. var geoFenceCY = me.geoFence.center[1] * meterUnit;
  4271. var contentX = content.x * meterUnit;
  4272. var contentY = content.y * meterUnit;
  4273. var distance = me._distance(contentX, contentY, geoFenceCX, geoFenceCY);
  4274. var radius = me.geoFence.radius;
  4275. if (distance > radius) {
  4276. me.outOfGeoFence && me.outOfGeoFence(data);
  4277. me.events.triggerEvent('outOfGeoFence', {
  4278. data: data
  4279. });
  4280. }
  4281. return source;
  4282. });
  4283. }
  4284. }, {
  4285. key: "_distance",
  4286. value: function _distance(x1, y1, x2, y2) {
  4287. return Math.sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2));
  4288. }
  4289. }, {
  4290. key: "_getMeterPerMapUnit",
  4291. value: function _getMeterPerMapUnit(mapUnit) {
  4292. var earchRadiusInMeters = 6378137;
  4293. var meterPerMapUnit;
  4294. if (mapUnit === 'meter') {
  4295. meterPerMapUnit = 1;
  4296. } else if (mapUnit === 'degree') {
  4297. // 每度表示多少米。
  4298. meterPerMapUnit = Math.PI * 2 * earchRadiusInMeters / 360;
  4299. }
  4300. return meterPerMapUnit;
  4301. }
  4302. }]);
  4303. return ElasticSearch;
  4304. }();
  4305. SuperMap.ElasticSearch = ElasticSearch_ElasticSearch;
  4306. // EXTERNAL MODULE: ./node_modules/promise-polyfill/dist/polyfill.js
  4307. var polyfill = __webpack_require__(4);
  4308. // EXTERNAL MODULE: ./node_modules/fetch-ie8/fetch.js
  4309. var fetch = __webpack_require__(8);
  4310. // EXTERNAL MODULE: ./node_modules/fetch-jsonp/build/fetch-jsonp.js
  4311. var fetch_jsonp = __webpack_require__(2);
  4312. var fetch_jsonp_default = /*#__PURE__*/__webpack_require__.n(fetch_jsonp);
  4313. // CONCATENATED MODULE: ./src/common/util/FetchRequest.js
  4314. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  4315. * This program are made available under the terms of the Apache License, Version 2.0
  4316. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  4317. var FetchRequest_fetch = window.fetch;
  4318. var setFetch = function setFetch(newFetch) {
  4319. FetchRequest_fetch = newFetch;
  4320. };
  4321. /**
  4322. * @function SuperMap.setCORS
  4323. * @description 设置是否允许跨域请求,全局配置,优先级低于 service 下的 crossOring 参数。
  4324. * @param {boolean} cors - 是否允许跨域请求。
  4325. */
  4326. var setCORS = SuperMap.setCORS = function (cors) {
  4327. SuperMap.CORS = cors;
  4328. };
  4329. /**
  4330. * @function SuperMap.isCORS
  4331. * @description 是是否允许跨域请求。
  4332. * @returns {boolean} 是否允许跨域请求。
  4333. */
  4334. var isCORS = SuperMap.isCORS = function () {
  4335. if (SuperMap.CORS != undefined) {
  4336. return SuperMap.CORS;
  4337. }
  4338. return window.XMLHttpRequest && 'withCredentials' in new window.XMLHttpRequest();
  4339. };
  4340. /**
  4341. * @function SuperMap.setRequestTimeout
  4342. * @description 设置请求超时时间。
  4343. * @param {number} [timeout=45] - 请求超时时间,单位秒。
  4344. */
  4345. var setRequestTimeout = SuperMap.setRequestTimeout = function (timeout) {
  4346. return SuperMap.RequestTimeout = timeout;
  4347. };
  4348. /**
  4349. * @function SuperMap.getRequestTimeout
  4350. * @description 获取请求超时时间。
  4351. * @returns {number} 请求超时时间。
  4352. */
  4353. var getRequestTimeout = SuperMap.getRequestTimeout = function () {
  4354. return SuperMap.RequestTimeout || 45000;
  4355. };
  4356. var FetchRequest = SuperMap.FetchRequest = {
  4357. commit: function commit(method, url, params, options) {
  4358. method = method ? method.toUpperCase() : method;
  4359. switch (method) {
  4360. case 'GET':
  4361. return this.get(url, params, options);
  4362. case 'POST':
  4363. return this.post(url, params, options);
  4364. case 'PUT':
  4365. return this.put(url, params, options);
  4366. case 'DELETE':
  4367. return this["delete"](url, params, options);
  4368. default:
  4369. return this.get(url, params, options);
  4370. }
  4371. },
  4372. supportDirectRequest: function supportDirectRequest(url, options) {
  4373. if (Util.isInTheSameDomain(url)) {
  4374. return true;
  4375. }
  4376. if (options.crossOrigin != undefined) {
  4377. return options.crossOrigin;
  4378. } else {
  4379. return isCORS() || options.proxy;
  4380. }
  4381. },
  4382. get: function get(url, params, options) {
  4383. options = options || {};
  4384. var type = 'GET';
  4385. url = Util.urlAppend(url, this._getParameterString(params || {}));
  4386. url = this._processUrl(url, options);
  4387. if (!this.supportDirectRequest(url, options)) {
  4388. url = url.replace('.json', '.jsonp');
  4389. var config = {
  4390. url: url,
  4391. data: params
  4392. };
  4393. return SuperMap.Util.RequestJSONPPromise.GET(config);
  4394. }
  4395. if (!this.urlIsLong(url)) {
  4396. return this._fetch(url, params, options, type);
  4397. } else {
  4398. return this._postSimulatie(type, url.substring(0, url.indexOf('?') - 1), params, options);
  4399. }
  4400. },
  4401. "delete": function _delete(url, params, options) {
  4402. options = options || {};
  4403. var type = 'DELETE';
  4404. url = Util.urlAppend(url, this._getParameterString(params || {}));
  4405. url = this._processUrl(url, options);
  4406. if (!this.supportDirectRequest(url, options)) {
  4407. url = url.replace('.json', '.jsonp');
  4408. var config = {
  4409. url: url += "&_method=DELETE",
  4410. data: params
  4411. };
  4412. return SuperMap.Util.RequestJSONPPromise.DELETE(config);
  4413. }
  4414. if (this.urlIsLong(url)) {
  4415. return this._postSimulatie(type, url.substring(0, url.indexOf('?') - 1), params, options);
  4416. }
  4417. return this._fetch(url, params, options, type);
  4418. },
  4419. post: function post(url, params, options) {
  4420. options = options || {};
  4421. if (!this.supportDirectRequest(url, options)) {
  4422. url = url.replace('.json', '.jsonp');
  4423. var config = {
  4424. url: url += "&_method=POST",
  4425. data: params
  4426. };
  4427. return SuperMap.Util.RequestJSONPPromise.POST(config);
  4428. }
  4429. return this._fetch(this._processUrl(url, options), params, options, 'POST');
  4430. },
  4431. put: function put(url, params, options) {
  4432. options = options || {};
  4433. url = this._processUrl(url, options);
  4434. if (!this.supportDirectRequest(url, options)) {
  4435. url = url.replace('.json', '.jsonp');
  4436. var config = {
  4437. url: url += "&_method=PUT",
  4438. data: params
  4439. };
  4440. return SuperMap.Util.RequestJSONPPromise.PUT(config);
  4441. }
  4442. return this._fetch(url, params, options, 'PUT');
  4443. },
  4444. urlIsLong: function urlIsLong(url) {
  4445. //当前url的字节长度。
  4446. var totalLength = 0,
  4447. charCode = null;
  4448. for (var i = 0, len = url.length; i < len; i++) {
  4449. //转化为Unicode编码
  4450. charCode = url.charCodeAt(i);
  4451. if (charCode < 0x007f) {
  4452. totalLength++;
  4453. } else if (0x0080 <= charCode && charCode <= 0x07ff) {
  4454. totalLength += 2;
  4455. } else if (0x0800 <= charCode && charCode <= 0xffff) {
  4456. totalLength += 3;
  4457. }
  4458. }
  4459. return totalLength < 2000 ? false : true;
  4460. },
  4461. _postSimulatie: function _postSimulatie(type, url, params, options) {
  4462. var separator = url.indexOf('?') > -1 ? '&' : '?';
  4463. url += separator + '_method=' + type;
  4464. if (typeof params !== 'string') {
  4465. params = JSON.stringify(params);
  4466. }
  4467. return this.post(url, params, options);
  4468. },
  4469. _processUrl: function _processUrl(url, options) {
  4470. if (this._isMVTRequest(url)) {
  4471. return url;
  4472. }
  4473. if (url.indexOf('.json') === -1 && !options.withoutFormatSuffix) {
  4474. if (url.indexOf('?') < 0) {
  4475. url += '.json';
  4476. } else {
  4477. var urlArrays = url.split('?');
  4478. if (urlArrays.length === 2) {
  4479. url = urlArrays[0] + '.json?' + urlArrays[1];
  4480. }
  4481. }
  4482. }
  4483. if (options && options.proxy) {
  4484. if (typeof options.proxy === 'function') {
  4485. url = options.proxy(url);
  4486. } else {
  4487. url = decodeURIComponent(url);
  4488. url = options.proxy + encodeURIComponent(url);
  4489. }
  4490. }
  4491. return url;
  4492. },
  4493. _fetch: function _fetch(url, params, options, type) {
  4494. options = options || {};
  4495. options.headers = options.headers || {};
  4496. if (!options.headers['Content-Type']) {
  4497. options.headers['Content-Type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
  4498. }
  4499. if (options.timeout) {
  4500. return this._timeout(options.timeout, FetchRequest_fetch(url, {
  4501. method: type,
  4502. headers: options.headers,
  4503. body: type === 'PUT' || type === 'POST' ? params : undefined,
  4504. credentials: this._getWithCredentials(options),
  4505. mode: 'cors',
  4506. timeout: getRequestTimeout()
  4507. }).then(function (response) {
  4508. return response;
  4509. }));
  4510. }
  4511. return FetchRequest_fetch(url, {
  4512. method: type,
  4513. body: type === 'PUT' || type === 'POST' ? params : undefined,
  4514. headers: options.headers,
  4515. credentials: this._getWithCredentials(options),
  4516. mode: 'cors',
  4517. timeout: getRequestTimeout()
  4518. }).then(function (response) {
  4519. return response;
  4520. });
  4521. },
  4522. _getWithCredentials: function _getWithCredentials(options) {
  4523. if (options.withCredentials === true) {
  4524. return 'include';
  4525. }
  4526. if (options.withCredentials === false) {
  4527. return 'omit';
  4528. }
  4529. return 'same-origin';
  4530. },
  4531. _fetchJsonp: function _fetchJsonp(url, options) {
  4532. options = options || {};
  4533. return fetch_jsonp_default()(url, {
  4534. method: 'GET',
  4535. timeout: options.timeout
  4536. }).then(function (response) {
  4537. return response;
  4538. });
  4539. },
  4540. _timeout: function _timeout(seconds, promise) {
  4541. return new Promise(function (resolve, reject) {
  4542. setTimeout(function () {
  4543. reject(new Error('timeout'));
  4544. }, seconds);
  4545. promise.then(resolve, reject);
  4546. });
  4547. },
  4548. _getParameterString: function _getParameterString(params) {
  4549. var paramsArray = [];
  4550. for (var key in params) {
  4551. var value = params[key];
  4552. if (value != null && typeof value !== 'function') {
  4553. var encodedValue;
  4554. if (Array.isArray(value) || value.toString() === '[object Object]') {
  4555. encodedValue = encodeURIComponent(JSON.stringify(value));
  4556. } else {
  4557. encodedValue = encodeURIComponent(value);
  4558. }
  4559. paramsArray.push(encodeURIComponent(key) + '=' + encodedValue);
  4560. }
  4561. }
  4562. return paramsArray.join('&');
  4563. },
  4564. _isMVTRequest: function _isMVTRequest(url) {
  4565. return url.indexOf('.mvt') > -1 || url.indexOf('.pbf') > -1;
  4566. }
  4567. };
  4568. SuperMap.Util.RequestJSONPPromise = {
  4569. limitLength: 1500,
  4570. queryKeys: [],
  4571. queryValues: [],
  4572. supermap_callbacks: {},
  4573. addQueryStrings: function addQueryStrings(values) {
  4574. var me = this;
  4575. for (var key in values) {
  4576. me.queryKeys.push(key);
  4577. if (typeof values[key] !== 'string') {
  4578. values[key] = SuperMap.Util.toJSON(values[key]);
  4579. }
  4580. var tempValue = encodeURIComponent(values[key]);
  4581. me.queryValues.push(tempValue);
  4582. }
  4583. },
  4584. issue: function issue(config) {
  4585. var me = this,
  4586. uid = me.getUid(),
  4587. url = config.url,
  4588. splitQuestUrl = [];
  4589. var p = new Promise(function (resolve) {
  4590. me.supermap_callbacks[uid] = function (response) {
  4591. delete me.supermap_callbacks[uid];
  4592. resolve(response);
  4593. };
  4594. }); // me.addQueryStrings({
  4595. // callback: "SuperMap.Util.RequestJSONPPromise.supermap_callbacks[" + uid + "]"
  4596. // });
  4597. var sectionURL = url,
  4598. keysCount = 0; //此次sectionURL中有多少个key
  4599. var length = me.queryKeys ? me.queryKeys.length : 0;
  4600. for (var i = 0; i < length; i++) {
  4601. if (sectionURL.length + me.queryKeys[i].length + 2 >= me.limitLength) {
  4602. //+2 for ("&"or"?")and"="
  4603. if (keysCount == 0) {
  4604. return false;
  4605. }
  4606. splitQuestUrl.push(sectionURL);
  4607. sectionURL = url;
  4608. keysCount = 0;
  4609. i--;
  4610. } else {
  4611. if (sectionURL.length + me.queryKeys[i].length + 2 + me.queryValues[i].length > me.limitLength) {
  4612. var leftValue = me.queryValues[i];
  4613. while (leftValue.length > 0) {
  4614. var leftLength = me.limitLength - sectionURL.length - me.queryKeys[i].length - 2; //+2 for ("&"or"?")and"="
  4615. if (sectionURL.indexOf('?') > -1) {
  4616. sectionURL += '&';
  4617. } else {
  4618. sectionURL += '?';
  4619. }
  4620. var tempLeftValue = leftValue.substring(0, leftLength); //避免 截断sectionURL时,将类似于%22这样的符号截成两半,从而导致服务端组装sectionURL时发生错误
  4621. if (tempLeftValue.substring(leftLength - 1, leftLength) === '%') {
  4622. leftLength -= 1;
  4623. tempLeftValue = leftValue.substring(0, leftLength);
  4624. } else if (tempLeftValue.substring(leftLength - 2, leftLength - 1) === '%') {
  4625. leftLength -= 2;
  4626. tempLeftValue = leftValue.substring(0, leftLength);
  4627. }
  4628. sectionURL += me.queryKeys[i] + '=' + tempLeftValue;
  4629. leftValue = leftValue.substring(leftLength);
  4630. if (tempLeftValue.length > 0) {
  4631. splitQuestUrl.push(sectionURL);
  4632. sectionURL = url;
  4633. keysCount = 0;
  4634. }
  4635. }
  4636. } else {
  4637. keysCount++;
  4638. if (sectionURL.indexOf('?') > -1) {
  4639. sectionURL += '&';
  4640. } else {
  4641. sectionURL += '?';
  4642. }
  4643. sectionURL += me.queryKeys[i] + '=' + me.queryValues[i];
  4644. }
  4645. }
  4646. }
  4647. splitQuestUrl.push(sectionURL);
  4648. me.send(splitQuestUrl, 'SuperMap.Util.RequestJSONPPromise.supermap_callbacks[' + uid + ']', config && config.proxy);
  4649. return p;
  4650. },
  4651. getUid: function getUid() {
  4652. var uid = new Date().getTime(),
  4653. random = Math.floor(Math.random() * 1e17);
  4654. return uid * 1000 + random;
  4655. },
  4656. send: function send(splitQuestUrl, callback, proxy) {
  4657. var len = splitQuestUrl.length;
  4658. if (len > 0) {
  4659. var jsonpUserID = new Date().getTime();
  4660. for (var i = 0; i < len; i++) {
  4661. var url = splitQuestUrl[i];
  4662. if (url.indexOf('?') > -1) {
  4663. url += '&';
  4664. } else {
  4665. url += '?';
  4666. }
  4667. url += 'sectionCount=' + len;
  4668. url += '&sectionIndex=' + i;
  4669. url += '&jsonpUserID=' + jsonpUserID;
  4670. if (proxy) {
  4671. url = decodeURIComponent(url);
  4672. url = proxy + encodeURIComponent(url);
  4673. }
  4674. fetch_jsonp_default()(url, {
  4675. jsonpCallbackFunction: callback,
  4676. timeout: 30000
  4677. });
  4678. }
  4679. }
  4680. },
  4681. GET: function GET(config) {
  4682. var me = this;
  4683. me.queryKeys.length = 0;
  4684. me.queryValues.length = 0;
  4685. me.addQueryStrings(config.params);
  4686. return me.issue(config);
  4687. },
  4688. POST: function POST(config) {
  4689. var me = this;
  4690. me.queryKeys.length = 0;
  4691. me.queryValues.length = 0;
  4692. me.addQueryStrings({
  4693. requestEntity: config.data
  4694. });
  4695. return me.issue(config);
  4696. },
  4697. PUT: function PUT(config) {
  4698. var me = this;
  4699. me.queryKeys.length = 0;
  4700. me.queryValues.length = 0;
  4701. me.addQueryStrings({
  4702. requestEntity: config.data
  4703. });
  4704. return me.issue(config);
  4705. },
  4706. DELETE: function DELETE(config) {
  4707. var me = this;
  4708. me.queryKeys.length = 0;
  4709. me.queryValues.length = 0;
  4710. me.addQueryStrings({
  4711. requestEntity: config.data
  4712. });
  4713. return me.issue(config);
  4714. }
  4715. };
  4716. // CONCATENATED MODULE: ./src/common/security/SecurityManager.js
  4717. function SecurityManager_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  4718. function SecurityManager_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  4719. function SecurityManager_createClass(Constructor, protoProps, staticProps) { if (protoProps) SecurityManager_defineProperties(Constructor.prototype, protoProps); if (staticProps) SecurityManager_defineProperties(Constructor, staticProps); return Constructor; }
  4720. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  4721. * This program are made available under the terms of the Apache License, Version 2.0
  4722. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  4723. /**
  4724. * @name SecurityManager
  4725. * @memberOf SuperMap
  4726. * @namespace
  4727. * @category Security
  4728. * @description 安全管理中心,提供 iServer,iPortal,Online 统一权限认证管理。
  4729. * > 使用说明:
  4730. * > 创建任何一个服务之前调用 {@link SuperMap.SecurityManager.registerToken}或
  4731. * > {@link SuperMap.SecurityManager.registerKey}注册凭据。
  4732. * > 发送请求时根据 url 或者服务 id 获取相应的 key 或者 token 并自动添加到服务地址中。
  4733. */
  4734. var SecurityManager_SecurityManager = /*#__PURE__*/function () {
  4735. function SecurityManager() {
  4736. SecurityManager_classCallCheck(this, SecurityManager);
  4737. }
  4738. SecurityManager_createClass(SecurityManager, null, [{
  4739. key: "generateToken",
  4740. /**
  4741. * @description 从服务器获取一个token,在此之前要注册服务器信息。
  4742. * @function SuperMap.SecurityManager.generateToken
  4743. * @param {string} url - 服务器域名+端口,如:http://localhost:8092。
  4744. * @param {SuperMap.TokenServiceParameter} tokenParam - token 申请参数。
  4745. * @returns {Promise} 返回包含 token 信息的 Promise 对象。
  4746. */
  4747. value: function generateToken(url, tokenParam) {
  4748. var serverInfo = this.servers[url];
  4749. if (!serverInfo) {
  4750. return;
  4751. }
  4752. return FetchRequest.post(serverInfo.tokenServiceUrl, JSON.stringify(tokenParam.toJSON())).then(function (response) {
  4753. return response.text();
  4754. });
  4755. }
  4756. /**
  4757. * @description 注册安全服务器相关信息。
  4758. * @function SuperMap.SecurityManager.registerServers
  4759. * @param {SuperMap.ServerInfo} serverInfos - 服务器信息。
  4760. */
  4761. }, {
  4762. key: "registerServers",
  4763. value: function registerServers(serverInfos) {
  4764. this.servers = this.servers || {};
  4765. if (!Util.isArray(serverInfos)) {
  4766. serverInfos = [serverInfos];
  4767. }
  4768. for (var i = 0; i < serverInfos.length; i++) {
  4769. var serverInfo = serverInfos[i];
  4770. this.servers[serverInfo.server] = serverInfo;
  4771. }
  4772. }
  4773. /**
  4774. * @description 服务请求都会自动带上这个 token。
  4775. * @function SuperMap.SecurityManager.registerToken
  4776. * @param {string} url -服务器域名+端口:如http://localhost:8090。
  4777. * @param {string} token - token
  4778. */
  4779. }, {
  4780. key: "registerToken",
  4781. value: function registerToken(url, token) {
  4782. this.tokens = this.tokens || {};
  4783. if (!url || !token) {
  4784. return;
  4785. }
  4786. var domain = this._getTokenStorageKey(url);
  4787. this.tokens[domain] = token;
  4788. }
  4789. /**
  4790. * @description 注册 key,ids 为数组(存在一个 key 对应多个服务)。
  4791. * @function SuperMap.SecurityManager.registerKey
  4792. * @param {Array} ids - 可以是服务 id 数组或者 url 地址数组或者 webAPI 类型数组。
  4793. * @param {string} key - key
  4794. */
  4795. }, {
  4796. key: "registerKey",
  4797. value: function registerKey(ids, key) {
  4798. this.keys = this.keys || {};
  4799. if (!ids || ids.length < 1 || !key) {
  4800. return;
  4801. }
  4802. ids = Util.isArray(ids) ? ids : [ids];
  4803. for (var i = 0; i < ids.length; i++) {
  4804. var id = this._getUrlRestString(ids[0]) || ids[0];
  4805. this.keys[id] = key;
  4806. }
  4807. }
  4808. /**
  4809. * @description 获取服务器信息。
  4810. * @function SuperMap.SecurityManager.getServerInfo
  4811. * @param {string} url - 服务器域名+端口,如:http://localhost:8092。
  4812. * @returns {SuperMap.ServerInfo} 服务器信息。
  4813. */
  4814. }, {
  4815. key: "getServerInfo",
  4816. value: function getServerInfo(url) {
  4817. this.servers = this.servers || {};
  4818. return this.servers[url];
  4819. }
  4820. /**
  4821. * @description 根据 Url 获取token。
  4822. * @function SuperMap.SecurityManager.getToken
  4823. * @param {string} url - 服务器域名+端口,如:http://localhost:8092。
  4824. * @returns {string} token
  4825. */
  4826. }, {
  4827. key: "getToken",
  4828. value: function getToken(url) {
  4829. if (!url) {
  4830. return;
  4831. }
  4832. this.tokens = this.tokens || {};
  4833. var domain = this._getTokenStorageKey(url);
  4834. return this.tokens[domain];
  4835. }
  4836. /**
  4837. * @description 根据 Url 获取 key。
  4838. * @function SuperMap.SecurityManager.getKey
  4839. * @param {string} id - id
  4840. * @returns {string} key
  4841. */
  4842. }, {
  4843. key: "getKey",
  4844. value: function getKey(id) {
  4845. this.keys = this.keys || {};
  4846. var key = this._getUrlRestString(id) || id;
  4847. return this.keys[key];
  4848. }
  4849. /**
  4850. * @description iServer 登录验证。
  4851. * @function SuperMap.SecurityManager.loginiServer
  4852. * @param {string} url - iServer 首页地址,如:http://localhost:8090/iserver。
  4853. * @param {string} username - 用户名。
  4854. * @param {string} password - 密码。
  4855. * @param {boolean} [rememberme=false] - 是否记住。
  4856. * @returns {Promise} 返回包含 iServer 登录请求结果的 Promise 对象。
  4857. */
  4858. }, {
  4859. key: "loginiServer",
  4860. value: function loginiServer(url, username, password, rememberme) {
  4861. url = Util.urlPathAppend(url, 'services/security/login');
  4862. var loginInfo = {
  4863. username: username && username.toString(),
  4864. password: password && password.toString(),
  4865. rememberme: rememberme
  4866. };
  4867. loginInfo = JSON.stringify(loginInfo);
  4868. var requestOptions = {
  4869. headers: {
  4870. 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
  4871. }
  4872. };
  4873. return FetchRequest.post(url, loginInfo, requestOptions).then(function (response) {
  4874. return response.json();
  4875. });
  4876. }
  4877. /**
  4878. * @description iServer登出。
  4879. * @function SuperMap.SecurityManager.logoutiServer
  4880. * @param {string} url - iServer 首页地址,如:http://localhost:8090/iserver。
  4881. * @returns {Promise} 是否登出成功。
  4882. */
  4883. }, {
  4884. key: "logoutiServer",
  4885. value: function logoutiServer(url) {
  4886. url = Util.urlPathAppend(url, 'services/security/logout');
  4887. var requestOptions = {
  4888. headers: {
  4889. 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
  4890. },
  4891. withoutFormatSuffix: true
  4892. };
  4893. return FetchRequest.get(url, "", requestOptions).then(function () {
  4894. return true;
  4895. })["catch"](function () {
  4896. return false;
  4897. });
  4898. }
  4899. /**
  4900. * @description Online 登录验证。
  4901. * @function SuperMap.SecurityManager.loginOnline
  4902. * @param {string} callbackLocation - 跳转位置。
  4903. * @param {boolean} [newTab=true] - 是否新窗口打开。
  4904. */
  4905. }, {
  4906. key: "loginOnline",
  4907. value: function loginOnline(callbackLocation, newTab) {
  4908. var loginUrl = SecurityManager.SSO + "/login?service=" + callbackLocation;
  4909. this._open(loginUrl, newTab);
  4910. }
  4911. /**
  4912. * @description iPortal登录验证。
  4913. * @function SuperMap.SecurityManager.loginiPortal
  4914. * @param {string} url - iportal 首页地址,如:http://localhost:8092/iportal.
  4915. * @param {string} username - 用户名。
  4916. * @param {string} password - 密码。
  4917. * @returns {Promise} 返回包含 iPortal 登录请求结果的 Promise 对象。
  4918. */
  4919. }, {
  4920. key: "loginiPortal",
  4921. value: function loginiPortal(url, username, password) {
  4922. url = Util.urlPathAppend(url, 'web/login');
  4923. var loginInfo = {
  4924. username: username && username.toString(),
  4925. password: password && password.toString()
  4926. };
  4927. loginInfo = JSON.stringify(loginInfo);
  4928. var requestOptions = {
  4929. headers: {
  4930. 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
  4931. },
  4932. withCredentials: true
  4933. };
  4934. return FetchRequest.post(url, loginInfo, requestOptions).then(function (response) {
  4935. return response.json();
  4936. });
  4937. }
  4938. /**
  4939. * @description iPortal 登出。
  4940. * @function SuperMap.SecurityManager.logoutiPortal
  4941. * @param {string} url - iportal 首页地址,如:http://localhost:8092/iportal.
  4942. * @returns {Promise} 如果登出成功,返回 true;否则返回 false。
  4943. */
  4944. }, {
  4945. key: "logoutiPortal",
  4946. value: function logoutiPortal(url) {
  4947. url = Util.urlPathAppend(url, 'services/security/logout');
  4948. var requestOptions = {
  4949. headers: {
  4950. 'Content-Type': 'application/x-www-form-urlencoded; charset=UTF-8'
  4951. },
  4952. withCredentials: true,
  4953. withoutFormatSuffix: true
  4954. };
  4955. return FetchRequest.get(url, "", requestOptions).then(function () {
  4956. return true;
  4957. })["catch"](function () {
  4958. return false;
  4959. });
  4960. }
  4961. /**
  4962. * @description iManager 登录验证。
  4963. * @function SuperMap.SecurityManager.loginManager
  4964. * @param {string} url - iManager 地址。地址参数为 iManager 首页地址,如: http://localhost:8390/imanager。
  4965. * @param {Object} [loginInfoParams] - iManager 登录参数。
  4966. * @param {string} loginInfoParams.userName - 用户名。
  4967. * @param {string} loginInfoParams.password - 密码。
  4968. * @param {Object} options
  4969. * @param {boolean} [options.isNewTab=true] - 不同域时是否在新窗口打开登录页面。
  4970. * @returns {Promise} 返回包含 iManager 登录请求结果的 Promise 对象。
  4971. */
  4972. }, {
  4973. key: "loginManager",
  4974. value: function loginManager(url, loginInfoParams, options) {
  4975. if (!Util.isInTheSameDomain(url)) {
  4976. var isNewTab = options ? options.isNewTab : true;
  4977. this._open(url, isNewTab);
  4978. return;
  4979. }
  4980. var requestUrl = Util.urlPathAppend(url, 'icloud/security/tokens');
  4981. var params = loginInfoParams || {};
  4982. var loginInfo = {
  4983. username: params.userName && params.userName.toString(),
  4984. password: params.password && params.password.toString()
  4985. };
  4986. loginInfo = JSON.stringify(loginInfo);
  4987. var requestOptions = {
  4988. headers: {
  4989. 'Accept': '*/*',
  4990. 'Content-Type': 'application/json'
  4991. }
  4992. };
  4993. var me = this;
  4994. return FetchRequest.post(requestUrl, loginInfo, requestOptions).then(function (response) {
  4995. response.text().then(function (result) {
  4996. me.imanagerToken = result;
  4997. return result;
  4998. });
  4999. });
  5000. }
  5001. /**
  5002. * @description 清空全部验证信息。
  5003. * @function SuperMap.SecurityManager.destroyAllCredentials
  5004. */
  5005. }, {
  5006. key: "destroyAllCredentials",
  5007. value: function destroyAllCredentials() {
  5008. this.keys = null;
  5009. this.tokens = null;
  5010. this.servers = null;
  5011. }
  5012. /**
  5013. * @description 清空令牌信息。
  5014. * @function SuperMap.SecurityManager.destroyToken
  5015. * @param {string} url - iportal 首页地址,如:http://localhost:8092/iportal.
  5016. */
  5017. }, {
  5018. key: "destroyToken",
  5019. value: function destroyToken(url) {
  5020. if (!url) {
  5021. return;
  5022. }
  5023. var domain = this._getTokenStorageKey(url);
  5024. this.tokens = this.tokens || {};
  5025. if (this.tokens[domain]) {
  5026. delete this.tokens[domain];
  5027. }
  5028. }
  5029. /**
  5030. * @description 清空服务授权码。
  5031. * @function SuperMap.SecurityManager.destroyKey
  5032. * @param {string} url - iServer 首页地址,如:http://localhost:8090/iserver。
  5033. */
  5034. }, {
  5035. key: "destroyKey",
  5036. value: function destroyKey(url) {
  5037. if (!url) {
  5038. return;
  5039. }
  5040. this.keys = this.keys || {};
  5041. var key = this._getUrlRestString(url) || url;
  5042. if (this.keys[key]) {
  5043. delete this.keys[key];
  5044. }
  5045. }
  5046. }, {
  5047. key: "_open",
  5048. value: function _open(url, newTab) {
  5049. newTab = newTab != null ? newTab : true;
  5050. var offsetX = window.screen.availWidth / 2 - this.INNER_WINDOW_WIDTH / 2;
  5051. var offsetY = window.screen.availHeight / 2 - this.INNER_WINDOW_HEIGHT / 2;
  5052. var options = "height=" + this.INNER_WINDOW_HEIGHT + ", width=" + this.INNER_WINDOW_WIDTH + ",top=" + offsetY + ", left=" + offsetX + ",toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no";
  5053. if (newTab) {
  5054. window.open(url, 'login');
  5055. } else {
  5056. window.open(url, 'login', options);
  5057. }
  5058. }
  5059. }, {
  5060. key: "_getTokenStorageKey",
  5061. value: function _getTokenStorageKey(url) {
  5062. var patten = /(.*?):\/\/([^\/]+)/i;
  5063. var result = url.match(patten);
  5064. if (!result) {
  5065. return url;
  5066. }
  5067. return result[0];
  5068. }
  5069. }, {
  5070. key: "_getUrlRestString",
  5071. value: function _getUrlRestString(url) {
  5072. if (!url) {
  5073. return url;
  5074. } // var patten = /http:\/\/(.*\/rest)/i;
  5075. var patten = /(http|https):\/\/(.*\/rest)/i;
  5076. var result = url.match(patten);
  5077. if (!result) {
  5078. return url;
  5079. }
  5080. return result[0];
  5081. }
  5082. }]);
  5083. return SecurityManager;
  5084. }();
  5085. SecurityManager_SecurityManager.INNER_WINDOW_WIDTH = 600;
  5086. SecurityManager_SecurityManager.INNER_WINDOW_HEIGHT = 600;
  5087. SecurityManager_SecurityManager.SSO = "https://sso.supermap.com";
  5088. SecurityManager_SecurityManager.ONLINE = "https://www.supermapol.com";
  5089. SuperMap.SecurityManager = SecurityManager_SecurityManager;
  5090. // CONCATENATED MODULE: ./src/common/REST.js
  5091. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  5092. * This program are made available under the terms of the Apache License, Version 2.0
  5093. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  5094. /**
  5095. * @enum DataFormat
  5096. * @memberOf SuperMap
  5097. * @description 服务请求返回结果数据类型
  5098. * @type {string}
  5099. */
  5100. var DataFormat = SuperMap.DataFormat = {
  5101. /** GEOJSON */
  5102. GEOJSON: "GEOJSON",
  5103. /** ISERVER */
  5104. ISERVER: "ISERVER"
  5105. };
  5106. /**
  5107. * @enum ServerType
  5108. * @memberOf SuperMap
  5109. * @description 服务器类型
  5110. * @type {string}
  5111. */
  5112. var ServerType = SuperMap.ServerType = {
  5113. /** ISERVER */
  5114. ISERVER: "ISERVER",
  5115. /** IPORTAL */
  5116. IPORTAL: "IPORTAL",
  5117. /** ONLINE */
  5118. ONLINE: "ONLINE"
  5119. };
  5120. /**
  5121. * @enum GeometryType
  5122. * @memberOf SuperMap
  5123. * @description 几何对象枚举,定义了一系列几何对象类型。
  5124. * @type {string}
  5125. */
  5126. var GeometryType = SuperMap.GeometryType = {
  5127. /** LINE */
  5128. LINE: "LINE",
  5129. /** LINEM */
  5130. LINEM: "LINEM",
  5131. /** POINT */
  5132. POINT: "POINT",
  5133. /** REGION */
  5134. REGION: "REGION",
  5135. /** POINTEPS */
  5136. POINTEPS: "POINTEPS",
  5137. /** LINEEPS */
  5138. LINEEPS: "LINEEPS",
  5139. /** REGIONEPS */
  5140. REGIONEPS: "REGIONEPS",
  5141. /** ELLIPSE */
  5142. ELLIPSE: "ELLIPSE",
  5143. /** CIRCLE */
  5144. CIRCLE: "CIRCLE",
  5145. /** TEXT */
  5146. TEXT: "TEXT",
  5147. /** RECTANGLE */
  5148. RECTANGLE: "RECTANGLE",
  5149. /** UNKNOWN */
  5150. UNKNOWN: "UNKNOWN",
  5151. /** GEOCOMPOUND */
  5152. GEOCOMPOUND: "GEOCOMPOUND"
  5153. };
  5154. /**
  5155. * @enum QueryOption
  5156. * @memberOf SuperMap
  5157. * @description 查询结果类型枚举,描述查询结果返回类型,包括只返回属性、只返回几何实体以及返回属性和几何实体。
  5158. * @type {string}
  5159. */
  5160. var QueryOption = SuperMap.QueryOption = {
  5161. /** 属性 */
  5162. ATTRIBUTE: "ATTRIBUTE",
  5163. /** 属性和几何对象 */
  5164. ATTRIBUTEANDGEOMETRY: "ATTRIBUTEANDGEOMETRY",
  5165. /** 几何对象 */
  5166. GEOMETRY: "GEOMETRY"
  5167. };
  5168. /**
  5169. * @enum JoinType
  5170. * @memberOf SuperMap
  5171. * @description 关联查询时的关联类型常量。
  5172. * 该类定义了两个表之间的连接类型常量,决定了对两个表之间进行连接查询时,查询结果中得到的记录的情况。
  5173. * @type {string}
  5174. */
  5175. var JoinType = SuperMap.JoinType = {
  5176. /** INNERJOIN */
  5177. INNERJOIN: "INNERJOIN",
  5178. /** LEFTJOIN */
  5179. LEFTJOIN: "LEFTJOIN"
  5180. };
  5181. /**
  5182. * @enum SpatialQueryMode
  5183. * @memberOf SuperMap
  5184. * @description 空间查询模式枚举。该类定义了空间查询操作模式常量。
  5185. * @type {string}
  5186. */
  5187. var SpatialQueryMode = SuperMap.SpatialQueryMode = {
  5188. /** 包含空间查询模式 */
  5189. CONTAIN: "CONTAIN",
  5190. /** 交叉空间查询模式 */
  5191. CROSS: "CROSS",
  5192. /** 分离空间查询模式 */
  5193. DISJOINT: "DISJOINT",
  5194. /** 重合空间查询模式 */
  5195. IDENTITY: "IDENTITY",
  5196. /** 相交空间查询模式 */
  5197. INTERSECT: "INTERSECT",
  5198. /** 无空间查询 */
  5199. NONE: "NONE",
  5200. /** 叠加空间查询模式 */
  5201. OVERLAP: "OVERLAP",
  5202. /** 邻接空间查询模式 */
  5203. TOUCH: "TOUCH",
  5204. /** 被包含空间查询模式 */
  5205. WITHIN: "WITHIN"
  5206. };
  5207. /**
  5208. * @enum SpatialRelationType
  5209. * @memberOf SuperMap
  5210. * @description 数据集对象间的空间关系枚举。
  5211. * 该类定义了数据集对象间的空间关系类型常量。
  5212. * @type {string}
  5213. */
  5214. var SpatialRelationType = SuperMap.SpatialRelationType = {
  5215. /** 包含关系 */
  5216. CONTAIN: "CONTAIN",
  5217. /** 相交关系 */
  5218. INTERSECT: "INTERSECT",
  5219. /** 被包含关系 */
  5220. WITHIN: "WITHIN"
  5221. };
  5222. /**
  5223. * @enum MeasureMode
  5224. * @memberOf SuperMap
  5225. * @type {string}
  5226. * @description 量算模式枚举。
  5227. * 该类定义了两种测量模式:距离测量和面积测量。
  5228. */
  5229. var MeasureMode = SuperMap.MeasureMode = {
  5230. /** 距离测量 */
  5231. DISTANCE: "DISTANCE",
  5232. /** 面积测量 */
  5233. AREA: "AREA"
  5234. };
  5235. /**
  5236. * @enum Unit
  5237. * @memberOf SuperMap
  5238. * @description 距离单位枚举。
  5239. * 该类定义了一系列距离单位类型。
  5240. * @type {string}
  5241. */
  5242. var Unit = SuperMap.Unit = {
  5243. /** 米 */
  5244. METER: "METER",
  5245. /** 千米 */
  5246. KILOMETER: "KILOMETER",
  5247. /** 英里 */
  5248. MILE: "MILE",
  5249. /** 码 */
  5250. YARD: "YARD",
  5251. /** 度 */
  5252. DEGREE: "DEGREE",
  5253. /** 毫米 */
  5254. MILLIMETER: "MILLIMETER",
  5255. /** 厘米 */
  5256. CENTIMETER: "CENTIMETER",
  5257. /** 英寸 */
  5258. INCH: "INCH",
  5259. /** 分米 */
  5260. DECIMETER: "DECIMETER",
  5261. /** 英尺 */
  5262. FOOT: "FOOT",
  5263. /** 秒 */
  5264. SECOND: "SECOND",
  5265. /** 分 */
  5266. MINUTE: "MINUTE",
  5267. /** 弧度 */
  5268. RADIAN: "RADIAN"
  5269. };
  5270. /**
  5271. * @enum BufferRadiusUnit
  5272. * @memberOf SuperMap
  5273. * @description 缓冲区距离单位枚举。
  5274. * 该类定义了一系列缓冲距离单位类型。
  5275. * @type {string}
  5276. */
  5277. var BufferRadiusUnit = SuperMap.BufferRadiusUnit = {
  5278. /** 厘米 */
  5279. CENTIMETER: "CENTIMETER",
  5280. /** 分米 */
  5281. DECIMETER: "DECIMETER",
  5282. /** 英尺 */
  5283. FOOT: "FOOT",
  5284. /** 英寸 */
  5285. INCH: "INCH",
  5286. /** 千米 */
  5287. KILOMETER: "KILOMETER",
  5288. /** 米 */
  5289. METER: "METER",
  5290. /** 英里 */
  5291. MILE: "MILE",
  5292. /** 毫米 */
  5293. MILLIMETER: "MILLIMETER",
  5294. /** 码 */
  5295. YARD: "YARD"
  5296. };
  5297. /**
  5298. * @enum EngineType
  5299. * @memberOf SuperMap
  5300. * @description 数据源引擎类型枚举。
  5301. * @type {string}
  5302. */
  5303. var EngineType = SuperMap.EngineType = {
  5304. /** 影像只读引擎类型,文件引擎,针对通用影像格式如 BMP,JPG,TIFF 以及超图自定义影像格式 SIT 等。 */
  5305. IMAGEPLUGINS: "IMAGEPLUGINS",
  5306. /** OGC 引擎类型,针对于 Web 数据源,Web 引擎,目前支持的类型有 WMS,WFS,WCS。 */
  5307. OGC: "OGC",
  5308. /** Oracle 引擎类型,针对 Oracle 数据源,数据库引擎。 */
  5309. ORACLEPLUS: "ORACLEPLUS",
  5310. /** SDB 引擎类型,文件引擎,即 SDB 数据源。 */
  5311. SDBPLUS: "SDBPLUS",
  5312. /** SQL Server 引擎类型,针对 SQL Server 数据源,数据库引擎 */
  5313. SQLPLUS: "SQLPLUS",
  5314. /** UDB 引擎类型,文件引擎。 */
  5315. UDB: "UDB"
  5316. };
  5317. /**
  5318. * @enum ThemeGraphTextFormat
  5319. * @memberOf SuperMap
  5320. * @description 统计专题图文本显示格式枚举。
  5321. * @type {string}
  5322. */
  5323. var ThemeGraphTextFormat = SuperMap.ThemeGraphTextFormat = {
  5324. /** 标题。以各子项的标题来进行标注。 */
  5325. CAPTION: "CAPTION",
  5326. /** 标题 + 百分数。以各子项的标题和所占的百分比来进行标注。 */
  5327. CAPTION_PERCENT: "CAPTION_PERCENT",
  5328. /** 标题 + 实际数值。以各子项的标题和真实数值来进行标注。 */
  5329. CAPTION_VALUE: "CAPTION_VALUE",
  5330. /** 百分数。以各子项所占的百分比来进行标注。 */
  5331. PERCENT: "PERCENT",
  5332. /** 实际数值。以各子项的真实数值来进行标注。 */
  5333. VALUE: "VALUE"
  5334. };
  5335. /**
  5336. * @enum ThemeGraphType
  5337. * @memberOf SuperMap
  5338. * @description 统计专题图类型枚举。
  5339. * @type {string}
  5340. */
  5341. var ThemeGraphType = SuperMap.ThemeGraphType = {
  5342. /** 面积图。 */
  5343. AREA: "AREA",
  5344. /** 柱状图。 */
  5345. BAR: "BAR",
  5346. /** 三维柱状图。 */
  5347. BAR3D: "BAR3D",
  5348. /** 折线图。 */
  5349. LINE: "LINE",
  5350. /** 饼图。 */
  5351. PIE: "PIE",
  5352. /** 三维饼图。 */
  5353. PIE3D: "PIE3D",
  5354. /** 点状图。 */
  5355. POINT: "POINT",
  5356. /** 环状图。 */
  5357. RING: "RING",
  5358. /** 玫瑰图。 */
  5359. ROSE: "ROSE",
  5360. /** 三维玫瑰图。 */
  5361. ROSE3D: "ROSE3D",
  5362. /** 堆叠柱状图。 */
  5363. STACK_BAR: "STACK_BAR",
  5364. /** 三维堆叠柱状图。 */
  5365. STACK_BAR3D: "STACK_BAR3D",
  5366. /** 阶梯图。 */
  5367. STEP: "STEP"
  5368. };
  5369. /**
  5370. * @enum GraphAxesTextDisplayMode
  5371. * @memberOf SuperMap
  5372. * @description 统计专题图坐标轴文本显示模式。
  5373. * @type {string}
  5374. */
  5375. var GraphAxesTextDisplayMode = SuperMap.GraphAxesTextDisplayMode = {
  5376. /** 显示全部文本。 */
  5377. ALL: "ALL",
  5378. /** 不显示。 */
  5379. NONE: "NONE",
  5380. /** 显示Y轴的文本。 */
  5381. YAXES: "YAXES"
  5382. };
  5383. /**
  5384. * @enum GraduatedMode
  5385. * @memberOf SuperMap
  5386. * @description 专题图分级模式枚举。
  5387. *
  5388. * @type {string}
  5389. */
  5390. var GraduatedMode = SuperMap.GraduatedMode = {
  5391. /** 常量分级模式。 */
  5392. CONSTANT: "CONSTANT",
  5393. /** 对数分级模式。 */
  5394. LOGARITHM: "LOGARITHM",
  5395. /** 平方根分级模式。 */
  5396. SQUAREROOT: "SQUAREROOT"
  5397. };
  5398. /**
  5399. * @enum RangeMode
  5400. * @memberOf SuperMap
  5401. * @description 范围分段专题图分段方式枚举。
  5402. * @type {string}
  5403. */
  5404. var RangeMode = SuperMap.RangeMode = {
  5405. /** 自定义分段法。 */
  5406. CUSTOMINTERVAL: "CUSTOMINTERVAL",
  5407. /** 等距离分段法。 */
  5408. EQUALINTERVAL: "EQUALINTERVAL",
  5409. /** 对数分段法。 */
  5410. LOGARITHM: "LOGARITHM",
  5411. /** 等计数分段法。 */
  5412. QUANTILE: "QUANTILE",
  5413. /** 平方根分段法。 */
  5414. SQUAREROOT: "SQUAREROOT",
  5415. /** 标准差分段法。 */
  5416. STDDEVIATION: "STDDEVIATION"
  5417. };
  5418. /**
  5419. * @enum ThemeType
  5420. * @memberOf SuperMap
  5421. * @description 专题图类型枚举。
  5422. * @type {string}
  5423. */
  5424. var ThemeType = SuperMap.ThemeType = {
  5425. /** 点密度专题图。 */
  5426. DOTDENSITY: "DOTDENSITY",
  5427. /** 等级符号专题图。 */
  5428. GRADUATEDSYMBOL: "GRADUATEDSYMBOL",
  5429. /** 统计专题图。 */
  5430. GRAPH: "GRAPH",
  5431. /** 标签专题图。 */
  5432. LABEL: "LABEL",
  5433. /** 分段专题图。 */
  5434. RANGE: "RANGE",
  5435. /** 単值专题图。 */
  5436. UNIQUE: "UNIQUE"
  5437. };
  5438. /**
  5439. * @enum ColorGradientType
  5440. * @memberOf SuperMap
  5441. * @description 渐变颜色枚举。
  5442. * @type {string}
  5443. */
  5444. var ColorGradientType = SuperMap.ColorGradientType = {
  5445. /** 黑白渐变色。 */
  5446. BLACK_WHITE: "BLACKWHITE",
  5447. /** 蓝黑渐变色。 */
  5448. BLUE_BLACK: "BLUEBLACK",
  5449. /** 蓝红渐变色。 */
  5450. BLUE_RED: "BLUERED",
  5451. /** 蓝白渐变色。 */
  5452. BLUE_WHITE: "BLUEWHITE",
  5453. /** 青黑渐变色。 */
  5454. CYAN_BLACK: "CYANBLACK",
  5455. /** 青蓝渐变色。 */
  5456. CYAN_BLUE: "CYANBLUE",
  5457. /** 青绿渐变色。 */
  5458. CYAN_GREEN: "CYANGREEN",
  5459. /** 青白渐变色。 */
  5460. CYAN_WHITE: "CYANWHITE",
  5461. /** 绿黑渐变色。 */
  5462. GREEN_BLACK: "GREENBLACK",
  5463. /** 绿蓝渐变色。 */
  5464. GREEN_BLUE: "GREENBLUE",
  5465. /** 绿橙紫渐变色。 */
  5466. GREEN_ORANGE_VIOLET: "GREENORANGEVIOLET",
  5467. /** 绿红渐变色。 */
  5468. GREEN_RED: "GREENRED",
  5469. /** 蓝红渐变色。 */
  5470. GREEN_WHITE: "GREENWHITE",
  5471. /** 粉黑渐变色。 */
  5472. PINK_BLACK: "PINKBLACK",
  5473. /** 粉蓝渐变色。 */
  5474. PINK_BLUE: "PINKBLUE",
  5475. /** 粉红渐变色。 */
  5476. PINK_RED: "PINKRED",
  5477. /** 粉白渐变色。 */
  5478. PINK_WHITE: "PINKWHITE",
  5479. /** 彩虹色。 */
  5480. RAIN_BOW: "RAINBOW",
  5481. /** 红黑渐变色。 */
  5482. RED_BLACK: "REDBLACK",
  5483. /** 红白渐变色。 */
  5484. RED_WHITE: "REDWHITE",
  5485. /** 光谱渐变。 */
  5486. SPECTRUM: "SPECTRUM",
  5487. /** 地形渐变,用于三维显示效果较好。 */
  5488. TERRAIN: "TERRAIN",
  5489. /** 黄黑渐变色。 */
  5490. YELLOW_BLACK: "YELLOWBLACK",
  5491. /** 黄蓝渐变色。 */
  5492. YELLOW_BLUE: "YELLOWBLUE",
  5493. /** 黄绿渐变色。 */
  5494. YELLOW_GREEN: "YELLOWGREEN",
  5495. /** 黄红渐变色。 */
  5496. YELLOW_RED: "YELLOWRED",
  5497. /** 黄白渐变色。 */
  5498. YELLOW_WHITE: "YELLOWWHITE"
  5499. };
  5500. /**
  5501. * @enum TextAlignment
  5502. * @memberOf SuperMap
  5503. * @description 文本对齐枚举。
  5504. * @type {string}
  5505. */
  5506. var TextAlignment = SuperMap.TextAlignment = {
  5507. /** 左上角对齐。 */
  5508. TOPLEFT: "TOPLEFT",
  5509. /** 顶部居中对齐。 */
  5510. TOPCENTER: "TOPCENTER",
  5511. /** 右上角对齐。 */
  5512. TOPRIGHT: "TOPRIGHT",
  5513. /** 基准线左对齐。 */
  5514. BASELINELEFT: "BASELINELEFT",
  5515. /** 基准线居中对齐。 */
  5516. BASELINECENTER: "BASELINECENTER",
  5517. /** 基准线右对齐。 */
  5518. BASELINERIGHT: "BASELINERIGHT",
  5519. /** 左下角对齐。 */
  5520. BOTTOMLEFT: "BOTTOMLEFT",
  5521. /** 底部居中对齐。 */
  5522. BOTTOMCENTER: "BOTTOMCENTER",
  5523. /** 右下角对齐。 */
  5524. BOTTOMRIGHT: "BOTTOMRIGHT",
  5525. /** 左中对齐。 */
  5526. MIDDLELEFT: "MIDDLELEFT",
  5527. /** 中心对齐。 */
  5528. MIDDLECENTER: "MIDDLECENTER",
  5529. /** 右中对齐。 */
  5530. MIDDLERIGHT: "MIDDLERIGHT"
  5531. };
  5532. /**
  5533. * @enum FillGradientMode
  5534. * @memberOf SuperMap
  5535. * @description 渐变填充风格的渐变类型枚举。
  5536. * @type {string}
  5537. */
  5538. var FillGradientMode = SuperMap.FillGradientMode = {
  5539. /** 无渐变。 */
  5540. NONE: "NONE",
  5541. /** 线性渐变填充。 */
  5542. LINEAR: "LINEAR",
  5543. /** 辐射渐变填充。 */
  5544. RADIAL: "RADIAL",
  5545. /** 圆锥渐变填充。 */
  5546. CONICAL: "CONICAL",
  5547. /** 四角渐变填充。 */
  5548. SQUARE: "SQUARE"
  5549. };
  5550. /**
  5551. * @enum AlongLineDirection
  5552. * @memberOf SuperMap
  5553. * @description 标签沿线标注方向枚举。
  5554. * @type {string}
  5555. */
  5556. var AlongLineDirection = SuperMap.AlongLineDirection = {
  5557. /** 沿线的法线方向放置标签。 */
  5558. NORMAL: "ALONG_LINE_NORMAL",
  5559. /** 从下到上,从左到右放置。 */
  5560. LB_TO_RT: "LEFT_BOTTOM_TO_RIGHT_TOP",
  5561. /** 从上到下,从左到右放置。 */
  5562. LT_TO_RB: "LEFT_TOP_TO_RIGHT_BOTTOM",
  5563. /** 从下到上,从右到左放置。 */
  5564. RB_TO_LT: "RIGHT_BOTTOM_TO_LEFT_TOP",
  5565. /** 从上到下,从右到左放置。 */
  5566. RT_TO_LB: "RIGHT_TOP_TO_LEFT_BOTTOM"
  5567. };
  5568. /**
  5569. * @enum LabelBackShape
  5570. * @memberOf SuperMap
  5571. * @description 标签专题图中标签背景的形状枚举。
  5572. * @type {string}
  5573. */
  5574. var LabelBackShape = SuperMap.LabelBackShape = {
  5575. /** 菱形背景,即标签背景的形状为菱形。 */
  5576. DIAMOND: "DIAMOND",
  5577. /** 椭圆形背景,即标签背景的行状为椭圆形。 */
  5578. ELLIPSE: "ELLIPSE",
  5579. /** 符号背景,即标签背景的形状为设定的符号。 */
  5580. MARKER: "MARKER",
  5581. /** 空背景,即不使用任何形状作为标签的背景。 */
  5582. NONE: "NONE",
  5583. /** 矩形背景,即标签背景的形状为矩形。 */
  5584. RECT: "RECT",
  5585. /** 圆角矩形背景,即标签背景的形状为圆角矩形。 */
  5586. ROUNDRECT: "ROUNDRECT",
  5587. /** 三角形背景,即标签背景的形状为三角形。 */
  5588. TRIANGLE: "TRIANGLE"
  5589. };
  5590. /**
  5591. * @enum LabelOverLengthMode
  5592. * @memberOf SuperMap
  5593. * @description 标签专题图中超长标签的处理模式枚举。
  5594. * @type {string}
  5595. */
  5596. var LabelOverLengthMode = SuperMap.LabelOverLengthMode = {
  5597. /** 换行显示。 */
  5598. NEWLINE: "NEWLINE",
  5599. /** 对超长标签不进行处理。 */
  5600. NONE: "NONE",
  5601. /** 省略超出部分。 */
  5602. OMIT: "OMIT"
  5603. };
  5604. /**
  5605. * @enum DirectionType
  5606. * @memberOf SuperMap
  5607. * @description 网络分析中方向枚举。
  5608. * 在行驶引导子项中使用。
  5609. * @type {string}
  5610. */
  5611. var DirectionType = SuperMap.DirectionType = {
  5612. /** 东。 */
  5613. EAST: "EAST",
  5614. /** 无方向。 */
  5615. NONE: "NONE",
  5616. /** 北。 */
  5617. NORTH: "NORTH",
  5618. /** 南。 */
  5619. SOURTH: "SOURTH",
  5620. /** 西。 */
  5621. WEST: "WEST"
  5622. };
  5623. /**
  5624. * @enum SideType
  5625. * @memberOf SuperMap
  5626. * @description 行驶位置枚举。
  5627. * 表示在行驶在路的左边、右边或者路上的枚举,该类用在行驶导引子项类中。
  5628. * @type {string}
  5629. */
  5630. var SideType = SuperMap.SideType = {
  5631. /** 路的左侧。 */
  5632. LEFT: "LEFT",
  5633. /** 在路上(即路的中间)。 */
  5634. MIDDLE: "MIDDLE",
  5635. /** 无效值。 */
  5636. NONE: "NONE",
  5637. /** 路的右侧。 */
  5638. RIGHT: "RIGHT"
  5639. };
  5640. /**
  5641. * @enum SupplyCenterType
  5642. * @memberOf SuperMap
  5643. * @description 资源供给中心类型枚举。
  5644. * 该枚举定义了网络分析中资源中心点的类型,主要用于资源分配和选址分区。
  5645. * 资源供给中心点的类型包括非中心,固定中心和可选中心。固定中心用于资源分配分析; 固定中心和可选中心用于选址分析;非中心在两种网络分析时都不予考虑。
  5646. * @type {string}
  5647. */
  5648. var SupplyCenterType = SuperMap.SupplyCenterType = {
  5649. /** 固定中心点。 */
  5650. FIXEDCENTER: "FIXEDCENTER",
  5651. /** 非中心点。 */
  5652. NULL: "NULL",
  5653. /** 可选中心点。 */
  5654. OPTIONALCENTER: "OPTIONALCENTER"
  5655. };
  5656. /**
  5657. * @enum TurnType
  5658. * @memberOf SuperMap
  5659. * @description 转弯方向枚举。
  5660. * 用在行驶引导子项类中,表示转弯的方向。
  5661. * @type {string}
  5662. */
  5663. var TurnType = SuperMap.TurnType = {
  5664. /** 向前直行。 */
  5665. AHEAD: "AHEAD",
  5666. /** 掉头。 */
  5667. BACK: "BACK",
  5668. /** 终点,不拐弯。 */
  5669. END: "END",
  5670. /** 左转弯。 */
  5671. LEFT: "LEFT",
  5672. /** 无效值。 */
  5673. NONE: "NONE",
  5674. /** 右转弯。 */
  5675. RIGHT: "RIGHT"
  5676. };
  5677. /**
  5678. * @enum BufferEndType
  5679. * @memberOf SuperMap
  5680. * @description 缓冲区分析BufferEnd类型。
  5681. * @type {string}
  5682. */
  5683. var BufferEndType = SuperMap.BufferEndType = {
  5684. /** FLAT */
  5685. FLAT: "FLAT",
  5686. /** ROUND */
  5687. ROUND: "ROUND"
  5688. };
  5689. /**
  5690. * @enum OverlayOperationType
  5691. * @memberOf SuperMap
  5692. * @description 叠加分析类型枚举。
  5693. * @type {string}
  5694. */
  5695. var OverlayOperationType = SuperMap.OverlayOperationType = {
  5696. /** 操作数据集(几何对象)裁剪被操作数据集(几何对象)。 */
  5697. CLIP: "CLIP",
  5698. /** 在被操作数据集(几何对象)上擦除掉与操作数据集(几何对象)相重合的部分。 */
  5699. ERASE: "ERASE",
  5700. /**对被操作数据集(几何对象)进行同一操作,即操作执行后,被操作数据集(几何对象)包含来自操作数据集(几何对象)的几何形状。 */
  5701. IDENTITY: "IDENTITY",
  5702. /** 对两个数据集(几何对象)求交,返回两个数据集(几何对象)的交集。 */
  5703. INTERSECT: "INTERSECT",
  5704. /** 对两个面数据集(几何对象)进行合并操作。 */
  5705. UNION: "UNION",
  5706. /** 对两个面数据集(几何对象)进行更新操作。 */
  5707. UPDATE: "UPDATE",
  5708. /** 对两个面数据集(几何对象)进行对称差操作。 */
  5709. XOR: "XOR"
  5710. };
  5711. /**
  5712. * @enum OutputType
  5713. * @memberOf SuperMap
  5714. * @description 分布式分析输出类型枚举。
  5715. * @type {string}
  5716. */
  5717. var OutputType = SuperMap.OutputType = {
  5718. /** INDEXEDHDFS */
  5719. INDEXEDHDFS: "INDEXEDHDFS",
  5720. /** UDB */
  5721. UDB: "UDB",
  5722. /** MONGODB */
  5723. MONGODB: "MONGODB",
  5724. /** PG */
  5725. PG: "PG"
  5726. };
  5727. /**
  5728. * @enum SmoothMethod
  5729. * @memberOf SuperMap
  5730. * @description 光滑方法枚举。
  5731. * 用于从Grid 或DEM数据生成等值线或等值面时对等值线或者等值面的边界线进行平滑处理的方法。
  5732. * @type {string}
  5733. */
  5734. var SmoothMethod = SuperMap.SmoothMethod = {
  5735. /** B 样条法。 */
  5736. BSPLINE: "BSPLINE",
  5737. /** 磨角法。 */
  5738. POLISH: "POLISH"
  5739. };
  5740. /**
  5741. * @enum SurfaceAnalystMethod
  5742. * @memberOf SuperMap
  5743. * @description 表面分析方法枚举。
  5744. * 通过对数据进行表面分析,能够挖掘原始数据所包含的信息,使某些细节明显化,易于分析。
  5745. * @type {string}
  5746. */
  5747. var SurfaceAnalystMethod = SuperMap.SurfaceAnalystMethod = {
  5748. /** 等值线提取。 */
  5749. ISOLINE: "ISOLINE",
  5750. /** 等值面提取。 */
  5751. ISOREGION: "ISOREGION"
  5752. };
  5753. /**
  5754. * @enum DataReturnMode
  5755. * @memberOf SuperMap
  5756. * @description 数据返回模式枚举。
  5757. * 该枚举用于指定空间分析返回结果模式,包含返回数据集标识和记录集、只返回数据集标识(数据集名称@数据源名称)及只返回记录集三种模式。
  5758. * @type {string}
  5759. */
  5760. var DataReturnMode = SuperMap.DataReturnMode = {
  5761. /** 返回结果数据集标识(数据集名称@数据源名称)和记录集(RecordSet)。 */
  5762. DATASET_AND_RECORDSET: "DATASET_AND_RECORDSET",
  5763. /** 只返回数据集标识(数据集名称@数据源名称)。 */
  5764. DATASET_ONLY: "DATASET_ONLY",
  5765. /** 只返回记录集(RecordSet)。 */
  5766. RECORDSET_ONLY: "RECORDSET_ONLY"
  5767. };
  5768. /**
  5769. * @enum EditType
  5770. * @memberOf SuperMap
  5771. * @description 要素集更新模式枚举。
  5772. * 该枚举用于指定数据服务中要素集更新模式,包含添加要素集、更新要素集和删除要素集。
  5773. * @type {string}
  5774. */
  5775. var EditType = SuperMap.EditType = {
  5776. /** 增加操作。 */
  5777. ADD: "add",
  5778. /** 修改操作。 */
  5779. UPDATE: "update",
  5780. /** 删除操作。 */
  5781. DELETE: "delete"
  5782. };
  5783. /**
  5784. * @enum TransferTactic
  5785. * @memberOf SuperMap
  5786. * @description 公交换乘策略枚举。
  5787. * 该枚举用于指定公交服务中要素集更新模式,包含添加要素集、更新要素集和删除要素集。
  5788. * @type {string}
  5789. */
  5790. var TransferTactic = SuperMap.TransferTactic = {
  5791. /** 时间短。 */
  5792. LESS_TIME: "LESS_TIME",
  5793. /** 少换乘。 */
  5794. LESS_TRANSFER: "LESS_TRANSFER",
  5795. /** 少步行。 */
  5796. LESS_WALK: "LESS_WALK",
  5797. /** 距离最短。 */
  5798. MIN_DISTANCE: "MIN_DISTANCE"
  5799. };
  5800. /**
  5801. * @enum TransferPreference
  5802. * @memberOf SuperMap
  5803. * @description 公交换乘策略枚举。
  5804. * 该枚举用于指定交通换乘服务中设置地铁优先、公交优先、不乘地铁、无偏好等偏好设置。
  5805. * @type {string}
  5806. */
  5807. var TransferPreference = SuperMap.TransferPreference = {
  5808. /** 公交汽车优先。 */
  5809. BUS: "BUS",
  5810. /** 地铁优先。 */
  5811. SUBWAY: "SUBWAY",
  5812. /** 不乘坐地铁。 */
  5813. NO_SUBWAY: "NO_SUBWAY",
  5814. /** 无乘车偏好。 */
  5815. NONE: "NONE"
  5816. };
  5817. /**
  5818. * @enum GridType
  5819. * @memberOf SuperMap
  5820. * @description 地图背景格网类型枚举。
  5821. * @type {string}
  5822. */
  5823. var GridType = SuperMap.GridType = {
  5824. /** 十字叉丝。 */
  5825. CROSS: "CROSS",
  5826. /** 网格线。 */
  5827. GRID: "GRID",
  5828. /** 点。 */
  5829. POINT: "POINT"
  5830. };
  5831. /**
  5832. * @enum ColorSpaceType
  5833. * @memberOf SuperMap
  5834. * @description 色彩空间枚举。
  5835. * 由于成色原理的不同,决定了显示器、投影仪这类靠色光直接合成颜色的颜色设备和打印机、
  5836. * 印刷机这类靠使用颜料的印刷设备在生成颜色方式上的区别。
  5837. * 针对上述不同成色方式,SuperMap 提供两种色彩空间,
  5838. * 分别为 RGB 和 CMYK。RGB 主要用于显示系统中,CMYK 主要用于印刷系统中。
  5839. * @type {string}
  5840. */
  5841. var ColorSpaceType = SuperMap.ColorSpaceType = {
  5842. /** 该类型主要在印刷系统使用。 */
  5843. CMYK: "CMYK",
  5844. /** 该类型主要在显示系统中使用。 */
  5845. RGB: "RGB"
  5846. };
  5847. /**
  5848. * @enum LayerType
  5849. * @memberOf SuperMap
  5850. * @description 图层类型。
  5851. * @type {string}
  5852. */
  5853. var LayerType = SuperMap.LayerType = {
  5854. /** SuperMap UGC 类型图层。如矢量图层、栅格(Grid)图层、影像图层。 */
  5855. UGC: "UGC",
  5856. /** WMS 图层。 */
  5857. WMS: "WMS",
  5858. /** WFS 图层。 */
  5859. WFS: "WFS",
  5860. /** 自定义图层。 */
  5861. CUSTOM: "CUSTOM"
  5862. };
  5863. /**
  5864. * @enum UGCLayerType
  5865. * @memberOf SuperMap
  5866. * @description UGC图层类型。
  5867. * @type {string}
  5868. */
  5869. var UGCLayerType = SuperMap.UGCLayerType = {
  5870. /** 专题图层。 */
  5871. THEME: "THEME",
  5872. /** 矢量图层。 */
  5873. VECTOR: "VECTOR",
  5874. /** 栅格图层。。 */
  5875. GRID: "GRID",
  5876. /** 影像图层。 */
  5877. IMAGE: "IMAGE"
  5878. };
  5879. /**
  5880. * @enum StatisticMode
  5881. * @memberOf SuperMap
  5882. * @description 字段统计方法类型。
  5883. * @type {string}
  5884. */
  5885. var StatisticMode = SuperMap.StatisticMode = {
  5886. /** 统计所选字段的平均值。 */
  5887. AVERAGE: "AVERAGE",
  5888. /** 统计所选字段的最大值。 */
  5889. MAX: "MAX",
  5890. /** 统计所选字段的最小值。 */
  5891. MIN: "MIN",
  5892. /** 统计所选字段的标准差 */
  5893. STDDEVIATION: "STDDEVIATION",
  5894. /** 统计所选字段的总和。 */
  5895. SUM: "SUM",
  5896. /** 统计所选字段的方差。 */
  5897. VARIANCE: "VARIANCE"
  5898. };
  5899. /**
  5900. * @enum PixelFormat
  5901. * @memberOf SuperMap
  5902. * @description 栅格与影像数据存储的像素格式枚举。
  5903. * @type {string}
  5904. */
  5905. var PixelFormat = SuperMap.PixelFormat = {
  5906. /** 每个像元用16个比特(即2个字节)表示。 */
  5907. BIT16: "BIT16",
  5908. /** 每个像元用32个比特(即4个字节)表示。 */
  5909. BIT32: "BIT32",
  5910. /** 每个像元用64个比特(即8个字节)表示,只提供给栅格数据集使用。 */
  5911. BIT64: "BIT64",
  5912. /** 每个像元用4个字节来表示,只提供给栅格数据集使用。 */
  5913. SINGLE: "SINGLE",
  5914. /** 每个像元用8个字节来表示,只提供给栅格数据集使用。 */
  5915. DOUBLE: "DOUBLE",
  5916. /** 每个像元用1个比特表示。 */
  5917. UBIT1: "UBIT1",
  5918. /** 每个像元用4个比特来表示。 */
  5919. UBIT4: "UBIT4",
  5920. /** 每个像元用8个比特(即1个字节)来表示。 */
  5921. UBIT8: "UBIT8",
  5922. /** 每个像元用24个比特(即3个字节)来表示。 */
  5923. UBIT24: "UBIT24",
  5924. /** 每个像元用32个比特(即4个字节)来表示。 */
  5925. UBIT32: "UBIT32"
  5926. };
  5927. /**
  5928. * @enum SearchMode
  5929. * @memberOf SuperMap
  5930. * @description 内插时使用的样本点的查找方式枚举
  5931. * @type {string}
  5932. */
  5933. var SearchMode = SuperMap.SearchMode = {
  5934. /** 使用 KDTREE 的固定点数方式查找参与内插分析的点。 */
  5935. KDTREE_FIXED_COUNT: "KDTREE_FIXED_COUNT",
  5936. /** 使用 KDTREE 的定长方式查找参与内插分析的点。 */
  5937. KDTREE_FIXED_RADIUS: "KDTREE_FIXED_RADIUS",
  5938. /** 不进行查找,使用所有的输入点进行内插分析。 */
  5939. NONE: "NONE",
  5940. /** 使用 QUADTREE 方式查找参与内插分析的点,仅对样条(RBF)插值和普通克吕金(Kriging)有用。 */
  5941. QUADTREE: "QUADTREE"
  5942. };
  5943. /**
  5944. * @enum InterpolationAlgorithmType
  5945. * @memberOf SuperMap
  5946. * @description 插值分析的算法的类型
  5947. * @type {string}
  5948. */
  5949. var InterpolationAlgorithmType = SuperMap.InterpolationAlgorithmType = {
  5950. /** 普通克吕金插值法。 */
  5951. KRIGING: "KRIGING",
  5952. /** 简单克吕金插值法。 */
  5953. SimpleKriging: "SimpleKriging",
  5954. /** 泛克吕金插值法。 */
  5955. UniversalKriging: "UniversalKriging"
  5956. };
  5957. /**
  5958. * @enum VariogramMode
  5959. * @memberOf SuperMap
  5960. * @description 克吕金(Kriging)插值时的半变函数类型枚举
  5961. * @type {string}
  5962. */
  5963. var VariogramMode = SuperMap.VariogramMode = {
  5964. /** 指数函数。 */
  5965. EXPONENTIAL: "EXPONENTIAL",
  5966. /** 高斯函数。 */
  5967. GAUSSIAN: "GAUSSIAN",
  5968. /** 球型函数。 */
  5969. SPHERICAL: "SPHERICAL"
  5970. };
  5971. /**
  5972. * @enum Exponent
  5973. * @memberOf SuperMap
  5974. * @description 定义了泛克吕金(UniversalKriging)插值时样点数据中趋势面方程的阶数
  5975. * @type {string}
  5976. */
  5977. var Exponent = SuperMap.Exponent = {
  5978. /** 阶数为1。 */
  5979. EXP1: "EXP1",
  5980. /** 阶数为2。 */
  5981. EXP2: "EXP2"
  5982. };
  5983. /**
  5984. * @enum ClientType
  5985. * @memberOf SuperMap
  5986. * @description token申请的客户端标识类型
  5987. * @type {string}
  5988. */
  5989. var ClientType = SuperMap.ClientType = {
  5990. /** 指定的 IP 地址。 */
  5991. IP: "IP",
  5992. /** 指定的 URL。 */
  5993. REFERER: "Referer",
  5994. /** 发送申请令牌请求的客户端 IP。 */
  5995. REQUESTIP: "RequestIP",
  5996. /** 不做任何验证。 */
  5997. NONE: "NONE",
  5998. /** SERVER。 */
  5999. SERVER: "SERVER",
  6000. /** WEB。 */
  6001. WEB: "WEB"
  6002. };
  6003. /**
  6004. * @enum ChartType
  6005. * @memberOf SuperMap
  6006. * @description 客户端专题图图表类型
  6007. * @type {string}
  6008. */
  6009. var ChartType = SuperMap.ChartType = {
  6010. /** 柱状图。 */
  6011. BAR: "Bar",
  6012. /** 三维柱状图。 */
  6013. BAR3D: "Bar3D",
  6014. /** 圆形图。 */
  6015. CIRCLE: "Circle",
  6016. /** 饼图。 */
  6017. PIE: "Pie",
  6018. /** 散点图。 */
  6019. POINT: "Point",
  6020. /** 折线图。 */
  6021. LINE: "Line",
  6022. /** 环状图。 */
  6023. RING: "Ring"
  6024. };
  6025. /**
  6026. * @enum ClipAnalystMode
  6027. * @memberOf SuperMap
  6028. * @description 裁剪分析模式
  6029. * @type {string}
  6030. */
  6031. var ClipAnalystMode = SuperMap.ClipAnalystMode = {
  6032. /** CLIP。 */
  6033. CLIP: "clip",
  6034. /** INTERSECT。 */
  6035. INTERSECT: "intersect"
  6036. };
  6037. /**
  6038. * @enum AnalystAreaUnit
  6039. * @memberOf SuperMap
  6040. * @description 分布式分析面积单位
  6041. * @type {string}
  6042. */
  6043. var AnalystAreaUnit = SuperMap.AnalystAreaUnit = {
  6044. /** 平方米。 */
  6045. "SQUAREMETER": "SquareMeter",
  6046. /** 平方千米。 */
  6047. "SQUAREKILOMETER": "SquareKiloMeter",
  6048. /** 公顷。 */
  6049. "HECTARE": "Hectare",
  6050. /** 公亩。 */
  6051. "ARE": "Are",
  6052. /** 英亩。 */
  6053. "ACRE": "Acre",
  6054. /** 平方英尺。 */
  6055. "SQUAREFOOT": "SquareFoot",
  6056. /** 平方码。 */
  6057. "SQUAREYARD": "SquareYard",
  6058. /** 平方英里。 */
  6059. "SQUAREMILE": "SquareMile"
  6060. };
  6061. /**
  6062. * @enum AnalystSizeUnit
  6063. * @memberOf SuperMap
  6064. * @description 分布式分析单位
  6065. * @type {string}
  6066. */
  6067. var AnalystSizeUnit = SuperMap.AnalystSizeUnit = {
  6068. /** 米。 */
  6069. "METER": "Meter",
  6070. /** 千米。 */
  6071. "KILOMETER": "Kilometer",
  6072. /** 码。 */
  6073. "YARD": "Yard",
  6074. /** 英尺。 */
  6075. "FOOT": "Foot",
  6076. /** 英里。 */
  6077. "MILE": "Mile"
  6078. };
  6079. /**
  6080. * @enum StatisticAnalystMode
  6081. * @memberOf SuperMap
  6082. * @description 分布式分析统计模式
  6083. * @type {string}
  6084. */
  6085. var StatisticAnalystMode = SuperMap.StatisticAnalystMode = {
  6086. /** 统计所选字段的最大值。 */
  6087. "MAX": "max",
  6088. /** 统计所选字段的最小值。 */
  6089. "MIN": "min",
  6090. /** 统计所选字段的平均值。 */
  6091. "AVERAGE": "average",
  6092. /** 统计所选字段的总和。 */
  6093. "SUM": "sum",
  6094. /** 统计所选字段的方差。 */
  6095. "VARIANCE": "variance",
  6096. /** 统计所选字段的标准差 */
  6097. "STDDEVIATION": "stdDeviation"
  6098. };
  6099. /**
  6100. * @enum SummaryType
  6101. * @memberOf SuperMap
  6102. * @description 分布式分析聚合类型
  6103. * @type {string}
  6104. */
  6105. var SummaryType = SuperMap.SummaryType = {
  6106. /** 格网聚合。 */
  6107. "SUMMARYMESH": "SUMMARYMESH",
  6108. /** 多边形聚合。 */
  6109. "SUMMARYREGION": "SUMMARYREGION"
  6110. };
  6111. /**
  6112. * @enum TopologyValidatorRule
  6113. * @memberOf SuperMap
  6114. * @description 拓扑检查模式枚举。该类定义了拓扑检查操作模式常量。
  6115. * @type {string}
  6116. */
  6117. var TopologyValidatorRule = SuperMap.TopologyValidatorRule = {
  6118. /** 面内无重叠,用于对面数据进行拓扑检查。 */
  6119. REGIONNOOVERLAP: "REGIONNOOVERLAP",
  6120. /** 面与面无重叠,用于对面数据进行拓扑检查。 */
  6121. REGIONNOOVERLAPWITH: "REGIONNOOVERLAPWITH",
  6122. /** 面被面包含,用于对面数据进行拓扑检查。 */
  6123. REGIONCONTAINEDBYREGION: "REGIONCONTAINEDBYREGION",
  6124. /** 面被面覆盖,用于对面数据进行拓扑检查。 */
  6125. REGIONCOVEREDBYREGION: "REGIONCOVEREDBYREGION",
  6126. /** 线与线无重叠,用于对线数据进行拓扑检查。 */
  6127. LINENOOVERLAP: "LINENOOVERLAP",
  6128. /** 线内无重叠,用于对线数据进行拓扑检查。 */
  6129. LINENOOVERLAPWITH: "LINENOOVERLAPWITH",
  6130. /** 点不相同,用于对点数据进行拓扑检查。 */
  6131. POINTNOIDENTICAL: "POINTNOIDENTICAL"
  6132. };
  6133. /**
  6134. * @enum AggregationType
  6135. * @memberOf SuperMap
  6136. * @description 聚合查询枚举类,该类定义了Es数据服务中聚合查询模式常量
  6137. * @type {string}
  6138. */
  6139. var AggregationType = SuperMap.AggregationType = {
  6140. /** 格网聚合类型。 */
  6141. GEOHASH_GRID: "geohash_grid",
  6142. /** 过滤聚合类型。 */
  6143. FILTER: "filter"
  6144. };
  6145. /**
  6146. * @enum AggregationType
  6147. * @memberOf SuperMap
  6148. * @description 聚合查询中filter查询枚举类
  6149. * @type {string}
  6150. */
  6151. var AggregationQueryBuilderType = SuperMap.AggregationQueryBuilderType = {
  6152. /** 范围查询。 */
  6153. GEO_BOUNDING_BOX: "geo_bounding_box"
  6154. };
  6155. /**
  6156. * @enum GetFeatureMode
  6157. * @memberOf SuperMap
  6158. * @description feature 查询方式。
  6159. * @type {string}
  6160. */
  6161. var GetFeatureMode = SuperMap.GetFeatureMode = {
  6162. /** 通过范围查询来获取要素。 */
  6163. BOUNDS: "BOUNDS",
  6164. /** 通过几何对象的缓冲区来获取要素。 */
  6165. BUFFER: "BUFFER",
  6166. /** 通过 ID 来获取要素。 */
  6167. ID: "ID",
  6168. /** 通过空间查询模式来获取要素。 */
  6169. SPATIAL: "SPATIAL",
  6170. /** 通过 SQL 查询来获取要素。 */
  6171. SQL: 'SQL'
  6172. };
  6173. /**
  6174. * @enum RasterFunctionType
  6175. * @memberOf SuperMap
  6176. * @description 栅格分析方法。
  6177. * @type {string}
  6178. */
  6179. var RasterFunctionType = SuperMap.RasterFunctionType = {
  6180. /** 归一化植被指数。 */
  6181. NDVI: "NDVI",
  6182. /** 阴影面分析。 */
  6183. HILLSHADE: "HILLSHADE"
  6184. };
  6185. /**
  6186. * @enum ResourceType
  6187. * @memberOf SuperMap
  6188. * @description iportal资源类型。
  6189. * @version 10.0.1
  6190. * @type {string}
  6191. */
  6192. var ResourceType = SuperMap.ResourceType = {
  6193. /** 地图。 */
  6194. MAP: "MAP",
  6195. /** 服务。 */
  6196. SERVICE: "SERVICE",
  6197. /** 场景。 */
  6198. SCENE: "SCENE",
  6199. /** 数据。 */
  6200. DATA: "DATA",
  6201. /** 洞察。 */
  6202. INSIGHTS_WORKSPACE: "INSIGHTS_WORKSPACE",
  6203. /** 大屏。 */
  6204. MAP_DASHBOARD: "MAP_DASHBOARD"
  6205. };
  6206. /**
  6207. * @enum OrderBy
  6208. * @memberOf SuperMap
  6209. * @description iportal资源排序字段。
  6210. * @version 10.0.1
  6211. * @type {string}
  6212. */
  6213. var OrderBy = SuperMap.OrderBy = {
  6214. /** 按更新时间排序 */
  6215. UPDATETIME: "UPDATETIME",
  6216. /** 按热度(可能是访问量、下载量)排序 */
  6217. HEATLEVEL: "HEATLEVEL",
  6218. /** 按相关性排序 */
  6219. RELEVANCE: "RELEVANCE"
  6220. };
  6221. /**
  6222. * @enum OrderType
  6223. * @memberOf SuperMap
  6224. * @description iportal资源升序还是降序过滤
  6225. * @version 10.0.1
  6226. * @type {string}
  6227. */
  6228. var OrderType = SuperMap.OrderType = {
  6229. /** 升序 */
  6230. ASC: "ASC",
  6231. /** 降序 */
  6232. DESC: "DESC"
  6233. };
  6234. /**
  6235. * @enum SearchType
  6236. * @memberOf SuperMap
  6237. * @description iportal资源查询的范围进行过滤
  6238. * @version 10.0.1
  6239. * @type {string}
  6240. */
  6241. var SearchType = SuperMap.SearchType = {
  6242. /** 公开资源。 */
  6243. PUBLIC: "PUBLIC",
  6244. /** 我的资源。 */
  6245. MY_RES: "MY_RES",
  6246. /** 我的群组资源。 */
  6247. MYGROUP_RES: "MYGROUP_RES",
  6248. /** 我的部门资源。 */
  6249. MYDEPARTMENT_RES: "MYDEPARTMENT_RES",
  6250. /** 分享给我的资源。 */
  6251. SHARETOME_RES: "SHARETOME_RES"
  6252. };
  6253. /**
  6254. * @enum AggregationTypes
  6255. * @memberOf SuperMap
  6256. * @description iportal资源聚合查询的类型
  6257. * @version 10.0.1
  6258. * @type {string}
  6259. */
  6260. var AggregationTypes = SuperMap.AggregationTypes = {
  6261. /** 标签 */
  6262. TAG: "TAG",
  6263. /** 资源类型 */
  6264. TYPE: "TYPE"
  6265. };
  6266. /**
  6267. * @enum PermissionType
  6268. * @memberOf SuperMap
  6269. * @description iportal资源权限类型。
  6270. * @version 10.0.1
  6271. * @type {string}
  6272. */
  6273. var PermissionType = SuperMap.PermissionType = {
  6274. /** 可检索 */
  6275. SEARCH: "SEARCH",
  6276. /** 可查看 */
  6277. READ: "READ",
  6278. /** 可编辑 */
  6279. READWRITE: "READWRITE",
  6280. /** 可删除 */
  6281. DELETE: "DELETE",
  6282. /** 可下载,包括可读、可检索 */
  6283. DOWNLOAD: "DOWNLOAD"
  6284. };
  6285. /**
  6286. * @enum EntityType
  6287. * @memberOf SuperMap
  6288. * @description iportal资源实体类型。
  6289. * @version 10.0.1
  6290. * @type {string}
  6291. */
  6292. var EntityType = SuperMap.EntityType = {
  6293. /** 部门 */
  6294. DEPARTMENT: "DEPARTMENT",
  6295. /** 用户组 */
  6296. GROUP: "GROUP",
  6297. /** 群组 */
  6298. IPORTALGROUP: "IPORTALGROUP",
  6299. /** 角色 */
  6300. ROLE: "ROLE",
  6301. /** 用户 */
  6302. USER: "USER"
  6303. };
  6304. /**
  6305. * @enum DataItemType
  6306. * @memberOf SuperMap
  6307. * @description iportal数据类型。
  6308. * @version 10.0.1
  6309. * @type {string}
  6310. */
  6311. var DataItemType = SuperMap.DataItemType = {
  6312. /** 工作空间 sxwu, smwu, sxw, smw */
  6313. WORKSPACE: "WORKSPACE",
  6314. /** udb 数据源 */
  6315. UDB: "UDB",
  6316. /** shp空间数据 */
  6317. SHP: "SHP",
  6318. /** excel数据 */
  6319. EXCEL: "EXCEL",
  6320. /** csv数据 */
  6321. CSV: "CSV",
  6322. /** geojson数据。 */
  6323. GEOJSON: "GEOJSON",
  6324. /** smtiles */
  6325. SMTILES: "SMTILES",
  6326. /** svtiles */
  6327. SVTILES: "SVTILES",
  6328. /** mbtiles */
  6329. MBTILES: "MBTILES",
  6330. /** tpk */
  6331. TPK: "TPK",
  6332. /** ugc v5 */
  6333. UGCV5: "UGCV5",
  6334. /** UGCV5_MVT */
  6335. UGCV5_MVT: "UGCV5_MVT",
  6336. /** json数据 */
  6337. JSON: "JSON"
  6338. };
  6339. /**
  6340. * @enum WebExportFormatType
  6341. * @memberOf SuperMap
  6342. * @description Web 打印输出的格式。
  6343. * @version 10.0.1
  6344. * @type {string}
  6345. */
  6346. var WebExportFormatType = SuperMap.WebExportFormatType = {
  6347. /** png */
  6348. PNG: "PNG",
  6349. /** pdf */
  6350. PDF: "PDF"
  6351. };
  6352. /**
  6353. * @enum WebScaleOrientationType
  6354. * @memberOf SuperMap
  6355. * @description Web 比例尺的方位样式。
  6356. * @version 10.0.1
  6357. * @type {string}
  6358. */
  6359. var WebScaleOrientationType = SuperMap.WebScaleOrientationType = {
  6360. /** horizontal labels below */
  6361. HORIZONTALLABELSBELOW: "HORIZONTALLABELSBELOW",
  6362. /** horizontal labels above */
  6363. HORIZONTALLABELSABOVE: "HORIZONTALLABELSABOVE",
  6364. /** vertical labels left */
  6365. VERTICALLABELSLEFT: "VERTICALLABELSLEFT",
  6366. /** vertical labels right */
  6367. VERTICALLABELSRIGHT: "VERTICALLABELSRIGHT"
  6368. };
  6369. /**
  6370. * @enum WebScaleType
  6371. * @memberOf SuperMap
  6372. * @description Web 比例尺的样式。
  6373. * @version 10.0.1
  6374. * @type {string}
  6375. */
  6376. var WebScaleType = SuperMap.WebScaleType = {
  6377. /** line */
  6378. LINE: "LINE",
  6379. /** bar */
  6380. BAR: "BAR",
  6381. /** bar sub */
  6382. BAR_SUB: "BAR_SUB"
  6383. };
  6384. /**
  6385. * @enum WebScaleUnit
  6386. * @memberOf SuperMap
  6387. * @description Web 比例尺的单位制。
  6388. * @version 10.0.1
  6389. * @type {string}
  6390. */
  6391. var WebScaleUnit = SuperMap.WebScaleUnit = {
  6392. /** meter */
  6393. METER: "METER",
  6394. /** foot */
  6395. FOOT: "FOOT",
  6396. /** degrees */
  6397. DEGREES: "DEGREES"
  6398. };
  6399. // CONCATENATED MODULE: ./src/common/iServer/DatasourceConnectionInfo.js
  6400. function DatasourceConnectionInfo_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6401. function DatasourceConnectionInfo_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  6402. function DatasourceConnectionInfo_createClass(Constructor, protoProps, staticProps) { if (protoProps) DatasourceConnectionInfo_defineProperties(Constructor.prototype, protoProps); if (staticProps) DatasourceConnectionInfo_defineProperties(Constructor, staticProps); return Constructor; }
  6403. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  6404. * This program are made available under the terms of the Apache License, Version 2.0
  6405. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  6406. // eslint-disable-line no-unused-vars
  6407. /**
  6408. * @class SuperMap.DatasourceConnectionInfo
  6409. * @category iServer Data
  6410. * @classdesc 数据源连接信息类。该类包括了进行数据源连接的所有信息,如所要连接的服务器名称、数据库名称、用户名以及密码等。
  6411. * 当保存为工作空间时, 工作空间中的数据源的连接信息都将存储到工作空间文件中。对于不同类型的数据源,其连接信息有所区别。
  6412. * 所以在使 用该类所包含的成员时,请注意该成员所适用的数据源类型。对于从数据源对象中返回的数据连接信息对象,只有 connect 方法可以被修改,
  6413. * 其他内容是不可以被修改的。对于用户创建的数据源连接信息对象,其内容都可以修改。
  6414. * @category iServer Data
  6415. * @param {Object} options - 参数。
  6416. * @param {string} options.alias - 数据源别名。
  6417. * @param {string} options.dataBase - 数据源连接的数据库名。
  6418. * @param {boolean} [options.connect] - 数据源是否自动连接数据。
  6419. * @param {string} [options.driver] - 使用 ODBC(Open Database Connectivity,开放数据库互连)的数据库的驱动程序名。
  6420. * @param {SuperMap.EngineType} [options.engineType] - 数据源连接的引擎类型。
  6421. * @param {boolean} [options.exclusive] - 是否以独占方式打开数据源。
  6422. * @param {boolean} [options.OpenLinkTable] - 是否把数据库中的其他非 SuperMap 数据表作为 LinkTable 打开。
  6423. * @param {string} [options.password] - 登录数据源连接的数据库或文件的密码。
  6424. * @param {boolean} [options.readOnly] - 是否以只读方式打开数据源。
  6425. * @param {string} [options.server] - 数据库服务器名或 SDB 文件名。
  6426. * @param {string} [options.user] - 登录数据库的用户名。
  6427. */
  6428. var DatasourceConnectionInfo_DatasourceConnectionInfo = /*#__PURE__*/function () {
  6429. function DatasourceConnectionInfo(options) {
  6430. DatasourceConnectionInfo_classCallCheck(this, DatasourceConnectionInfo);
  6431. /**
  6432. * @member {string} SuperMap.DatasourceConnectionInfo.prototype.alias
  6433. * @description 数据源别名。
  6434. */
  6435. this.alias = null;
  6436. /**
  6437. * @member {boolean} [SuperMap.DatasourceConnectionInfo.prototype.connect]
  6438. * @description 数据源是否自动连接数据。
  6439. */
  6440. this.connect = null;
  6441. /**
  6442. * @member {string} SuperMap.DatasourceConnectionInfo.prototype.dataBase
  6443. * @description 数据源连接的数据库名。
  6444. */
  6445. this.dataBase = null;
  6446. /**
  6447. * @member {string} [SuperMap.DatasourceConnectionInfo.prototype.driver]
  6448. * @description 使用 ODBC(Open Database Connectivity,开放数据库互连) 的数据库的驱动程序名。
  6449. * 其中,对于 SQL Server 数据库与 iServer 发布的 WMTS 服务,此为必设参数。
  6450. * 对于 SQL Server 数据库,它使用 ODBC 连接,所设置的驱动程序名为 "SQL Server" 或 "SQL Native Client";
  6451. * 对于 iServer 发布的 WMTS 服务,设置的驱动名称为 "WMTS"。
  6452. */
  6453. this.driver = null;
  6454. /**
  6455. * @member {SuperMap.EngineType} [SuperMap.DatasourceConnectionInfo.prototype.engineType]
  6456. * @description 数据源连接的引擎类型。
  6457. */
  6458. this.engineType = null;
  6459. /**
  6460. * @member {boolean} [SuperMap.DatasourceConnectionInfo.prototype.exclusive]
  6461. * @description 是否以独占方式打开数据源。
  6462. */
  6463. this.exclusive = null;
  6464. /**
  6465. * @member {boolean} [SuperMap.DatasourceConnectionInfo.prototype.OpenLinkTable]
  6466. * @description 是否把数据库中的其他非 SuperMap 数据表作为 LinkTable 打开。
  6467. */
  6468. this.OpenLinkTable = null;
  6469. /**
  6470. * @member {string} [SuperMap.DatasourceConnectionInfo.prototype.password]
  6471. * @description 登录数据源连接的数据库或文件的密码。
  6472. */
  6473. this.password = null;
  6474. /**
  6475. * @member {boolean} [SuperMap.DatasourceConnectionInfo.prototype.readOnly]
  6476. * @description 是否以只读方式打开数据源。
  6477. */
  6478. this.readOnly = null;
  6479. /**
  6480. * @member {string} [SuperMap.DatasourceConnectionInfo.prototype.server]
  6481. * @description 数据库服务器名、文件名或服务地址。
  6482. * 1.对于 SDB 和 UDB 文件,为其文件的绝对路径。注意:当绝对路径的长度超过 UTF-8 编码格式的 260 字节长度,该数据源无法打开。
  6483. * 2.对于 Oracle 数据库,其服务器名为其 TNS 服务名称。
  6484. * 3.对于 SQL Server 数据库,其服务器名为其系统的 DSN(Database Source Name) 名称。
  6485. * 4.对于 PostgreSQL 数据库,其服务器名为 “IP:端口号”,默认的端口号是 5432。
  6486. * 5.对于 DB2 数据库,已经进行了编目,所以不需要进行服务器的设置。
  6487. * 6.对于 Kingbase 数据库,其服务器名为其 IP 地址。
  6488. * 7.对于 GoogleMaps 数据源,其服务器地址,默认设置为 “{@link http://maps.google.com}”,且不可更改。
  6489. * 8.对于 SuperMapCould 数据源,为其服务地址。
  6490. * 9.对于 MAPWORLD 数据源,为其服务地址,默认设置为 “{@link http://www.tianditu.cn}”,且不可更改。
  6491. * 10.对于 OGC 和 REST 数据源,为其服务地址。
  6492. */
  6493. this.server = null;
  6494. /**
  6495. * @member {string} SuperMap.DatasourceConnectionInfo.prototype.user
  6496. * @description 登录数据库的用户名。
  6497. */
  6498. this.user = null;
  6499. if (options) {
  6500. Util.extend(this, options);
  6501. }
  6502. this.CLASS_NAME = "SuperMap.DatasourceConnectionInfo";
  6503. }
  6504. /**
  6505. * @function SuperMap.DatasourceConnectionInfo.prototype.destroy
  6506. * @description 释放资源,将引用资源的属性置空。
  6507. */
  6508. DatasourceConnectionInfo_createClass(DatasourceConnectionInfo, [{
  6509. key: "destroy",
  6510. value: function destroy() {
  6511. var me = this;
  6512. me.alias = null;
  6513. me.connect = null;
  6514. me.dataBase = null;
  6515. me.driver = null;
  6516. me.engineType = null;
  6517. me.exclusive = null;
  6518. me.OpenLinkTable = null;
  6519. me.password = null;
  6520. me.readOnly = null;
  6521. me.server = null;
  6522. me.user = null;
  6523. }
  6524. }]);
  6525. return DatasourceConnectionInfo;
  6526. }();
  6527. SuperMap.DatasourceConnectionInfo = DatasourceConnectionInfo_DatasourceConnectionInfo;
  6528. // CONCATENATED MODULE: ./src/common/iServer/OutputSetting.js
  6529. function OutputSetting_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6530. function OutputSetting_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  6531. function OutputSetting_createClass(Constructor, protoProps, staticProps) { if (protoProps) OutputSetting_defineProperties(Constructor.prototype, protoProps); if (staticProps) OutputSetting_defineProperties(Constructor, staticProps); return Constructor; }
  6532. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  6533. * This program are made available under the terms of the Apache License, Version 2.0
  6534. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  6535. /**
  6536. * @class SuperMap.OutputSetting
  6537. * @category iServer ProcessingService
  6538. * @classdesc 分布式分析输出类型设置类。
  6539. * @param {Object} options - 参数。
  6540. * @param {SuperMap.DatasourceConnectionInfo} options.datasourceInfo - 数据源连接信息。
  6541. * @param {string} [options.datasetName='analystResult'] - 结果数据集名称。
  6542. * @param {SuperMap.OutputType} [options.type=SuperMap.OutputType.UDB] - 输出类型。
  6543. * @param {string} [options.outputPath] - 分析结果输出路径。
  6544. */
  6545. var OutputSetting_OutputSetting = /*#__PURE__*/function () {
  6546. function OutputSetting(options) {
  6547. OutputSetting_classCallCheck(this, OutputSetting);
  6548. /**
  6549. * @member {SuperMap.OutputType} SuperMap.OutputSetting.prototype.type
  6550. * @description 分布式分析的输出类型。
  6551. */
  6552. this.type = OutputType.UDB;
  6553. /**
  6554. * @member {string} [SuperMap.OutputSetting.prototype.datasetName='analystResult']
  6555. * @description 分布式分析的输出结果数据集名称。
  6556. */
  6557. this.datasetName = "analystResult";
  6558. /**
  6559. * @member {SuperMap.DatasourceConnectionInfo} SuperMap.OutputSetting.prototype.datasourceInfo
  6560. * @description 分布式分析的输出结果数据源连接信息。
  6561. */
  6562. this.datasourceInfo = null;
  6563. /**
  6564. * @member {string} [SuperMap.OutputSetting.prototype.outputPath]
  6565. * @description 分布式分析的分析结果输出路径。
  6566. */
  6567. this.outputPath = "";
  6568. Util.extend(this, options);
  6569. this.CLASS_NAME = "SuperMap.OutputSetting";
  6570. }
  6571. /**
  6572. * @function SuperMap.OutputSetting.prototype.destroy
  6573. * @description 释放资源,将引用资源的属性置空。
  6574. */
  6575. OutputSetting_createClass(OutputSetting, [{
  6576. key: "destroy",
  6577. value: function destroy() {
  6578. var me = this;
  6579. me.type = null;
  6580. me.datasetName = null;
  6581. me.outputPath = null;
  6582. if (me.datasourceInfo instanceof DatasourceConnectionInfo_DatasourceConnectionInfo) {
  6583. me.datasourceInfo.destroy();
  6584. me.datasourceInfo = null;
  6585. }
  6586. }
  6587. }]);
  6588. return OutputSetting;
  6589. }();
  6590. SuperMap.OutputSetting = OutputSetting_OutputSetting;
  6591. // CONCATENATED MODULE: ./src/common/iServer/MappingParameters.js
  6592. function MappingParameters_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6593. function MappingParameters_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  6594. function MappingParameters_createClass(Constructor, protoProps, staticProps) { if (protoProps) MappingParameters_defineProperties(Constructor.prototype, protoProps); if (staticProps) MappingParameters_defineProperties(Constructor, staticProps); return Constructor; }
  6595. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  6596. * This program are made available under the terms of the Apache License, Version 2.0
  6597. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  6598. /**
  6599. * @class SuperMap.MappingParameters
  6600. * @category iServer ProcessingService
  6601. * @classdesc 分析后结果可视化的参数类。
  6602. * @param {Object} options - 参数。
  6603. * @param {Array.<SuperMap.ThemeGridRangeItem>} [options.items] - 栅格分段专题图子项数组。
  6604. * @param {number} [options.numericPrecision=1] - 精度,此字段用于设置分析结果标签专题图中标签数值的精度,如“1”表示精确到小数点的后一位。
  6605. * @param {SuperMap.RangeMode} [options.rangeMode=SuperMap.RangeMode.EQUALINTERVAL] - 专题图分段模式。
  6606. * @param {number} [options.rangeCount] - 专题图分段个数。
  6607. * @param {SuperMap.ColorGradientType} [options.colorGradientType=SuperMap.ColorGradientType.YELLOW_RED] - 专题图颜色渐变模式。
  6608. */
  6609. var MappingParameters_MappingParameters = /*#__PURE__*/function () {
  6610. function MappingParameters(options) {
  6611. MappingParameters_classCallCheck(this, MappingParameters);
  6612. /**
  6613. * @member {Array.<SuperMap.ThemeGridRangeItem>} [SuperMap.MappingParameters.prototype.items]
  6614. * @description 栅格分段专题图子项数组。
  6615. */
  6616. this.items = null;
  6617. /**
  6618. * @member {number} [SuperMap.MappingParameters.prototype.numericPrecision=1]
  6619. * @description 精度,此字段用于设置分析结果标签专题图中标签数值的精度,如“1”表示精确到小数点的后一位。
  6620. */
  6621. this.numericPrecision = 1;
  6622. /**
  6623. * @member {SuperMap.RangeMode} [SuperMap.MappingParameters.prototype.RangeMode=SuperMap.RangeMode.EQUALINTERVAL]
  6624. * @description 专题图分段模式。
  6625. */
  6626. this.rangeMode = RangeMode.EQUALINTERVAL;
  6627. /**
  6628. * @member {number} [SuperMap.MappingParameters.prototype.rangeCount]
  6629. * @description 专题图分段个数。
  6630. */
  6631. this.rangeCount = "";
  6632. /**
  6633. * @member {SuperMap.ColorGradientType} [SuperMap.MappingParameters.prototype.colorGradientType=SuperMap.ColorGradientType.YELLOW_RED]
  6634. * @description 专题图颜色渐变模式。
  6635. */
  6636. this.colorGradientType = ColorGradientType.YELLOW_RED;
  6637. Util.extend(this, options);
  6638. this.CLASS_NAME = "SuperMap.MappingParameters";
  6639. }
  6640. /**
  6641. * @function SuperMap.MappingParameters.prototype.destroy
  6642. * @description 释放资源,将引用资源的属性置空。
  6643. */
  6644. MappingParameters_createClass(MappingParameters, [{
  6645. key: "destroy",
  6646. value: function destroy() {
  6647. var me = this;
  6648. if (me.items) {
  6649. if (me.items.length > 0) {
  6650. for (var item in me.items) {
  6651. me.items[item].destroy();
  6652. me.items[item] = null;
  6653. }
  6654. }
  6655. me.items = null;
  6656. }
  6657. me.numericPrecision = null;
  6658. me.rangeMode = null;
  6659. me.rangeCount = null;
  6660. me.colorGradientType = null;
  6661. }
  6662. }]);
  6663. return MappingParameters;
  6664. }();
  6665. SuperMap.MappingParameters = MappingParameters_MappingParameters;
  6666. // CONCATENATED MODULE: ./src/common/iServer/KernelDensityJobParameter.js
  6667. function KernelDensityJobParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6668. function KernelDensityJobParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  6669. function KernelDensityJobParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) KernelDensityJobParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) KernelDensityJobParameter_defineProperties(Constructor, staticProps); return Constructor; }
  6670. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  6671. * This program are made available under the terms of the Apache License, Version 2.0
  6672. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  6673. /**
  6674. * @class SuperMap.KernelDensityJobParameter
  6675. * @category iServer ProcessingService DensityAnalyst
  6676. * @classdesc 密度分析任务参数类。
  6677. * @param {Object} options - 参数。
  6678. * @param {string} options.datasetName - 数据集名。
  6679. * @param {string} options.fields - 权重索引。
  6680. * @param {(SuperMap.Bounds|L.Bounds|ol.extent)} [options.query] - 分析范围(默认为全图范围)。
  6681. * @param {number} [options.resolution=80] - 分辨率。
  6682. * @param {number} [options.method=0] - 分析方法。
  6683. * @param {number} [options.meshType=0] - 分析类型。
  6684. * @param {number} [options.radius=300] - 分析的影响半径。
  6685. * @param {SuperMap.OutputSetting} [options.output] - 输出参数设置。
  6686. * @param {SuperMap.MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  6687. */
  6688. var KernelDensityJobParameter_KernelDensityJobParameter = /*#__PURE__*/function () {
  6689. function KernelDensityJobParameter(options) {
  6690. KernelDensityJobParameter_classCallCheck(this, KernelDensityJobParameter);
  6691. if (!options) {
  6692. return;
  6693. }
  6694. /**
  6695. * @member {string} SuperMap.KernelDensityJobParameter.prototype.datasetName
  6696. * @description 数据集名。
  6697. */
  6698. this.datasetName = "";
  6699. /**
  6700. * @member {SuperMap.Bounds|L.Bounds|ol.extent} [SuperMap.KernelDensityJobParameter.prototype.query]
  6701. * @description 分析范围。
  6702. */
  6703. this.query = "";
  6704. /**
  6705. * @member {number} [SuperMap.KernelDensityJobParameter.prototype.resolution=80]
  6706. * @description 网格大小。
  6707. */
  6708. this.resolution = 80;
  6709. /**
  6710. * @member {number} [SuperMap.KernelDensityJobParameter.prototype.method=0]
  6711. * @description 分析方法。
  6712. */
  6713. this.method = 0;
  6714. /**
  6715. * @member {number} [SuperMap.KernelDensityJobParameter.prototype.meshType=0]
  6716. * @description 分析类型。
  6717. */
  6718. this.meshType = 0;
  6719. /**
  6720. * @member {string} SuperMap.KernelDensityJobParameter.prototype.fields
  6721. * @description 权重索引。
  6722. */
  6723. this.fields = "";
  6724. /**
  6725. * @member {number} [SuperMap.KernelDensityJobParameter.prototype.radius=300]
  6726. * @description 分析的影响半径。
  6727. */
  6728. this.radius = 300;
  6729. /**
  6730. * @member {SuperMap.AnalystSizeUnit} [SuperMap.KernelDensityJobParameter.prototype.meshSizeUnit=SuperMap.AnalystSizeUnit.METER]
  6731. * @description 网格大小单位。
  6732. */
  6733. this.meshSizeUnit = AnalystSizeUnit.METER;
  6734. /**
  6735. * @member {SuperMap.AnalystSizeUnit} [SuperMap.KernelDensityJobParameter.prototype.radiusUnit=SuperMap.AnalystSizeUnit.METER]
  6736. * @description 搜索半径单位。
  6737. */
  6738. this.radiusUnit = AnalystSizeUnit.METER;
  6739. /**
  6740. * @member {SuperMap.AnalystAreaUnit} [SuperMap.KernelDensityJobParameter.prototype.areaUnit=SuperMap.AnalystAreaUnit.SQUAREMILE]
  6741. * @description 面积单位。
  6742. */
  6743. this.areaUnit = AnalystAreaUnit.SQUAREMILE;
  6744. /**
  6745. * @member {SuperMap.OutputSetting} SuperMap.KernelDensityJobParameter.prototype.output
  6746. * @description 输出参数设置类
  6747. */
  6748. this.output = null;
  6749. /**
  6750. * @member {SuperMap.MappingParameters} [SuperMap.KernelDensityJobParameter.prototype.mappingParameters]
  6751. * @description 分析后结果可视化的参数类。
  6752. */
  6753. this.mappingParameters = null;
  6754. Util.extend(this, options);
  6755. this.CLASS_NAME = "SuperMap.KernelDensityJobParameter";
  6756. }
  6757. /**
  6758. * @function SuperMap.KernelDensityJobParameter.prototype.destroy
  6759. * @description 释放资源,将引用资源的属性置空。
  6760. */
  6761. KernelDensityJobParameter_createClass(KernelDensityJobParameter, [{
  6762. key: "destroy",
  6763. value: function destroy() {
  6764. this.datasetName = null;
  6765. this.query = null;
  6766. this.resolution = null;
  6767. this.method = null;
  6768. this.radius = null;
  6769. this.meshType = null;
  6770. this.fields = null;
  6771. this.meshSizeUnit = null;
  6772. this.radiusUnit = null;
  6773. this.areaUnit = null;
  6774. if (this.output instanceof OutputSetting_OutputSetting) {
  6775. this.output.destroy();
  6776. this.output = null;
  6777. }
  6778. if (this.mappingParameters instanceof MappingParameters_MappingParameters) {
  6779. this.mappingParameters.destroy();
  6780. this.mappingParameters = null;
  6781. }
  6782. }
  6783. /**
  6784. * @function SuperMap.KernelDensityJobParameter.toObject
  6785. * @param {SuperMap.KernelDensityJobParameter} kernelDensityJobParameter - 密度分析任务参数类。
  6786. * @param {SuperMap.KernelDensityJobParameter} tempObj - 密度分析任务参数对象。
  6787. * @description 将密度分析任务参数对象转换为 JSON 对象。
  6788. * @returns JSON 对象。
  6789. */
  6790. }], [{
  6791. key: "toObject",
  6792. value: function toObject(kernelDensityJobParameter, tempObj) {
  6793. for (var name in kernelDensityJobParameter) {
  6794. if (name === "datasetName") {
  6795. tempObj['input'] = tempObj['input'] || {};
  6796. tempObj['input'][name] = kernelDensityJobParameter[name];
  6797. continue;
  6798. }
  6799. if (name === "output") {
  6800. tempObj['output'] = tempObj['output'] || {};
  6801. tempObj['output'] = kernelDensityJobParameter[name];
  6802. continue;
  6803. }
  6804. tempObj['analyst'] = tempObj['analyst'] || {};
  6805. if (name === 'query' && kernelDensityJobParameter[name]) {
  6806. tempObj['analyst'][name] = kernelDensityJobParameter[name].toBBOX();
  6807. } else {
  6808. tempObj['analyst'][name] = kernelDensityJobParameter[name];
  6809. }
  6810. if (name === 'mappingParameters') {
  6811. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  6812. tempObj['analyst']['mappingParameters'] = kernelDensityJobParameter[name];
  6813. }
  6814. }
  6815. }
  6816. }]);
  6817. return KernelDensityJobParameter;
  6818. }();
  6819. SuperMap.KernelDensityJobParameter = KernelDensityJobParameter_KernelDensityJobParameter;
  6820. // CONCATENATED MODULE: ./src/common/iServer/SingleObjectQueryJobsParameter.js
  6821. function SingleObjectQueryJobsParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6822. function SingleObjectQueryJobsParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  6823. function SingleObjectQueryJobsParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) SingleObjectQueryJobsParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) SingleObjectQueryJobsParameter_defineProperties(Constructor, staticProps); return Constructor; }
  6824. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  6825. * This program are made available under the terms of the Apache License, Version 2.0
  6826. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  6827. /**
  6828. * @class SuperMap.SingleObjectQueryJobsParameter
  6829. * @category iServer ProcessingService Query
  6830. * @classdesc 单对象空间查询分析任务参数类。
  6831. * @param {Object} options - 参数。
  6832. * @param {string} options.datasetName - 数据集名。
  6833. * @param {string} options.datasetQuery - 查询对象所在的数据集名称。
  6834. * @param {SuperMap.SpatialQueryMode} [options.mode=SuperMap.SpatialQueryMode.CONTAIN] - 空间查询模式。
  6835. * @param {SuperMap.OutputSetting} [options.output] - 输出参数设置。
  6836. * @param {SuperMap.MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  6837. */
  6838. var SingleObjectQueryJobsParameter_SingleObjectQueryJobsParameter = /*#__PURE__*/function () {
  6839. function SingleObjectQueryJobsParameter(options) {
  6840. SingleObjectQueryJobsParameter_classCallCheck(this, SingleObjectQueryJobsParameter);
  6841. if (!options) {
  6842. return;
  6843. }
  6844. /**
  6845. * @member {string} SuperMap.SingleObjectQueryJobsParameter.prototype.datasetName
  6846. * @description 数据集名。
  6847. */
  6848. this.datasetName = "";
  6849. /**
  6850. * @member {string} SuperMap.SingleObjectQueryJobsParameter.prototype.datasetQuery
  6851. * @description 查询对象所在的数据集名称。
  6852. */
  6853. this.datasetQuery = "";
  6854. /**
  6855. * @member {string} SuperMap.SingleObjectQueryJobsParameter.prototype.geometryQuery
  6856. * @description 查询对象所在的几何对象。
  6857. */
  6858. this.geometryQuery = "";
  6859. /**
  6860. * @member {SuperMap.SpatialQueryMode} [SuperMap.SingleObjectQueryJobsParameter.prototype.mode=SuperMap.SpatialQueryMode.CONTAIN]
  6861. * @description 空间查询模式 。
  6862. */
  6863. this.mode = SpatialQueryMode.CONTAIN;
  6864. /**
  6865. * @member {SuperMap.OutputSetting} [SuperMap.SingleObjectQueryJobsParameter.prototype.output]
  6866. * @description 输出参数设置类。
  6867. */
  6868. this.output = null;
  6869. /**
  6870. * @member {SuperMap.MappingParameters} [SuperMap.SingleObjectQueryJobsParameter.prototype.mappingParameters]
  6871. * @description 分析后结果可视化的参数类。
  6872. */
  6873. this.mappingParameters = null;
  6874. Util.extend(this, options);
  6875. this.CLASS_NAME = "SuperMap.SingleObjectQueryJobsParameter";
  6876. }
  6877. /**
  6878. * @function SuperMap.SingleObjectQueryJobsParameter.prototype.destroy
  6879. * @description 释放资源,将引用资源的属性置空。
  6880. */
  6881. SingleObjectQueryJobsParameter_createClass(SingleObjectQueryJobsParameter, [{
  6882. key: "destroy",
  6883. value: function destroy() {
  6884. this.datasetName = null;
  6885. this.datasetQuery = null;
  6886. this.geometryQuery = null;
  6887. this.mode = null;
  6888. if (this.output instanceof OutputSetting_OutputSetting) {
  6889. this.output.destroy();
  6890. this.output = null;
  6891. }
  6892. if (this.mappingParameters instanceof MappingParameters_MappingParameters) {
  6893. this.mappingParameters.destroy();
  6894. this.mappingParameters = null;
  6895. }
  6896. }
  6897. /**
  6898. * @function SuperMap.SingleObjectQueryJobsParameter.toObject
  6899. * @param {Object} singleObjectQueryJobsParameter - 单对象空间查询分析任务参数。
  6900. * @param {Object} tempObj - 目标对象。
  6901. * @description 生成单对象空间查询分析任务对象。
  6902. */
  6903. }], [{
  6904. key: "toObject",
  6905. value: function toObject(singleObjectQueryJobsParameter, tempObj) {
  6906. for (var name in singleObjectQueryJobsParameter) {
  6907. if (name === "datasetName") {
  6908. tempObj['input'] = tempObj['input'] || {};
  6909. tempObj['input'][name] = singleObjectQueryJobsParameter[name];
  6910. continue;
  6911. }
  6912. if (name === "output") {
  6913. tempObj['output'] = tempObj['output'] || {};
  6914. tempObj['output'] = singleObjectQueryJobsParameter[name];
  6915. continue;
  6916. }
  6917. tempObj['analyst'] = tempObj['analyst'] || {};
  6918. tempObj['analyst'][name] = singleObjectQueryJobsParameter[name];
  6919. if (name === 'mappingParameters') {
  6920. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  6921. tempObj['analyst']['mappingParameters'] = singleObjectQueryJobsParameter[name];
  6922. }
  6923. }
  6924. }
  6925. }]);
  6926. return SingleObjectQueryJobsParameter;
  6927. }();
  6928. SuperMap.SingleObjectQueryJobsParameter = SingleObjectQueryJobsParameter_SingleObjectQueryJobsParameter;
  6929. // CONCATENATED MODULE: ./src/common/iServer/SummaryAttributesJobsParameter.js
  6930. function SummaryAttributesJobsParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  6931. function SummaryAttributesJobsParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  6932. function SummaryAttributesJobsParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) SummaryAttributesJobsParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) SummaryAttributesJobsParameter_defineProperties(Constructor, staticProps); return Constructor; }
  6933. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  6934. * This program are made available under the terms of the Apache License, Version 2.0
  6935. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  6936. /**
  6937. * @class SuperMap.SummaryAttributesJobsParameter
  6938. * @category iServer ProcessingService SummaryAttributes
  6939. * @classdesc 属性汇总分析任务参数类
  6940. * @param {Object} options - 参数。
  6941. * @param {string} options.datasetName - 数据集名。
  6942. * @param {string} options.groupField - 分组字段。
  6943. * @param {string} options.attributeField - 属性字段。
  6944. * @param {string} options.statisticModes - 统计模式。
  6945. * @param {SuperMap.OutputSetting} [options.output] -输出参数设置。
  6946. * @param {SuperMap.MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  6947. */
  6948. var SummaryAttributesJobsParameter_SummaryAttributesJobsParameter = /*#__PURE__*/function () {
  6949. function SummaryAttributesJobsParameter(options) {
  6950. SummaryAttributesJobsParameter_classCallCheck(this, SummaryAttributesJobsParameter);
  6951. if (!options) {
  6952. return;
  6953. }
  6954. /**
  6955. * @member {string} SuperMap.SummaryAttributesJobsParameter.prototype.datasetName
  6956. * @description 汇总数据集名称。
  6957. */
  6958. this.datasetName = "";
  6959. /**
  6960. * @member {string} SuperMap.SummaryAttributesJobsParameter.prototype.groupField
  6961. * @description 分组字段。
  6962. */
  6963. this.groupField = "";
  6964. /**
  6965. * @member {string} SuperMap.SummaryAttributesJobsParameter.prototype.attributeField
  6966. * @description 属性字段。
  6967. */
  6968. this.attributeField = "";
  6969. /**
  6970. * @member {string} SuperMap.SummaryAttributesJobsParameter.prototype.statisticModes
  6971. * @description 属性汇总统计模式。
  6972. */
  6973. this.statisticModes = "";
  6974. /**
  6975. * @member {SuperMap.OutputSetting} SuperMap.SummaryAttributesJobsParameter.prototype.output
  6976. * @description 输出参数设置类。
  6977. */
  6978. this.output = null;
  6979. /**
  6980. * @member {SuperMap.MappingParameters} [SuperMap.SummaryAttributesJobsParameter.prototype.mappingParameters]
  6981. * @description 分析后结果可视化的参数类。
  6982. */
  6983. this.mappingParameters = null;
  6984. Util.extend(this, options);
  6985. this.CLASS_NAME = "SuperMap.SummaryAttributesJobsParameter";
  6986. }
  6987. /**
  6988. * @function SuperMap.SummaryAttributesJobsParameter.destroy
  6989. * @override
  6990. */
  6991. SummaryAttributesJobsParameter_createClass(SummaryAttributesJobsParameter, [{
  6992. key: "destroy",
  6993. value: function destroy() {
  6994. this.datasetName = null;
  6995. this.groupField = null;
  6996. this.attributeField = null;
  6997. this.statisticModes = null;
  6998. if (this.output instanceof OutputSetting_OutputSetting) {
  6999. this.output.destroy();
  7000. this.output = null;
  7001. }
  7002. if (this.mappingParameters instanceof MappingParameters_MappingParameters) {
  7003. this.mappingParameters.destroy();
  7004. this.mappingParameters = null;
  7005. }
  7006. }
  7007. /**
  7008. * @function SuperMap.SummaryAttributesJobsParameter.toObject
  7009. * @param {Object} SummaryAttributesJobsParameter - 属性汇总任务参数。
  7010. * @param {Object} tempObj - 目标对象。
  7011. * @description 生成属性汇总分析任务对象。
  7012. */
  7013. }], [{
  7014. key: "toObject",
  7015. value: function toObject(SummaryAttributesJobsParameter, tempObj) {
  7016. for (var name in SummaryAttributesJobsParameter) {
  7017. if (name === "datasetName") {
  7018. tempObj['input'] = tempObj['input'] || {};
  7019. tempObj['input'][name] = SummaryAttributesJobsParameter[name];
  7020. continue;
  7021. }
  7022. if (name === "output") {
  7023. tempObj['output'] = tempObj['output'] || {};
  7024. tempObj['output'] = SummaryAttributesJobsParameter[name];
  7025. continue;
  7026. }
  7027. tempObj['analyst'] = tempObj['analyst'] || {};
  7028. tempObj['analyst'][name] = SummaryAttributesJobsParameter[name];
  7029. if (name === 'mappingParameters') {
  7030. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  7031. tempObj['analyst']['mappingParameters'] = SummaryAttributesJobsParameter[name];
  7032. }
  7033. }
  7034. }
  7035. }]);
  7036. return SummaryAttributesJobsParameter;
  7037. }();
  7038. SuperMap.SummaryAttributesJobsParameter = SummaryAttributesJobsParameter_SummaryAttributesJobsParameter;
  7039. // CONCATENATED MODULE: ./src/common/iServer/SummaryMeshJobParameter.js
  7040. function SummaryMeshJobParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  7041. function SummaryMeshJobParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  7042. function SummaryMeshJobParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) SummaryMeshJobParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) SummaryMeshJobParameter_defineProperties(Constructor, staticProps); return Constructor; }
  7043. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  7044. * This program are made available under the terms of the Apache License, Version 2.0
  7045. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  7046. /**
  7047. * @class SuperMap.SummaryMeshJobParameter
  7048. * @category iServer ProcessingService AggregatePoints
  7049. * @classdesc 点聚合分析任务参数类。
  7050. * @param {Object} options - 参数。
  7051. * @param {string} options.datasetName - 数据集名。
  7052. * @param {(SuperMap.Bounds|L.Bounds|ol.extent)} [options.query] - 分析范围(默认为全图范围)。
  7053. * @param {number} options.fields - 权重索引。
  7054. * @param {number} [options.resolution=100] - 分辨率。
  7055. * @param {SuperMap.StatisticAnalystMode} [options.statisticModes=SuperMap.StatisticAnalystMode.AVERAGE] - 分析模式。
  7056. * @param {number} [options.meshType=0] - 分析类型。
  7057. * @param {SuperMap.SummaryType} [options.type=SuperMap.SummaryType.SUMMARYMESH] - 聚合类型。
  7058. * @param {SuperMap.OutputSetting} [options.output] - 输出参数设置。
  7059. * @param {SuperMap.MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  7060. */
  7061. var SummaryMeshJobParameter_SummaryMeshJobParameter = /*#__PURE__*/function () {
  7062. function SummaryMeshJobParameter(options) {
  7063. SummaryMeshJobParameter_classCallCheck(this, SummaryMeshJobParameter);
  7064. if (!options) {
  7065. return;
  7066. }
  7067. /**
  7068. * @member {string} SuperMap.SummaryMeshJobParameter.prototype.datasetName
  7069. * @description 数据集名。
  7070. */
  7071. this.datasetName = "";
  7072. /**
  7073. * @member {string} SuperMap.SummaryMeshJobParameter.prototype.regionDataset
  7074. * @description 聚合面数据集(聚合类型为多边形聚合时使用的参数)。
  7075. */
  7076. this.regionDataset = "";
  7077. /**
  7078. * @member {(SuperMap.Bounds|L.Bounds|ol.extent)} SuperMap.SummaryMeshJobParameter.prototype.query
  7079. * @description 分析范围(聚合类型为网格面聚合时使用的参数)。
  7080. */
  7081. this.query = "";
  7082. /**
  7083. * @member {number} [SuperMap.SummaryMeshJobParameter.prototype.resolution=100]
  7084. * @description 分辨率(聚合类型为网格面聚合时使用的参数)。
  7085. */
  7086. this.resolution = 100;
  7087. /**
  7088. * @member {number} [SuperMap.SummaryMeshJobParameter.prototype.meshType=0]
  7089. * @description 网格面类型(聚合类型为网格面聚合时使用的参数),取值:0 或 1。
  7090. */
  7091. this.meshType = 0;
  7092. /**
  7093. * @member {SuperMap.StatisticAnalystMode} [SuperMap.SummaryMeshJobParameter.prototype.statisticModes=SuperMap.StatisticAnalystMode.AVERAGE]
  7094. * @description 统计模式。
  7095. */
  7096. this.statisticModes = StatisticAnalystMode.AVERAGE;
  7097. /**
  7098. * @member {number} SuperMap.SummaryMeshJobParameter.prototype.fields
  7099. * @description 权重字段。
  7100. */
  7101. this.fields = "";
  7102. /**
  7103. * @member {SuperMap.SummaryType} [SuperMap.SummaryMeshJobParameter.prototype.type=SuperMap.SummaryType.SUMMARYMESH]
  7104. * @description 聚合类型。
  7105. */
  7106. this.type = SummaryType.SUMMARYMESH;
  7107. /**
  7108. * @member {SuperMap.OutputSetting} [SuperMap.SummaryMeshJobParameter.prototype.output]
  7109. * @description 输出参数设置类。
  7110. */
  7111. this.output = null;
  7112. /**
  7113. * @member {SuperMap.MappingParameters} [SuperMap.SummaryMeshJobParameter.prototype.mappingParameters]
  7114. * @description 分析后结果可视化的参数类。
  7115. */
  7116. this.mappingParameters = null;
  7117. Util.extend(this, options);
  7118. this.CLASS_NAME = "SuperMap.SummaryMeshJobParameter";
  7119. }
  7120. /**
  7121. * @function SuperMap.SummaryMeshJobParameter.destroy
  7122. * @override
  7123. */
  7124. SummaryMeshJobParameter_createClass(SummaryMeshJobParameter, [{
  7125. key: "destroy",
  7126. value: function destroy() {
  7127. this.datasetName = null;
  7128. this.query = null;
  7129. this.resolution = null;
  7130. this.statisticModes = null;
  7131. this.meshType = null;
  7132. this.fields = null;
  7133. this.regionDataset = null;
  7134. this.type = null;
  7135. if (this.output instanceof OutputSetting_OutputSetting) {
  7136. this.output.destroy();
  7137. this.output = null;
  7138. }
  7139. if (this.mappingParameters instanceof MappingParameters_MappingParameters) {
  7140. this.mappingParameters.destroy();
  7141. this.mappingParameters = null;
  7142. }
  7143. }
  7144. /**
  7145. * @function SuperMap.SummaryMeshJobParameter.toObject
  7146. * @param {Object} summaryMeshJobParameter - 点聚合分析任务参数。
  7147. * @param {Object} tempObj - 目标对象。
  7148. * @description 生成点聚合分析任务对象。
  7149. */
  7150. }], [{
  7151. key: "toObject",
  7152. value: function toObject(summaryMeshJobParameter, tempObj) {
  7153. for (var name in summaryMeshJobParameter) {
  7154. if (name === "datasetName") {
  7155. tempObj['input'] = tempObj['input'] || {};
  7156. tempObj['input'][name] = summaryMeshJobParameter[name];
  7157. continue;
  7158. }
  7159. if (name === "type") {
  7160. tempObj['type'] = summaryMeshJobParameter[name];
  7161. continue;
  7162. }
  7163. if (name === "output") {
  7164. tempObj['output'] = tempObj['output'] || {};
  7165. tempObj['output'] = summaryMeshJobParameter[name];
  7166. continue;
  7167. }
  7168. if (summaryMeshJobParameter.type === 'SUMMARYMESH' && name !== 'regionDataset' || summaryMeshJobParameter.type === 'SUMMARYREGION' && !contains(['meshType', 'resolution', 'query'], name)) {
  7169. tempObj['analyst'] = tempObj['analyst'] || {};
  7170. if (name === 'query' && summaryMeshJobParameter[name]) {
  7171. tempObj['analyst'][name] = summaryMeshJobParameter[name].toBBOX();
  7172. } else {
  7173. tempObj['analyst'][name] = summaryMeshJobParameter[name];
  7174. }
  7175. if (name === 'mappingParameters') {
  7176. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  7177. tempObj['analyst']['mappingParameters'] = summaryMeshJobParameter[name];
  7178. }
  7179. }
  7180. }
  7181. function contains(arr, obj) {
  7182. var i = arr.length;
  7183. while (i--) {
  7184. if (arr[i] === obj) {
  7185. return true;
  7186. }
  7187. }
  7188. return false;
  7189. }
  7190. }
  7191. }]);
  7192. return SummaryMeshJobParameter;
  7193. }();
  7194. SuperMap.SummaryMeshJobParameter = SummaryMeshJobParameter_SummaryMeshJobParameter;
  7195. // CONCATENATED MODULE: ./src/common/iServer/SummaryRegionJobParameter.js
  7196. function SummaryRegionJobParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  7197. function SummaryRegionJobParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  7198. function SummaryRegionJobParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) SummaryRegionJobParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) SummaryRegionJobParameter_defineProperties(Constructor, staticProps); return Constructor; }
  7199. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  7200. * This program are made available under the terms of the Apache License, Version 2.0
  7201. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  7202. /**
  7203. * @class SuperMap.SummaryRegionJobParameter
  7204. * @category iServer ProcessingService SummaryRegion
  7205. * @classdesc 区域汇总分析任务参数类。
  7206. * @param {Object} options - 参数。
  7207. * @param {string} options.datasetName - 数据集名。
  7208. * @param {(SuperMap.Bounds|L.Bounds|ol.extent)} [options.query] - 分析范围(默认为全图范围)。
  7209. * @param {string} [options.standardFields] - 标准属性字段名称。
  7210. * @param {string} [options.weightedFields] - 权重字段名称。
  7211. * @param {SuperMap.StatisticAnalystMode} [options.standardStatisticModes] - 标准属性字段的统计模式。standardSummaryFields 为 true 时必填。
  7212. * @param {SuperMap.StatisticAnalystMode} [options.weightedStatisticModes] - 权重字段的统计模式。weightedSummaryFields 为 true 时必填。
  7213. * @param {boolean} [options.sumShape=true] - 是否统计长度或面积。
  7214. * @param {boolean} [options.standardSummaryFields=false] - 是否以标准属字段统计。
  7215. * @param {boolean} [options.weightedSummaryFields=false] - 是否以权重字段统计。
  7216. * @param {number} [options.resolution=100] - 网格大小。
  7217. * @param {number} [options.meshType=0] - 网格面汇总类型。
  7218. * @param {SuperMap.AnalystSizeUnit} [options.meshSizeUnit=SuperMap.AnalystSizeUnit.METER] - 网格大小单位。
  7219. * @param {SuperMap.SummaryType} [options.type=SuperMap.SummaryType.SUMMARYMESH] - 汇总类型。
  7220. * @param {SuperMap.OutputSetting} [options.output] - 输出参数设置。
  7221. * @param {SuperMap.MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  7222. */
  7223. var SummaryRegionJobParameter_SummaryRegionJobParameter = /*#__PURE__*/function () {
  7224. function SummaryRegionJobParameter(options) {
  7225. SummaryRegionJobParameter_classCallCheck(this, SummaryRegionJobParameter);
  7226. if (!options) {
  7227. return;
  7228. }
  7229. /**
  7230. * @member {string} SuperMap.SummaryRegionJobParameter.prototype.datasetName
  7231. * @description 数据集名。
  7232. */
  7233. this.datasetName = "";
  7234. /**
  7235. * @member {string} SuperMap.SummaryRegionJobParameter.prototype.regionDataset
  7236. * @description 汇总数据源(多边形汇总时用到的参数)。
  7237. */
  7238. this.regionDataset = "";
  7239. /**
  7240. * @member {boolean} [SuperMap.SummaryRegionJobParameter.prototype.sumShape=true]
  7241. * @description 是否统计长度或面积。
  7242. */
  7243. this.sumShape = true;
  7244. /**
  7245. * @member {(SuperMap.Bounds|L.Bounds|ol.extent)} SuperMap.SummaryRegionJobParameter.prototype.query
  7246. * @description 分析范围。
  7247. */
  7248. this.query = "";
  7249. /**
  7250. * @member {boolean} [SuperMap.SummaryRegionJobParameter.prototype.standardSummaryFields=false]
  7251. * @description 是否以标准属字段统计。
  7252. */
  7253. this.standardSummaryFields = false;
  7254. /**
  7255. * @member {string} SuperMap.SummaryRegionJobParameter.prototype.standardFields
  7256. * @description 标准属性字段名称。仅支持系统字段以外的整形、长整形、浮点型的字段的名称。standardSummaryFields 为 true 时必填。
  7257. */
  7258. this.standardFields = "";
  7259. /**
  7260. * @member {SuperMap.StatisticAnalystMode} SuperMap.SummaryRegionJobParameter.prototype.standardStatisticModes
  7261. * @description 标准属性字段的统计模式。standardSummaryFields 为 true 时必填。
  7262. */
  7263. this.standardStatisticModes = "";
  7264. /**
  7265. * @member {boolean} [SuperMap.SummaryRegionJobParameter.prototype.weightedSummaryFields=false]
  7266. * @description 是否以权重字段统计。
  7267. */
  7268. this.weightedSummaryFields = false;
  7269. /**
  7270. * @member {string} SuperMap.SummaryRegionJobParameter.prototype.weightedFields
  7271. * @description 权重字段名称。仅支持系统字段以外的整形、长整形、浮点型的字段的名称。weightedSummaryFields 为 true 时必填。
  7272. */
  7273. this.weightedFields = "";
  7274. /**
  7275. * @member {SuperMap.StatisticAnalystMode} SuperMap.SummaryRegionJobParameter.prototype.weightedStatisticModes
  7276. * @description 以权重字段统计的统计模式。权重字段的统计模式。weightedSummaryFields 为 true 时必填。
  7277. */
  7278. this.weightedStatisticModes = "";
  7279. /**
  7280. * @member {number} [SuperMap.SummaryRegionJobParameter.prototype.meshType=0]
  7281. * @description 网格面汇总类型。
  7282. */
  7283. this.meshType = 0;
  7284. /**
  7285. * @member {number} [SuperMap.SummaryRegionJobParameter.prototype.resolution=100]
  7286. * @description 网格大小。
  7287. */
  7288. this.resolution = 100;
  7289. /**
  7290. * @member {SuperMap.AnalystSizeUnit} [SuperMap.SummaryRegionJobParameter.prototype.meshSizeUnit=SuperMap.AnalystSizeUnit.METER]
  7291. * @description 网格大小单位。
  7292. */
  7293. this.meshSizeUnit = AnalystSizeUnit.METER;
  7294. /**
  7295. * @member {SuperMap.SummaryType} [SuperMap.SummaryRegionJobParameter.prototype.type=SuperMap.SummaryType.SUMMARYMESH]
  7296. * @description 汇总类型。
  7297. */
  7298. this.type = SummaryType.SUMMARYMESH;
  7299. /**
  7300. * @member {SuperMap.OutputSetting} SuperMap.SummaryRegionJobParameter.prototype.output
  7301. * @description 输出参数设置类
  7302. */
  7303. this.output = null;
  7304. /**
  7305. * @member {SuperMap.MappingParameters} [SuperMap.SummaryRegionJobParameter.prototype.mappingParameters]
  7306. * @description 分析后结果可视化的参数类。
  7307. */
  7308. this.mappingParameters = null;
  7309. Util.extend(this, options);
  7310. this.CLASS_NAME = "SuperMap.SummaryRegionJobParameter";
  7311. }
  7312. /**
  7313. * @function SuperMap.SummaryRegionJobParameter.prototype.destroy
  7314. * @description 释放资源,将引用资源的属性置空。
  7315. */
  7316. SummaryRegionJobParameter_createClass(SummaryRegionJobParameter, [{
  7317. key: "destroy",
  7318. value: function destroy() {
  7319. this.datasetName = null;
  7320. this.sumShape = null;
  7321. this.regionDataset = null;
  7322. this.query = null;
  7323. this.standardSummaryFields = null;
  7324. this.standardFields = null;
  7325. this.standardStatisticModes = null;
  7326. this.weightedSummaryFields = null;
  7327. this.weightedFields = null;
  7328. this.weightedStatisticModes = null;
  7329. this.meshType = null;
  7330. this.resolution = null;
  7331. this.meshSizeUnit = null;
  7332. this.type = null;
  7333. if (this.output instanceof OutputSetting_OutputSetting) {
  7334. this.output.destroy();
  7335. this.output = null;
  7336. }
  7337. if (this.mappingParameters instanceof MappingParameters_MappingParameters) {
  7338. this.mappingParameters.destroy();
  7339. this.mappingParameters = null;
  7340. }
  7341. }
  7342. /**
  7343. * @function SuperMap.SummaryRegionJobParameter.toObject
  7344. * @param {Object} summaryRegionJobParameter - 矢量裁剪分析任务参数。
  7345. * @param {Object} tempObj - 目标对象。
  7346. * @description 生成区域汇总分析服务对象。
  7347. */
  7348. }], [{
  7349. key: "toObject",
  7350. value: function toObject(summaryRegionJobParameter, tempObj) {
  7351. for (var name in summaryRegionJobParameter) {
  7352. if (name === "datasetName") {
  7353. tempObj['input'] = tempObj['input'] || {};
  7354. tempObj['input'][name] = summaryRegionJobParameter[name];
  7355. continue;
  7356. }
  7357. if (name === "type") {
  7358. tempObj['type'] = summaryRegionJobParameter[name];
  7359. continue;
  7360. }
  7361. if (name === "type") {
  7362. tempObj['type'] = summaryRegionJobParameter[name];
  7363. continue;
  7364. }
  7365. if (name === "output") {
  7366. tempObj['output'] = tempObj['output'] || {};
  7367. tempObj['output'] = summaryRegionJobParameter[name];
  7368. continue;
  7369. }
  7370. if (summaryRegionJobParameter.type === "SUMMARYREGION" || summaryRegionJobParameter.type === "SUMMARYMESH" && name !== "regionDataset") {
  7371. tempObj['analyst'] = tempObj['analyst'] || {};
  7372. if (name === 'query' && summaryRegionJobParameter[name]) {
  7373. tempObj['analyst'][name] = summaryRegionJobParameter[name].toBBOX();
  7374. } else {
  7375. tempObj['analyst'][name] = summaryRegionJobParameter[name];
  7376. }
  7377. if (name === 'mappingParameters') {
  7378. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  7379. tempObj['analyst']['mappingParameters'] = summaryRegionJobParameter[name];
  7380. }
  7381. }
  7382. }
  7383. }
  7384. }]);
  7385. return SummaryRegionJobParameter;
  7386. }();
  7387. SuperMap.SummaryRegionJobParameter = SummaryRegionJobParameter_SummaryRegionJobParameter;
  7388. // CONCATENATED MODULE: ./src/common/iServer/OverlayGeoJobParameter.js
  7389. function OverlayGeoJobParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  7390. function OverlayGeoJobParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  7391. function OverlayGeoJobParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) OverlayGeoJobParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) OverlayGeoJobParameter_defineProperties(Constructor, staticProps); return Constructor; }
  7392. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  7393. * This program are made available under the terms of the Apache License, Version 2.0
  7394. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  7395. /**
  7396. * @class SuperMap.OverlayGeoJobParameter
  7397. * @category iServer ProcessingService OverlayAnalyst
  7398. * @classdesc 叠加分析任务参数类。
  7399. * @param {Object} options - 参数。
  7400. * @param {string} options.datasetName - 数据集名。
  7401. * @param {string} options.datasetOverlay - 叠加对象所在的数据集名称。
  7402. * @param {string} options.srcFields - 输入数据需要保留的字段。
  7403. * @param {string} [options.overlayFields] - 叠加数据需要保留的字段。对分析模式为 clip、update、erase 时,此参数无效。
  7404. * @param {string} [options.mode] - 叠加分析模式。
  7405. * @param {SuperMap.OutputSetting} [options.output] - 输出参数设置。
  7406. * @param {SuperMap.MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  7407. */
  7408. var OverlayGeoJobParameter_OverlayGeoJobParameter = /*#__PURE__*/function () {
  7409. function OverlayGeoJobParameter(options) {
  7410. OverlayGeoJobParameter_classCallCheck(this, OverlayGeoJobParameter);
  7411. if (!options) {
  7412. return;
  7413. }
  7414. /**
  7415. * @member {string} SuperMap.OverlayGeoJobParameter.prototype.datasetName
  7416. * @description 数据集名。
  7417. */
  7418. this.datasetName = "";
  7419. /**
  7420. * @member {string} SuperMap.OverlayGeoJobParameter.prototype.datasetOverlay
  7421. * @description 叠加对象所在的数据集名称。
  7422. */
  7423. this.datasetOverlay = "";
  7424. /**
  7425. * @member {string} [SuperMap.OverlayGeoJobParameter.prototype.mode]
  7426. * @description 叠加分析模式。
  7427. */
  7428. this.mode = "";
  7429. /**
  7430. * @member {string} SuperMap.OverlayGeoJobParameter.prototype.srcFields
  7431. * @description 输入数据需要保留的字段。
  7432. */
  7433. this.srcFields = "";
  7434. /**
  7435. * @member {string} SuperMap.OverlayGeoJobParameter.prototype.overlayFields
  7436. * @description 叠加数据需要保留的字段,对分析模式为 clip、update、erase 时,此参数无效。
  7437. */
  7438. this.overlayFields = "";
  7439. /**
  7440. * @member {SuperMap.OutputSetting} [SuperMap.OverlayGeoJobParameter.prototype.output]
  7441. * @description 输出参数设置类。
  7442. */
  7443. this.output = null;
  7444. /**
  7445. * @member {SuperMap.MappingParameters} [SuperMap.OverlayGeoJobParameter.prototype.mappingParameters]
  7446. * @description 分析后结果可视化的参数类。
  7447. */
  7448. this.mappingParameters = null;
  7449. Util.extend(this, options);
  7450. this.CLASS_NAME = "SuperMap.OverlayGeoJobParameter";
  7451. }
  7452. /**
  7453. * @function SuperMap.OverlayGeoJobParameter.destroy
  7454. * @override
  7455. */
  7456. OverlayGeoJobParameter_createClass(OverlayGeoJobParameter, [{
  7457. key: "destroy",
  7458. value: function destroy() {
  7459. this.datasetName = null;
  7460. this.datasetOverlay = null;
  7461. this.mode = null;
  7462. this.srcFields = null;
  7463. this.overlayFields = null;
  7464. if (this.output instanceof OutputSetting_OutputSetting) {
  7465. this.output.destroy();
  7466. this.output = null;
  7467. }
  7468. if (this.mappingParameters instanceof MappingParameters_MappingParameters) {
  7469. this.mappingParameters.destroy();
  7470. this.mappingParameters = null;
  7471. }
  7472. }
  7473. /**
  7474. * @function SuperMap.OverlayGeoJobParameter.toObject
  7475. * @param {Object} OverlayGeoJobParameter - 点聚合分析任务参数。
  7476. * @param {Object} tempObj - 目标对象。
  7477. * @description 生成点聚合分析任务对象。
  7478. */
  7479. }], [{
  7480. key: "toObject",
  7481. value: function toObject(OverlayGeoJobParameter, tempObj) {
  7482. for (var name in OverlayGeoJobParameter) {
  7483. if (name == "datasetName") {
  7484. tempObj['input'] = tempObj['input'] || {};
  7485. tempObj['input'][name] = OverlayGeoJobParameter[name];
  7486. continue;
  7487. }
  7488. if (name === "output") {
  7489. tempObj['output'] = tempObj['output'] || {};
  7490. tempObj['output'] = OverlayGeoJobParameter[name];
  7491. continue;
  7492. }
  7493. tempObj['analyst'] = tempObj['analyst'] || {};
  7494. tempObj['analyst'][name] = OverlayGeoJobParameter[name];
  7495. if (name === 'mappingParameters') {
  7496. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  7497. tempObj['analyst']['mappingParameters'] = OverlayGeoJobParameter[name];
  7498. }
  7499. }
  7500. }
  7501. }]);
  7502. return OverlayGeoJobParameter;
  7503. }();
  7504. SuperMap.OverlayGeoJobParameter = OverlayGeoJobParameter_OverlayGeoJobParameter;
  7505. // CONCATENATED MODULE: ./src/common/iServer/BuffersAnalystJobsParameter.js
  7506. function BuffersAnalystJobsParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  7507. function BuffersAnalystJobsParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  7508. function BuffersAnalystJobsParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) BuffersAnalystJobsParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) BuffersAnalystJobsParameter_defineProperties(Constructor, staticProps); return Constructor; }
  7509. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  7510. * This program are made available under the terms of the Apache License, Version 2.0
  7511. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  7512. /**
  7513. * @class SuperMap.BuffersAnalystJobsParameter
  7514. * @category iServer ProcessingService BufferAnalyst
  7515. * @classdesc 缓冲区分析任务参数类。
  7516. * @param {Object} options - 参数。
  7517. * @param {string} options.datasetName - 数据集名。
  7518. * @param {(SuperMap.Bounds|L.Bounds|ol.extent)} [options.bounds] - 分析范围(默认为全图范围)。
  7519. * @param {string} [options.distance='15'] - 缓冲距离,或缓冲区半径。
  7520. * @param {string} [options.distanceField='pickup_latitude'] - 缓冲区分析距离字段。
  7521. * @param {SuperMap.AnalystSizeUnit} [options.distanceUnit=SuperMap.AnalystSizeUnit.METER] - 缓冲距离单位单位。
  7522. * @param {SuperMap.OutputSetting} [options.output] - 输出参数设置。
  7523. * @param {SuperMap.MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  7524. */
  7525. var BuffersAnalystJobsParameter_BuffersAnalystJobsParameter = /*#__PURE__*/function () {
  7526. function BuffersAnalystJobsParameter(options) {
  7527. BuffersAnalystJobsParameter_classCallCheck(this, BuffersAnalystJobsParameter);
  7528. /**
  7529. * @member {string} SuperMap.BuffersAnalystJobsParameter.prototype.datasetName
  7530. * @description 数据集名。
  7531. */
  7532. this.datasetName = '';
  7533. /**
  7534. * @member {(SuperMap.Bounds|L.Bounds|ol.extent)} SuperMap.BuffersAnalystJobsParameter.prototype.bounds
  7535. * @description 分析范围。
  7536. */
  7537. this.bounds = '';
  7538. /**
  7539. * @member {string} [SuperMap.BuffersAnalystJobsParameter.prototype.distance='15']
  7540. * @description 缓冲距离,或称为缓冲区半径。当缓冲距离字段位空时,此参数有效。
  7541. */
  7542. this.distance = '';
  7543. /**
  7544. * @member {string} [SuperMap.BuffersAnalystJobsParameter.prototype.distanceField='pickup_latitude']
  7545. * @description 缓冲距离字段。
  7546. */
  7547. this.distanceField = '';
  7548. /**
  7549. * @member {SuperMap.AnalystSizeUnit} [SuperMap.BuffersAnalystJobsParameter.prototype.distanceUnit=SuperMap.AnalystSizeUnit.METER]
  7550. * @description 缓冲距离单位。
  7551. */
  7552. this.distanceUnit = AnalystSizeUnit.METER;
  7553. /**
  7554. * @member {string} SuperMap.BuffersAnalystJobsParameter.prototype.dissolveField
  7555. * @description 融合字段,根据字段值对缓冲区结果面对象进行融合。
  7556. */
  7557. this.dissolveField = '';
  7558. /**
  7559. * @member {SuperMap.OutputSetting} [SuperMap.BuffersAnalystJobsParameter.prototype.output]
  7560. * @description 输出参数设置类。
  7561. */
  7562. this.output = null;
  7563. /**
  7564. * @member {SuperMap.MappingParameters} [SuperMap.BuffersAnalystJobsParameter.prototype.mappingParameters]
  7565. * @description 分析后结果可视化的参数类。
  7566. */
  7567. this.mappingParameters = null;
  7568. if (!options) {
  7569. return this;
  7570. }
  7571. Util.extend(this, options);
  7572. this.CLASS_NAME = 'SuperMap.BuffersAnalystJobsParameter';
  7573. }
  7574. /**
  7575. * @function SuperMap.BuffersAnalystJobsParameter.prototype.destroy
  7576. * @description 释放资源,将引用资源的属性置空。
  7577. */
  7578. BuffersAnalystJobsParameter_createClass(BuffersAnalystJobsParameter, [{
  7579. key: "destroy",
  7580. value: function destroy() {
  7581. this.datasetName = null;
  7582. this.bounds = null;
  7583. this.distance = null;
  7584. this.distanceField = null;
  7585. this.distanceUnit = null;
  7586. this.dissolveField = null;
  7587. if (this.output instanceof OutputSetting_OutputSetting) {
  7588. this.output.destroy();
  7589. this.output = null;
  7590. }
  7591. if (this.mappingParameters instanceof MappingParameters_MappingParameters) {
  7592. this.mappingParameters.destroy();
  7593. this.mappingParameters = null;
  7594. }
  7595. }
  7596. /**
  7597. * @function SuperMap.BuffersAnalystJobsParameter.toObject
  7598. * @param {SuperMap.BuffersAnalystJobsParameter} BuffersAnalystJobsParameter - 缓冲区分析任务参数。
  7599. * @param {Object} tempObj - 目标对象。
  7600. * @description 生成缓冲区分析任务对象。
  7601. */
  7602. }], [{
  7603. key: "toObject",
  7604. value: function toObject(BuffersAnalystJobsParameter, tempObj) {
  7605. for (var name in BuffersAnalystJobsParameter) {
  7606. if (name === 'datasetName') {
  7607. tempObj['input'] = tempObj['input'] || {};
  7608. tempObj['input'][name] = BuffersAnalystJobsParameter[name];
  7609. continue;
  7610. }
  7611. if (name === 'output') {
  7612. tempObj['output'] = tempObj['output'] || {};
  7613. tempObj['output'] = BuffersAnalystJobsParameter[name];
  7614. continue;
  7615. }
  7616. tempObj['analyst'] = tempObj['analyst'] || {};
  7617. if (name === 'bounds' && BuffersAnalystJobsParameter[name]) {
  7618. tempObj['analyst'][name] = BuffersAnalystJobsParameter[name].toBBOX();
  7619. } else {
  7620. tempObj['analyst'][name] = BuffersAnalystJobsParameter[name];
  7621. }
  7622. if (name === 'mappingParameters') {
  7623. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  7624. tempObj['analyst']['mappingParameters'] = BuffersAnalystJobsParameter[name];
  7625. }
  7626. }
  7627. }
  7628. }]);
  7629. return BuffersAnalystJobsParameter;
  7630. }();
  7631. SuperMap.BuffersAnalystJobsParameter = BuffersAnalystJobsParameter_BuffersAnalystJobsParameter;
  7632. // CONCATENATED MODULE: ./src/common/iServer/TopologyValidatorJobsParameter.js
  7633. function TopologyValidatorJobsParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  7634. function TopologyValidatorJobsParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  7635. function TopologyValidatorJobsParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) TopologyValidatorJobsParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) TopologyValidatorJobsParameter_defineProperties(Constructor, staticProps); return Constructor; }
  7636. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  7637. * This program are made available under the terms of the Apache License, Version 2.0
  7638. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  7639. /**
  7640. * @class SuperMap.TopologyValidatorJobsParameter
  7641. * @category iServer ProcessingService TopologyValidator
  7642. * @classdesc 拓扑检查分析任务参数类。
  7643. * @param {Object} options - 必填参数。
  7644. * @param {string} options.datasetName - 数据集名。
  7645. * @param {string} options.datasetTopology -检查对象所在的数据集名称。
  7646. * @param {SuperMap.TopologyValidatorRule} [options.rule=SuperMap.TopologyValidatorRule.REGIONNOOVERLAP] - 拓扑检查规则。
  7647. * @param {string} [options.tolerance] - 容限。
  7648. * @param {SuperMap.OutputSetting} [options.output] - 输出参数设置。
  7649. * @param {SuperMap.MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  7650. */
  7651. var TopologyValidatorJobsParameter_TopologyValidatorJobsParameter = /*#__PURE__*/function () {
  7652. function TopologyValidatorJobsParameter(options) {
  7653. TopologyValidatorJobsParameter_classCallCheck(this, TopologyValidatorJobsParameter);
  7654. if (!options) {
  7655. return;
  7656. }
  7657. /**
  7658. * @member {string} SuperMap.TopologyValidatorJobsParameter.prototype.datasetName
  7659. * @description 数据集名。
  7660. */
  7661. this.datasetName = "";
  7662. /**
  7663. * @member {string} SuperMap.TopologyValidatorJobsParameter.prototype.datasetTopology
  7664. * @description 拓扑检查对象所在的数据集名称。
  7665. */
  7666. this.datasetTopology = "";
  7667. /**
  7668. * @member {string} [SuperMap.TopologyValidatorJobsParameter.prototype.tolerance]
  7669. * @description 容限,指定的拓扑错误检查时使用的容限。
  7670. */
  7671. this.tolerance = "";
  7672. /**
  7673. * @member {SuperMap.TopologyValidatorRule} [SuperMap.TopologyValidatorJobsParameter.prototype.rule=SuperMap.TopologyValidatorRule.REGIONNOOVERLAP]
  7674. * @description 拓扑检查模式。
  7675. */
  7676. this.rule = TopologyValidatorRule.REGIONNOOVERLAP;
  7677. /**
  7678. * @member {SuperMap.OutputSetting} [SuperMap.TopologyValidatorJobsParameter.prototype.output]
  7679. * @description 输出参数设置类。
  7680. */
  7681. this.output = null;
  7682. /**
  7683. * @member {SuperMap.MappingParameters} [SuperMap.TopologyValidatorJobsParameter.prototype.mappingParameters]
  7684. * @description 分析后结果可视化的参数类。
  7685. */
  7686. this.mappingParameters = null;
  7687. Util.extend(this, options);
  7688. this.CLASS_NAME = "SuperMap.TopologyValidatorJobsParameter";
  7689. }
  7690. /**
  7691. * @function SuperMap.TopologyValidatorJobsParameter.prototype.destroy
  7692. * @description 释放资源,将引用资源的属性置空。
  7693. */
  7694. TopologyValidatorJobsParameter_createClass(TopologyValidatorJobsParameter, [{
  7695. key: "destroy",
  7696. value: function destroy() {
  7697. this.datasetName = null;
  7698. this.datasetTopology = null;
  7699. this.tolerance = null;
  7700. this.rule = null;
  7701. if (this.output instanceof OutputSetting_OutputSetting) {
  7702. this.output.destroy();
  7703. this.output = null;
  7704. }
  7705. if (this.mappingParameters instanceof MappingParameters_MappingParameters) {
  7706. this.mappingParameters.destroy();
  7707. this.mappingParameters = null;
  7708. }
  7709. }
  7710. /**
  7711. * @function SuperMap.TopologyValidatorJobsParameter.toObject
  7712. * @param {Object} TopologyValidatorJobsParameter -拓扑检查分析任务参数。
  7713. * @param {Object} tempObj - 目标对象。
  7714. * @description 生成拓扑检查分析任务对象。
  7715. */
  7716. }], [{
  7717. key: "toObject",
  7718. value: function toObject(TopologyValidatorJobsParameter, tempObj) {
  7719. for (var name in TopologyValidatorJobsParameter) {
  7720. if (name === "datasetName") {
  7721. tempObj['input'] = tempObj['input'] || {};
  7722. tempObj['input'][name] = TopologyValidatorJobsParameter[name];
  7723. continue;
  7724. }
  7725. if (name === "output") {
  7726. tempObj['output'] = tempObj['output'] || {};
  7727. tempObj['output'] = TopologyValidatorJobsParameter[name];
  7728. continue;
  7729. }
  7730. tempObj['analyst'] = tempObj['analyst'] || {};
  7731. tempObj['analyst'][name] = TopologyValidatorJobsParameter[name];
  7732. if (name === 'mappingParameters') {
  7733. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  7734. tempObj['analyst']['mappingParameters'] = TopologyValidatorJobsParameter[name];
  7735. }
  7736. }
  7737. }
  7738. }]);
  7739. return TopologyValidatorJobsParameter;
  7740. }();
  7741. SuperMap.TopologyValidatorJobsParameter = TopologyValidatorJobsParameter_TopologyValidatorJobsParameter;
  7742. // CONCATENATED MODULE: ./src/common/iServer/GeoCodingParameter.js
  7743. function GeoCodingParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  7744. function GeoCodingParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  7745. function GeoCodingParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) GeoCodingParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) GeoCodingParameter_defineProperties(Constructor, staticProps); return Constructor; }
  7746. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  7747. * This program are made available under the terms of the Apache License, Version 2.0
  7748. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  7749. /**
  7750. * @class SuperMap.GeoCodingParameter
  7751. * @category iServer AddressMatch
  7752. * @classdesc 地理正向匹配参数类。
  7753. * @param {Object} options - 参数。
  7754. * @param {string} options.address - 地点关键词。
  7755. * @param {number} [options.fromIndex] - 设置返回对象的起始索引值。
  7756. * @param {number} [options.toIndex] - 设置返回对象的结束索引值。
  7757. * @param {Array.<string>} [options.filters] - 过滤字段,限定查询区域。
  7758. * @param {string} [options.prjCoordSys] - 查询结果的坐标系。
  7759. * @param {number} [options.maxReturn] - 最大返回结果数。
  7760. */
  7761. var GeoCodingParameter_GeoCodingParameter = /*#__PURE__*/function () {
  7762. function GeoCodingParameter(options) {
  7763. GeoCodingParameter_classCallCheck(this, GeoCodingParameter);
  7764. if (options.filters && typeof options.filters === 'string') {
  7765. options.filters = options.filters.split(',');
  7766. }
  7767. /**
  7768. * @member {string} SuperMap.GeoCodingParameter.prototype.address
  7769. * @description 地点关键词。
  7770. */
  7771. this.address = null;
  7772. /**
  7773. * @member {number} [SuperMap.GeoCodingParameter.prototype.fromIndex]
  7774. * @description 设置返回对象的起始索引值。
  7775. */
  7776. this.fromIndex = null;
  7777. /**
  7778. * @member {number} [SuperMap.GeoCodingParameter.prototype.toIndex]
  7779. * @description 设置返回对象的结束索引值。
  7780. */
  7781. this.toIndex = null;
  7782. /**
  7783. * @member {Array.<string>} [SuperMap.GeoCodingParameter.prototype.filters]
  7784. * @description 过滤字段,限定查询区域。
  7785. */
  7786. this.filters = null;
  7787. /**
  7788. * @member {string} [SuperMap.GeoCodingParameter.prototype.prjCoordSys]
  7789. * @description 查询结果的坐标系。
  7790. */
  7791. this.prjCoordSys = null;
  7792. /**
  7793. * @member {number} [SuperMap.GeoCodingParameter.prototype.maxReturn]
  7794. * @description 最大返回结果数。
  7795. */
  7796. this.maxReturn = null;
  7797. Util.extend(this, options);
  7798. }
  7799. /**
  7800. * @function SuperMap.GeoCodingParameter.prototype.destroy
  7801. * @description 释放资源,将引用资源的属性置空。
  7802. */
  7803. GeoCodingParameter_createClass(GeoCodingParameter, [{
  7804. key: "destroy",
  7805. value: function destroy() {
  7806. this.address = null;
  7807. this.fromIndex = null;
  7808. this.toIndex = null;
  7809. this.filters = null;
  7810. this.prjCoordSys = null;
  7811. this.maxReturn = null;
  7812. }
  7813. }]);
  7814. return GeoCodingParameter;
  7815. }();
  7816. SuperMap.GeoCodingParameter = GeoCodingParameter_GeoCodingParameter;
  7817. // CONCATENATED MODULE: ./src/common/iServer/GeoDecodingParameter.js
  7818. function GeoDecodingParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  7819. function GeoDecodingParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  7820. function GeoDecodingParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) GeoDecodingParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) GeoDecodingParameter_defineProperties(Constructor, staticProps); return Constructor; }
  7821. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  7822. * This program are made available under the terms of the Apache License, Version 2.0
  7823. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  7824. /**
  7825. * @class SuperMap.GeoDecodingParameter
  7826. * @category iServer AddressMatch
  7827. * @classdesc 地理反向匹配参数类。
  7828. * @param {Object} options - 参数。
  7829. * @param {number} options.x - 查询位置的横坐标。
  7830. * @param {number} options.y - 查询位置的纵坐标。
  7831. * @param {number} [options.fromIndex] - 设置返回对象的起始索引值。
  7832. * @param {Array.<string>} [options.filters] - 过滤字段,限定查询区域。
  7833. * @param {string} [options.prjCoordSys] - 查询结果的坐标系。
  7834. * @param {number} [options.maxReturn] - 最大返回结果数。
  7835. * @param {number} [options.geoDecodingRadius] - 查询半径。
  7836. */
  7837. var GeoDecodingParameter_GeoDecodingParameter = /*#__PURE__*/function () {
  7838. function GeoDecodingParameter(options) {
  7839. GeoDecodingParameter_classCallCheck(this, GeoDecodingParameter);
  7840. if (options.filters) {
  7841. options.filters = options.filters.split(',');
  7842. }
  7843. /**
  7844. * @member {number} SuperMap.GeoDecodingParameter.prototype.x
  7845. * @description 查询位置的横坐标。
  7846. */
  7847. this.x = null;
  7848. /**
  7849. * @member {number} SuperMap.GeoDecodingParameter.prototype.y
  7850. * @description 查询位置的纵坐标。
  7851. */
  7852. this.y = null;
  7853. /**
  7854. * @member {number} [SuperMap.GeoDecodingParameter.prototype.fromIndex]
  7855. * @description 设置返回对象的起始索引值。
  7856. */
  7857. this.fromIndex = null;
  7858. /**
  7859. * @member {number} [SuperMap.GeoDecodingParameter.prototype.toIndex]
  7860. * @description 设置返回对象的结束索引值。
  7861. */
  7862. this.toIndex = null;
  7863. /**
  7864. * @member {Array.<string>} [SuperMap.GeoDecodingParameter.prototype.filters]
  7865. * @description 过滤字段,限定查询区域。
  7866. */
  7867. this.filters = null;
  7868. /**
  7869. * @member {string} [SuperMap.GeoDecodingParameter.prototype.prjCoordSys]
  7870. * @description 查询结果的坐标系。
  7871. */
  7872. this.prjCoordSys = null;
  7873. /**
  7874. * @member {number} [SuperMap.GeoDecodingParameter.prototype.maxReturn]
  7875. * @description 最大返回结果数。
  7876. */
  7877. this.maxReturn = null;
  7878. /**
  7879. * @member {number} SuperMap.GeoDecodingParameter.prototype.geoDecodingRadius
  7880. * @description 查询半径。
  7881. */
  7882. this.geoDecodingRadius = null;
  7883. Util.extend(this, options);
  7884. }
  7885. /**
  7886. * @function SuperMap.GeoDecodingParameter.prototype.destroy
  7887. * @description 释放资源,将引用资源的属性置空。
  7888. */
  7889. GeoDecodingParameter_createClass(GeoDecodingParameter, [{
  7890. key: "destroy",
  7891. value: function destroy() {
  7892. this.x = null;
  7893. this.y = null;
  7894. this.fromIndex = null;
  7895. this.toIndex = null;
  7896. this.filters = null;
  7897. this.prjCoordSys = null;
  7898. this.maxReturn = null;
  7899. this.geoDecodingRadius = null;
  7900. }
  7901. }]);
  7902. return GeoDecodingParameter;
  7903. }();
  7904. SuperMap.GeoDecodingParameter = GeoDecodingParameter_GeoDecodingParameter;
  7905. // CONCATENATED MODULE: ./src/classic/SuperMap.js
  7906. var SuperMap_SuperMap = window.SuperMap = window.SuperMap || {};
  7907. SuperMap_SuperMap.REST = SuperMap_SuperMap.REST || {};
  7908. // EXTERNAL MODULE: external "function(){try{return mapv}catch(e){return {}}}()"
  7909. var external_function_try_return_mapv_catch_e_return_ = __webpack_require__(0);
  7910. // CONCATENATED MODULE: ./src/common/util/MapCalculateUtil.js
  7911. var MapCalculateUtil_getMeterPerMapUnit = function getMeterPerMapUnit(mapUnit) {
  7912. var earchRadiusInMeters = 6378137;
  7913. var meterPerMapUnit;
  7914. if (mapUnit === Unit.METER) {
  7915. meterPerMapUnit = 1;
  7916. } else if (mapUnit === Unit.DEGREE) {
  7917. // 每度表示多少米。
  7918. meterPerMapUnit = Math.PI * 2 * earchRadiusInMeters / 360;
  7919. } else if (mapUnit === Unit.KILOMETER) {
  7920. meterPerMapUnit = 1.0e-3;
  7921. } else if (mapUnit === Unit.INCH) {
  7922. meterPerMapUnit = 1 / 2.5399999918e-2;
  7923. } else if (mapUnit === Unit.FOOT) {
  7924. meterPerMapUnit = 0.3048;
  7925. } else {
  7926. return meterPerMapUnit;
  7927. }
  7928. return meterPerMapUnit;
  7929. };
  7930. // CONCATENATED MODULE: ./src/classic/overlay/mapv/MapVRenderer.js
  7931. function MapVRenderer_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { MapVRenderer_typeof = function _typeof(obj) { return typeof obj; }; } else { MapVRenderer_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return MapVRenderer_typeof(obj); }
  7932. function MapVRenderer_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  7933. function MapVRenderer_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  7934. function MapVRenderer_createClass(Constructor, protoProps, staticProps) { if (protoProps) MapVRenderer_defineProperties(Constructor.prototype, protoProps); if (staticProps) MapVRenderer_defineProperties(Constructor, staticProps); return Constructor; }
  7935. function _get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get(target, property, receiver || target); }
  7936. function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
  7937. function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
  7938. function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
  7939. function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
  7940. function _possibleConstructorReturn(self, call) { if (call && (MapVRenderer_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); }
  7941. function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  7942. function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  7943. function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
  7944. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  7945. * This program are made available under the terms of the Apache License, Version 2.0
  7946. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  7947. /**
  7948. * @class MapVRenderer
  7949. * @classdesc MapV渲染器。
  7950. * @private
  7951. * @extends {mapv.baiduMapLayer}
  7952. * @param {SuperMap.Map} map - 待渲染的地图。
  7953. * @param {SuperMap.Layer.MapVLayer} layer - 待渲染的图层。
  7954. * @param {Mapv.DataSet} dataSet - 待渲染的数据集,数据所属坐标系要求与 map 保持一致。
  7955. * @param {Object} options - 渲染的参数。
  7956. */
  7957. var MapVBaseLayer = external_function_try_return_mapv_catch_e_return_["baiduMapLayer"] ? external_function_try_return_mapv_catch_e_return_["baiduMapLayer"].__proto__ : Function;
  7958. var MapVRenderer_MapVRenderer = /*#__PURE__*/function (_MapVBaseLayer) {
  7959. _inherits(MapVRenderer, _MapVBaseLayer);
  7960. var _super = _createSuper(MapVRenderer);
  7961. function MapVRenderer(map, layer, dataSet, options) {
  7962. var _this;
  7963. MapVRenderer_classCallCheck(this, MapVRenderer);
  7964. _this = _super.call(this, map, dataSet, options);
  7965. if (!MapVBaseLayer) {
  7966. return _possibleConstructorReturn(_this, _assertThisInitialized(_this));
  7967. }
  7968. var self = _assertThisInitialized(_this);
  7969. options = options || {};
  7970. self.init(options);
  7971. self.argCheck(options);
  7972. _this.canvasLayer = layer;
  7973. _this.clickEvent = _this.clickEvent.bind(_assertThisInitialized(_this));
  7974. _this.mousemoveEvent = _this.mousemoveEvent.bind(_assertThisInitialized(_this));
  7975. _this.bindEvent();
  7976. return _this;
  7977. }
  7978. /**
  7979. * @function MapvRenderer.prototype.clickEvent
  7980. * @description 点击事件。
  7981. * @param {Object} e - 触发对象。
  7982. */
  7983. MapVRenderer_createClass(MapVRenderer, [{
  7984. key: "clickEvent",
  7985. value: function clickEvent(e) {
  7986. var pixel = e.xy;
  7987. _get(_getPrototypeOf(MapVRenderer.prototype), "clickEvent", this).call(this, pixel, e);
  7988. }
  7989. /**
  7990. * @function MapvRenderer.prototype.mousemoveEvent
  7991. * @description 鼠标移动事件。
  7992. * @param {Object} e - 触发对象。
  7993. */
  7994. }, {
  7995. key: "mousemoveEvent",
  7996. value: function mousemoveEvent(e) {
  7997. var pixel = e.xy;
  7998. _get(_getPrototypeOf(MapVRenderer.prototype), "mousemoveEvent", this).call(this, pixel, e);
  7999. }
  8000. /**
  8001. * @function MapvRenderer.prototype.bindEvent
  8002. * @description 绑定鼠标移动和鼠标点击事件。
  8003. */
  8004. }, {
  8005. key: "bindEvent",
  8006. value: function bindEvent() {
  8007. var map = this.map;
  8008. if (this.options.methods) {
  8009. if (this.options.methods.click) {
  8010. map.events.on({
  8011. 'click': this.clickEvent
  8012. });
  8013. }
  8014. if (this.options.methods.mousemove) {
  8015. map.events.on({
  8016. 'mousemove': this.mousemoveEvent
  8017. });
  8018. }
  8019. }
  8020. }
  8021. /**
  8022. * @function MapvRenderer.prototype.unbindEvent
  8023. * @description 解绑鼠标移动和鼠标滑动触发的事件。
  8024. */
  8025. }, {
  8026. key: "unbindEvent",
  8027. value: function unbindEvent() {
  8028. var map = this.map;
  8029. if (this.options.methods) {
  8030. if (this.options.methods.click) {
  8031. map.events.un({
  8032. 'click': this.clickEvent
  8033. });
  8034. }
  8035. if (this.options.methods.mousemove) {
  8036. map.events.un({
  8037. 'mousemove': this.mousemoveEvent
  8038. });
  8039. }
  8040. }
  8041. }
  8042. /**
  8043. * @function MapvRenderer.prototype.getContext
  8044. * @description 获取信息。
  8045. */
  8046. }, {
  8047. key: "getContext",
  8048. value: function getContext() {
  8049. return this.canvasLayer && this.canvasLayer.canvasContext;
  8050. }
  8051. /**
  8052. * @function MapvRenderer.prototype.addData
  8053. * @description 追加数据
  8054. * @param {oject} data - 待添加的数据。
  8055. * @param {oject} options - 待添加的数据信息。
  8056. */
  8057. }, {
  8058. key: "addData",
  8059. value: function addData(data, options) {
  8060. var _data = data;
  8061. if (data && data.get) {
  8062. _data = data.get();
  8063. }
  8064. this.dataSet.add(_data);
  8065. this.update({
  8066. options: options
  8067. });
  8068. }
  8069. /**
  8070. * @function MapvRenderer.prototype.updateData
  8071. * @description 更新覆盖原数据。
  8072. * @param {oject} data - 待更新的数据。
  8073. * @param {oject} options - 待更新的数据信息。
  8074. */
  8075. }, {
  8076. key: "setData",
  8077. value: function setData(data, options) {
  8078. var _data = data;
  8079. if (data && data.get) {
  8080. _data = data.get();
  8081. }
  8082. this.dataSet = this.dataSet || new external_function_try_return_mapv_catch_e_return_["DataSet"]();
  8083. this.dataSet.set(_data);
  8084. this.update({
  8085. options: options
  8086. });
  8087. }
  8088. /**
  8089. * @function MapvRenderer.prototype.getData
  8090. * @description 获取数据。
  8091. */
  8092. }, {
  8093. key: "getData",
  8094. value: function getData() {
  8095. return this.dataSet;
  8096. }
  8097. /**
  8098. * @function MapvRenderer.prototype.removeData
  8099. * @description 删除符合过滤条件的数据。
  8100. * @param {function} filter - 过滤条件。条件参数为数据项,返回值为 true,表示删除该元素;否则表示不删除。
  8101. */
  8102. }, {
  8103. key: "removeData",
  8104. value: function removeData(_filter) {
  8105. if (!this.dataSet) {
  8106. return;
  8107. }
  8108. var newData = this.dataSet.get({
  8109. filter: function filter(data) {
  8110. return _filter != null && typeof _filter === "function" ? !_filter(data) : true;
  8111. }
  8112. });
  8113. this.dataSet.set(newData);
  8114. this.update({
  8115. options: null
  8116. });
  8117. }
  8118. /**
  8119. * @function MapvRenderer.prototype.clearData
  8120. * @description 清除数据。
  8121. */
  8122. }, {
  8123. key: "clearData",
  8124. value: function clearData() {
  8125. this.dataSet && this.dataSet.clear();
  8126. this.update({
  8127. options: null
  8128. });
  8129. }
  8130. /**
  8131. * @function MapvRenderer.prototype.render
  8132. * @description 着色。
  8133. * @param {number} time
  8134. */
  8135. }, {
  8136. key: "render",
  8137. value: function render(time) {
  8138. this._canvasUpdate(time);
  8139. }
  8140. /**
  8141. * @function MapvRenderer.prototype.transferToMercator
  8142. * @description 墨卡托坐标为经纬度。
  8143. * @deprecated
  8144. */
  8145. }, {
  8146. key: "transferToMercator",
  8147. value: function transferToMercator() {
  8148. if (this.options.coordType && ["bd09mc", "coordinates_mercator"].indexOf(this.options.coordType) > -1) {
  8149. var data = this.dataSet.get();
  8150. data = this.dataSet.transferCoordinate(data, function (coordinates) {
  8151. var pixel = SuperMap_SuperMap.Projection.transform({
  8152. x: coordinates[0],
  8153. y: coordinates[1]
  8154. }, "EPSG:3857", "EPSG:4326");
  8155. return [pixel.x, pixel.y];
  8156. }, 'coordinates', 'coordinates');
  8157. this.dataSet._set(data);
  8158. }
  8159. }
  8160. }, {
  8161. key: "_canvasUpdate",
  8162. value: function _canvasUpdate(time) {
  8163. if (!this.canvasLayer) {
  8164. return;
  8165. }
  8166. var self = this;
  8167. var animationOptions = self.options.animation;
  8168. var context = this.getContext();
  8169. var map = this.map;
  8170. if (self.isEnabledTime()) {
  8171. if (time === undefined) {
  8172. this.clear(context);
  8173. return;
  8174. }
  8175. if (this.context === '2d') {
  8176. context.save();
  8177. context.globalCompositeOperation = 'destination-out';
  8178. context.fillStyle = 'rgba(0, 0, 0, .1)';
  8179. context.fillRect(0, 0, context.canvas.width, context.canvas.height);
  8180. context.restore();
  8181. }
  8182. } else {
  8183. this.clear(context);
  8184. }
  8185. if (this.context === '2d') {
  8186. for (var key in self.options) {
  8187. context[key] = self.options[key];
  8188. }
  8189. } else {
  8190. context.clear(context.COLOR_BUFFER_BIT);
  8191. }
  8192. if (self.options.minZoom && map.getZoom() < self.options.minZoom || self.options.maxZoom && map.getZoom() > self.options.maxZoom) {
  8193. return;
  8194. }
  8195. var layer = self.canvasLayer;
  8196. var dataGetOptions = {
  8197. fromColumn: 'coordinates',
  8198. transferCoordinate: function transferCoordinate(coordinate) {
  8199. // var coord = layer.transferToMapLatLng({lon: coordinate[0], lat: coordinate[1]});
  8200. var coord = {
  8201. lon: coordinate[0],
  8202. lat: coordinate[1]
  8203. };
  8204. var worldPoint = map.getViewPortPxFromLonLat(coord);
  8205. return [worldPoint.x, worldPoint.y];
  8206. }
  8207. };
  8208. if (time !== undefined) {
  8209. dataGetOptions.filter = function (item) {
  8210. var trails = animationOptions.trails || 10;
  8211. return time && item.time > time - trails && item.time < time;
  8212. };
  8213. }
  8214. var data = self.dataSet.get(dataGetOptions);
  8215. this.processData(data); // 一个像素是多少米
  8216. var zoomUnit = map.getResolution() * MapCalculateUtil_getMeterPerMapUnit('DEGREE'); // // 兼容unit为'm'的情况
  8217. if (self.options.unit === 'm') {
  8218. if (self.options.size) {
  8219. self.options._size = self.options.size / zoomUnit;
  8220. }
  8221. if (self.options.width) {
  8222. self.options._width = self.options.width / zoomUnit;
  8223. }
  8224. if (self.options.height) {
  8225. self.options._height = self.options.height / zoomUnit;
  8226. }
  8227. } else {
  8228. self.options._size = self.options.size;
  8229. self.options._height = self.options.height;
  8230. self.options._width = self.options.width;
  8231. }
  8232. var worldPoint = map.getViewPortPxFromLonLat(layer.transferToMapLatLng({
  8233. lon: 0,
  8234. lat: 0
  8235. }));
  8236. this.drawContext(context, data, self.options, worldPoint);
  8237. self.options.updateCallback && self.options.updateCallback(time);
  8238. }
  8239. }, {
  8240. key: "init",
  8241. value: function init(options) {
  8242. var self = this;
  8243. self.options = options;
  8244. this.initDataRange(options);
  8245. this.context = self.options.context || '2d';
  8246. if (self.options.zIndex) {
  8247. this.canvasLayer && this.canvasLayer.setZIndex(self.options.zIndex);
  8248. }
  8249. this.initAnimator();
  8250. }
  8251. /**
  8252. * @function MapvRenderer.prototype.addAnimatorEvent
  8253. * @description 添加动画事件。
  8254. */
  8255. }, {
  8256. key: "addAnimatorEvent",
  8257. value: function addAnimatorEvent() {
  8258. this.map.events.on({
  8259. 'movestart': this.animatorMovestartEvent.bind(this)
  8260. });
  8261. this.map.events.on({
  8262. 'moveend': this.animatorMoveendEvent.bind(this)
  8263. });
  8264. }
  8265. /**
  8266. * @function MapvRenderer.prototype.clear
  8267. * @description 清除环境。
  8268. * @param {Object} context - 当前环境。
  8269. */
  8270. }, {
  8271. key: "clear",
  8272. value: function clear(context) {
  8273. context && context.clearRect && context.clearRect(0, 0, context.canvas.width, context.canvas.height);
  8274. }
  8275. /**
  8276. * @function MapvRenderer.prototype.show
  8277. * @description 展示渲染效果。
  8278. */
  8279. }, {
  8280. key: "show",
  8281. value: function show() {
  8282. this.map.addLayer(this.canvasLayer);
  8283. }
  8284. /**
  8285. * @function MapvRenderer.prototype.hide
  8286. * @description 隐藏渲染效果。
  8287. */
  8288. }, {
  8289. key: "hide",
  8290. value: function hide() {
  8291. this.map.removeLayer(this.canvasLayer);
  8292. }
  8293. /**
  8294. * @function MapvRenderer.prototype.draw
  8295. * @description 渲染绘制。
  8296. */
  8297. }, {
  8298. key: "draw",
  8299. value: function draw() {
  8300. this.canvasLayer.redraw();
  8301. }
  8302. }]);
  8303. return MapVRenderer;
  8304. }(MapVBaseLayer);
  8305. // CONCATENATED MODULE: ./src/classic/overlay/MapVLayer.js
  8306. function MapVLayer_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { MapVLayer_typeof = function _typeof(obj) { return typeof obj; }; } else { MapVLayer_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return MapVLayer_typeof(obj); }
  8307. function MapVLayer_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  8308. function MapVLayer_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  8309. function MapVLayer_createClass(Constructor, protoProps, staticProps) { if (protoProps) MapVLayer_defineProperties(Constructor.prototype, protoProps); if (staticProps) MapVLayer_defineProperties(Constructor, staticProps); return Constructor; }
  8310. function MapVLayer_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { MapVLayer_get = Reflect.get; } else { MapVLayer_get = function _get(target, property, receiver) { var base = MapVLayer_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return MapVLayer_get(target, property, receiver || target); }
  8311. function MapVLayer_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = MapVLayer_getPrototypeOf(object); if (object === null) break; } return object; }
  8312. function MapVLayer_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) MapVLayer_setPrototypeOf(subClass, superClass); }
  8313. function MapVLayer_setPrototypeOf(o, p) { MapVLayer_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return MapVLayer_setPrototypeOf(o, p); }
  8314. function MapVLayer_createSuper(Derived) { var hasNativeReflectConstruct = MapVLayer_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = MapVLayer_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = MapVLayer_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return MapVLayer_possibleConstructorReturn(this, result); }; }
  8315. function MapVLayer_possibleConstructorReturn(self, call) { if (call && (MapVLayer_typeof(call) === "object" || typeof call === "function")) { return call; } return MapVLayer_assertThisInitialized(self); }
  8316. function MapVLayer_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  8317. function MapVLayer_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  8318. function MapVLayer_getPrototypeOf(o) { MapVLayer_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return MapVLayer_getPrototypeOf(o); }
  8319. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  8320. * This program are made available under the terms of the Apache License, Version 2.0
  8321. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  8322. /**
  8323. * @class SuperMap.Layer.MapVLayer
  8324. * @category Visualization MapV
  8325. * @classdesc MapV 图层。
  8326. * @extends {SuperMap.Layer}
  8327. * @param {string} name - 图层名。
  8328. * @param {Object} options - 可选参数。
  8329. * @param {Mapv.DataSet} options.dataSet - mapv 的 dataSet 对象。
  8330. * @param {Object} options.options - mapv 绘图风格配置信息。
  8331. */
  8332. var MapVLayer_MapVLayer = /*#__PURE__*/function (_SuperMap$Layer) {
  8333. MapVLayer_inherits(MapVLayer, _SuperMap$Layer);
  8334. var _super = MapVLayer_createSuper(MapVLayer);
  8335. function MapVLayer(name, options) {
  8336. var _this;
  8337. MapVLayer_classCallCheck(this, MapVLayer);
  8338. _this = _super.call(this, name, options);
  8339. /**
  8340. * @member {mapv.DataSet} SuperMap.Layer.MapVLayer.prototype.dataSet
  8341. * @description mapv dataset 对象。
  8342. */
  8343. _this.dataSet = null;
  8344. /**
  8345. * @member {Object} SuperMap.Layer.MapVLayer.prototype.options
  8346. * @description mapv 绘图风格配置信息。
  8347. */
  8348. _this.options = null;
  8349. /**
  8350. * @member {boolean} [SuperMap.Layer.MapVLayer.prototype.supported=false]
  8351. * @description 当前浏览器是否支持 canvas 绘制。决定了 MapV 图是否可用,内部判断使用。
  8352. */
  8353. _this.supported = false;
  8354. /**
  8355. * @member {Canvas} SuperMap.Layer.MapVLayer.prototype.canvas
  8356. * @description MapV 图主绘制面板。
  8357. */
  8358. _this.canvas = null;
  8359. /**
  8360. * @private
  8361. * @member {CanvasContext} SuperMap.Layer.MapVLayer.prototype.canvasContext
  8362. * @description MapV 图主绘制对象。
  8363. */
  8364. _this.canvasContext = null;
  8365. if (options) {
  8366. SuperMap_SuperMap.Util.extend(MapVLayer_assertThisInitialized(_this), options);
  8367. } //MapV图要求使用canvas绘制,判断是否支持
  8368. _this.canvas = document.createElement('canvas');
  8369. if (!_this.canvas.getContext) {
  8370. return MapVLayer_possibleConstructorReturn(_this);
  8371. }
  8372. _this.supported = true; //构建绘图面板
  8373. _this.canvas.style.position = 'absolute';
  8374. _this.canvas.style.top = 0 + 'px';
  8375. _this.canvas.style.left = 0 + 'px';
  8376. _this.div.appendChild(_this.canvas);
  8377. var context = _this.options && _this.options.context || '2d';
  8378. _this.canvasContext = _this.canvas.getContext(context);
  8379. var global$2 = typeof window === 'undefined' ? {} : window;
  8380. var devicePixelRatio = _this.devicePixelRatio = global$2.devicePixelRatio || 1;
  8381. if (context == '2d') {
  8382. _this.canvasContext.scale(devicePixelRatio, devicePixelRatio);
  8383. }
  8384. _this.attribution = "© 2018 百度 <a href='https://mapv.baidu.com' target='_blank'>MapV</a> with <span>© <a target='_blank' href='https://iclient.supermap.io' " + "style='color: #08c;text-decoration: none;'>SuperMap iClient</a></span>";
  8385. _this.CLASS_NAME = 'SuperMap.Layer.MapVLayer';
  8386. return _this;
  8387. }
  8388. /**
  8389. * @function SuperMap.Layer.MapVLayer.prototype.destroy
  8390. * @override
  8391. */
  8392. MapVLayer_createClass(MapVLayer, [{
  8393. key: "destroy",
  8394. value: function destroy() {
  8395. if (this.renderer && this.renderer.animator) {
  8396. this.renderer.animator.stop();
  8397. this.renderer.animator = null;
  8398. }
  8399. this.dataSet = null;
  8400. this.options = null;
  8401. this.renderer = null;
  8402. this.supported = null;
  8403. this.canvas = null;
  8404. this.canvasContext = null;
  8405. this.maxWidth = null;
  8406. this.maxHeight = null;
  8407. MapVLayer_get(MapVLayer_getPrototypeOf(MapVLayer.prototype), "destroy", this).call(this);
  8408. }
  8409. /**
  8410. * @function SuperMap.Layer.MapVLayer.prototype.addData
  8411. * @description 追加数据。
  8412. * @param {mapv.DataSet} dataSet - mapv 数据集。
  8413. * @param {Object} options - mapv 绘图参数。
  8414. */
  8415. }, {
  8416. key: "addData",
  8417. value: function addData(dataSet, options) {
  8418. this.renderer && this.renderer.addData(dataSet, options);
  8419. }
  8420. /**
  8421. * @function SuperMap.Layer.MapVLayer.prototype.
  8422. * @description 设置数据。
  8423. * @param {mapv.DataSet} dataSet - mapv 数据集。
  8424. * @param {Object} options - mapv 绘图参数。
  8425. */
  8426. }, {
  8427. key: "setData",
  8428. value: function setData(dataSet, options) {
  8429. this.renderer && this.renderer.setData(dataSet, options);
  8430. }
  8431. /**
  8432. * @function SuperMap.Layer.MapVLayer.prototype.getData
  8433. * @description 获取数据。
  8434. * @returns {mapv.DataSet} - mapv 数据集。
  8435. */
  8436. }, {
  8437. key: "getData",
  8438. value: function getData() {
  8439. if (this.renderer) {
  8440. this.dataSet = this.renderer.getData();
  8441. }
  8442. return this.dataSet;
  8443. }
  8444. /**
  8445. * @function SuperMap.Layer.MapVLayer.prototype.removeData
  8446. * @description 删除符合过滤条件的数据。
  8447. * @param {function} filter - 过滤条件。条件参数为数据项,返回值为 true,表示删除该元素;否则表示不删除。
  8448. * @example
  8449. * filter=function(data){
  8450. * if(data.id=="1"){
  8451. * return true
  8452. * }
  8453. * return false;
  8454. * }
  8455. */
  8456. }, {
  8457. key: "removeData",
  8458. value: function removeData(filter) {
  8459. this.renderer && this.renderer.removeData(filter);
  8460. }
  8461. /**
  8462. * @function SuperMap.Layer.MapVLayer.prototype.clearData
  8463. * @description 清除数据
  8464. */
  8465. }, {
  8466. key: "clearData",
  8467. value: function clearData() {
  8468. this.renderer.clearData();
  8469. }
  8470. /**
  8471. * @function SuperMap.Layer.MapVLayer.prototype.setMap
  8472. * @description 图层已经添加到 Map 中。
  8473. * 如果当前浏览器支持 canvas,则开始渲染要素;如果不支持则移除图层。
  8474. * @param {SuperMap.Map} map - 需要绑定的 map 对象。
  8475. */
  8476. }, {
  8477. key: "setMap",
  8478. value: function setMap(map) {
  8479. MapVLayer_get(MapVLayer_getPrototypeOf(MapVLayer.prototype), "setMap", this).call(this, map);
  8480. this.renderer = new MapVRenderer_MapVRenderer(map, this, this.dataSet, this.options);
  8481. if (!this.supported) {
  8482. this.map.removeLayer(this);
  8483. } else {
  8484. this.redraw();
  8485. }
  8486. }
  8487. /**
  8488. * @function SuperMap.Layer.MapVLayer.prototype.moveTo
  8489. * @description 重置当前 MapV 图层的 div,再一次与 Map 控件保持一致。
  8490. * 修改当前显示范围,当平移或者缩放结束后开始重绘 MapV 图的渲染效果。
  8491. * @param {SuperMap.Bounds} bounds - 图层范围。
  8492. * @param {boolean} [zoomChanged] - 缩放级别是否改变。
  8493. * @param {boolean} [dragging] - 是否拖动。
  8494. */
  8495. }, {
  8496. key: "moveTo",
  8497. value: function moveTo(bounds, zoomChanged, dragging) {
  8498. MapVLayer_get(MapVLayer_getPrototypeOf(MapVLayer.prototype), "moveTo", this).call(this, bounds, zoomChanged, dragging);
  8499. if (!this.supported) {
  8500. return;
  8501. }
  8502. this.zoomChanged = zoomChanged;
  8503. if (!dragging) {
  8504. this.div.style.visibility = 'hidden';
  8505. this.div.style.left = -parseInt(this.map.layerContainerDiv.style.left) + 'px';
  8506. this.div.style.top = -parseInt(this.map.layerContainerDiv.style.top) + 'px';
  8507. /*this.canvas.style.left = this.div.style.left;
  8508. this.canvas.style.top = this.div.style.top;*/
  8509. var size = this.map.getSize();
  8510. this.div.style.width = parseInt(size.w) + 'px';
  8511. this.div.style.height = parseInt(size.h) + 'px';
  8512. this.canvas.width = parseInt(size.w);
  8513. this.canvas.height = parseInt(size.h);
  8514. this.canvas.style.width = this.div.style.width;
  8515. this.canvas.style.height = this.div.style.height;
  8516. this.maxWidth = size.w;
  8517. this.maxHeight = size.h;
  8518. this.div.style.visibility = '';
  8519. if (!zoomChanged) {
  8520. this.renderer && this.renderer.render();
  8521. }
  8522. }
  8523. if (zoomChanged) {
  8524. this.renderer && this.renderer.render();
  8525. }
  8526. }
  8527. /**
  8528. * @function SuperMap.Layer.MapVLayer.prototype.transferToMapLatLng
  8529. * @description 将经纬度转成底图的投影坐标。
  8530. * @param {SuperMap.Lonlat} latLng - 经纬度坐标。
  8531. * @deprecated
  8532. */
  8533. }, {
  8534. key: "transferToMapLatLng",
  8535. value: function transferToMapLatLng(latLng) {
  8536. var source = 'EPSG:4326',
  8537. dest = 'EPSG:4326';
  8538. var unit = this.map.getUnits() || 'degree';
  8539. if (['m', 'meter'].indexOf(unit.toLowerCase()) > -1) {
  8540. dest = 'EPSG:3857';
  8541. }
  8542. return new SuperMap_SuperMap.LonLat(latLng.lon, latLng.lat).transform(source, dest);
  8543. }
  8544. }]);
  8545. return MapVLayer;
  8546. }(SuperMap_SuperMap.Layer);
  8547. SuperMap_SuperMap.Layer.MapVLayer = MapVLayer_MapVLayer;
  8548. // CONCATENATED MODULE: ./src/classic/overlay/mapv/index.js
  8549. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  8550. * This program are made available under the terms of the Apache License, Version 2.0
  8551. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  8552. // CONCATENATED MODULE: ./src/classic/overlay/index.js
  8553. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  8554. * This program are made available under the terms of the Apache License, Version 2.0
  8555. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  8556. // CONCATENATED MODULE: ./src/common/commontypes/Credential.js
  8557. function Credential_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  8558. function Credential_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  8559. function Credential_createClass(Constructor, protoProps, staticProps) { if (protoProps) Credential_defineProperties(Constructor.prototype, protoProps); if (staticProps) Credential_defineProperties(Constructor, staticProps); return Constructor; }
  8560. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  8561. * This program are made available under the terms of the Apache License, Version 2.0
  8562. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  8563. /**
  8564. * @class SuperMap.Credential
  8565. * @category Security
  8566. * @classdesc SuperMap 的安全证书类,其中包括 token 等安全验证信息。</br>
  8567. * 需要使用用户名和密码在:"http://localhost:8090/iserver/services/security/tokens" 下申请 value。</br>
  8568. * 获得形如:"2OMwGmcNlrP2ixqv1Mk4BuQMybOGfLOrljruX6VcYMDQKc58Sl9nMHsqQaqeBx44jRvKSjkmpZKK1L596y7skQ.." 的 value。</br>
  8569. * 目前支持的功能包括:地图服务、专题图、量算、查询、公交换乘、空间分析、网络分析,不支持轮询功能。</br>
  8570. * @param {string} value - 访问受安全限制的服务时用于通过安全认证的验证信息。
  8571. * @param {string} [name='token'] - 验证信息前缀,name=value 部分的 name 部分。
  8572. * @example
  8573. * var pixcel = new SuperMap.Credential("valueString","token");
  8574. * pixcel.destroy();
  8575. */
  8576. var Credential = /*#__PURE__*/function () {
  8577. function Credential(value, name) {
  8578. Credential_classCallCheck(this, Credential);
  8579. /**
  8580. * @member {string} SuperMap.Bounds.prototype.value
  8581. * @description 访问受安全限制的服务时用于通过安全认证的验证信息。
  8582. */
  8583. this.value = value ? value : "";
  8584. /**
  8585. * @member {string} [SuperMap.Bounds.prototype.name='token']
  8586. * @description 验证信息前缀,name=value 部分的 name 部分。
  8587. */
  8588. this.name = name ? name : "token";
  8589. this.CLASS_NAME = "SuperMap.Credential";
  8590. }
  8591. /**
  8592. * @function SuperMap.Credential.prototype.getUrlParameters
  8593. * @example
  8594. * var credential = new SuperMap.Credential("valueString","token");
  8595. * //这里 str = "token=valueString";
  8596. * var str = credential.getUrlParameters();
  8597. * @returns {string} 返回安全信息组成的 url 片段。
  8598. */
  8599. Credential_createClass(Credential, [{
  8600. key: "getUrlParameters",
  8601. value: function getUrlParameters() {
  8602. //当需要其他安全信息的时候,则需要return this.name + "=" + this.value + "&" + "...";的形式添加。
  8603. return this.name + "=" + this.value;
  8604. }
  8605. /**
  8606. * @function SuperMap.Bounds.prototype.getValue
  8607. * @description 获取 value。
  8608. * @example
  8609. * var credential = new SuperMap.Credential("2OMwGmcNlrP2ixqv1Mk4BuQMybOGfLOrljruX6VcYMDQKc58Sl9nMHsqQaqeBx44jRvKSjkmpZKK1L596y7skQ..","token");
  8610. * //这里 str = "2OMwGmcNlrP2ixqv1Mk4BuQMybOGfLOrljruX6VcYMDQKc58Sl9nMHsqQaqeBx44jRvKSjkmpZKK1L596y7skQ..";
  8611. * var str = credential.getValue();
  8612. * @returns {string} 返回 value 字符串,在 iServer 服务下该 value 值即为 token 值。
  8613. */
  8614. }, {
  8615. key: "getValue",
  8616. value: function getValue() {
  8617. return this.value;
  8618. }
  8619. /**
  8620. *
  8621. * @function SuperMap.Credential.prototype.destroy
  8622. * @description 销毁此对象。销毁后此对象的所有属性为 null,而不是初始值。
  8623. * @example
  8624. * var credential = new SuperMap.Credential("valueString","token");
  8625. * credential.destroy();
  8626. */
  8627. }, {
  8628. key: "destroy",
  8629. value: function destroy() {
  8630. this.value = null;
  8631. this.name = null;
  8632. }
  8633. }]);
  8634. return Credential;
  8635. }();
  8636. /**
  8637. * @member {SuperMap.Credential} SuperMap.Credential.CREDENTIAL
  8638. * @description 这个对象保存一个安全类的实例,在服务端需要安全验证的时候必须进行设置。
  8639. * @constant
  8640. * @example
  8641. * 代码实例:
  8642. * // 当iServer启用服务安全的时候,下边的代码是必须的。安全证书类能够接收一个value和一个name参数。
  8643. * var value = "(以iServer为例,这里是申请的token值)";
  8644. * var name = "token";
  8645. * // 默认name参数为token,所以当使用iServer服务的时候可以不进行设置。
  8646. * SuperMap.Credential.CREDENTIAL = new SuperMap.Credential(value, name);
  8647. *
  8648. */
  8649. Credential.CREDENTIAL = null;
  8650. SuperMap.Credential = Credential;
  8651. // CONCATENATED MODULE: ./src/common/format/Format.js
  8652. function Format_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  8653. function Format_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  8654. function Format_createClass(Constructor, protoProps, staticProps) { if (protoProps) Format_defineProperties(Constructor.prototype, protoProps); if (staticProps) Format_defineProperties(Constructor, staticProps); return Constructor; }
  8655. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  8656. * This program are made available under the terms of the Apache License, Version 2.0
  8657. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  8658. /**
  8659. * @class SuperMap.Format
  8660. * @classdesc 读写各种格式的格式类基类。其子类应该包含并实现 read 和 write 方法。
  8661. * @category BaseTypes Format
  8662. * @param {Object} options - 可选参数。
  8663. * @param {boolean} [options.keepData=false] - 如果设置为 true, data 属性会指向被解析的对象(例如 JSON 或 xml 数据对象)。
  8664. * @param {Object} [options.data] - 当 keepData 属性设置为 true,这是传递给 read 操作的要被解析的字符串。
  8665. */
  8666. var Format_Format = /*#__PURE__*/function () {
  8667. function Format(options) {
  8668. Format_classCallCheck(this, Format);
  8669. /**
  8670. * @member {Object} SuperMap.Format.prototype.data
  8671. * @description 当 keepData 属性设置为 true,这是传递给 read 操作的要被解析的字符串。
  8672. */
  8673. this.data = null;
  8674. /**
  8675. * APIProperty: keepData
  8676. * @member {Object} [SuperMap.Format.prototype.keepData=false]
  8677. * @description 保持最近读到的数据的引用(通过 <data> 属性)。
  8678. */
  8679. this.keepData = false;
  8680. Util.extend(this, options);
  8681. this.options = options;
  8682. this.CLASS_NAME = "SuperMap.Format";
  8683. }
  8684. /**
  8685. * @function SuperMap.Format.prototype.destroy
  8686. * @description 销毁该格式类,释放相关资源。
  8687. */
  8688. Format_createClass(Format, [{
  8689. key: "destroy",
  8690. value: function destroy() {//用来销毁该格式类,释放相关资源
  8691. }
  8692. /**
  8693. * @function SuperMap.Format.prototype.read
  8694. * @description 来从字符串中读取数据。
  8695. * @param {string} data - 读取的数据。
  8696. */
  8697. }, {
  8698. key: "read",
  8699. value: function read(data) {// eslint-disable-line no-unused-vars
  8700. //用来从字符串中读取数据
  8701. }
  8702. /**
  8703. * @function SuperMap.Format.prototype.write
  8704. * @description 将对象写成字符串。
  8705. * @param {Object} object - 可序列化的对象。
  8706. * @returns {string} 对象被写成字符串。
  8707. */
  8708. }, {
  8709. key: "write",
  8710. value: function write(object) {// eslint-disable-line no-unused-vars
  8711. //用来写字符串
  8712. }
  8713. }]);
  8714. return Format;
  8715. }();
  8716. SuperMap.Format = SuperMap.Format || Format_Format;
  8717. // CONCATENATED MODULE: ./src/common/format/JSON.js
  8718. function JSON_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { JSON_typeof = function _typeof(obj) { return typeof obj; }; } else { JSON_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return JSON_typeof(obj); }
  8719. function JSON_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  8720. function JSON_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  8721. function JSON_createClass(Constructor, protoProps, staticProps) { if (protoProps) JSON_defineProperties(Constructor.prototype, protoProps); if (staticProps) JSON_defineProperties(Constructor, staticProps); return Constructor; }
  8722. function JSON_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) JSON_setPrototypeOf(subClass, superClass); }
  8723. function JSON_setPrototypeOf(o, p) { JSON_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return JSON_setPrototypeOf(o, p); }
  8724. function JSON_createSuper(Derived) { var hasNativeReflectConstruct = JSON_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = JSON_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = JSON_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return JSON_possibleConstructorReturn(this, result); }; }
  8725. function JSON_possibleConstructorReturn(self, call) { if (call && (JSON_typeof(call) === "object" || typeof call === "function")) { return call; } return JSON_assertThisInitialized(self); }
  8726. function JSON_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  8727. function JSON_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  8728. function JSON_getPrototypeOf(o) { JSON_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return JSON_getPrototypeOf(o); }
  8729. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  8730. * This program are made available under the terms of the Apache License, Version 2.0
  8731. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  8732. /**
  8733. * @class SuperMap.Format.JSON
  8734. * @classdesc 安全的读写 JSON 的解析类。使用 {@link SuperMap.Format.JSON} 构造函数创建新实例。
  8735. * @category BaseTypes Format
  8736. * @param {Object} [options] - 参数。
  8737. * @param {string} [options.indent=" "] - 用于格式化输出,indent 字符串会在每次缩进的时候使用一次。
  8738. * @param {string} [options.space=" "] - 用于格式化输出,space 字符串会在名值对的 ":" 后边添加。
  8739. * @param {string} [options.newline="\n"] - 用于格式化输出, newline 字符串会用在每一个名值对或数组项末尾。
  8740. * @param {number} [options.level=0] - 用于格式化输出, 表示的是缩进级别。
  8741. * @param {boolean} [options.pretty=false] - 是否在序列化的时候使用额外的空格控制结构。在 write 方法中使用。
  8742. * @param {boolean} [options.nativeJSON] - 需要被注册的监听器对象。
  8743. * @extends {SuperMap.Format}
  8744. */
  8745. var JSONFormat = /*#__PURE__*/function (_Format) {
  8746. JSON_inherits(JSONFormat, _Format);
  8747. var _super = JSON_createSuper(JSONFormat);
  8748. function JSONFormat(options) {
  8749. var _this;
  8750. JSON_classCallCheck(this, JSONFormat);
  8751. _this = _super.call(this, options);
  8752. /**
  8753. * @member {string} [SuperMap.Format.JSON.prototype.indent=" "]
  8754. * @description 用于格式化输出,indent 字符串会在每次缩进的时候使用一次。
  8755. */
  8756. _this.indent = " ";
  8757. /**
  8758. * @member {string} [SuperMap.Format.JSON.prototype.space=" "]
  8759. * @description 用于格式化输出,space 字符串会在名值对的 ":" 后边添加。
  8760. */
  8761. _this.space = " ";
  8762. /**
  8763. * @member {string} [SuperMap.Format.JSON.prototype.newline="\n"]
  8764. * @description 用于格式化输出, newline 字符串会用在每一个名值对或数组项末尾。
  8765. */
  8766. _this.newline = "\n";
  8767. /**
  8768. * @member {integer} [SuperMap.Format.JSON.prototype.level=0]
  8769. * @description 用于格式化输出, 表示的是缩进级别。
  8770. */
  8771. _this.level = 0;
  8772. /**
  8773. * @member {boolean} [SuperMap.Format.JSON.prototype.pretty=false]
  8774. * @description 是否在序列化的时候使用额外的空格控制结构。在 write 方法中使用。
  8775. */
  8776. _this.pretty = false;
  8777. /**
  8778. * @member {boolean} SuperMap.Format.JSON.prototype.nativeJSON
  8779. * @description 判断浏览器是否原生支持 JSON 格式数据。
  8780. */
  8781. _this.nativeJSON = function () {
  8782. return !!(window.JSON && typeof JSON.parse === "function" && typeof JSON.stringify === "function");
  8783. }();
  8784. _this.CLASS_NAME = "SuperMap.Format.JSON";
  8785. /**
  8786. * @member SuperMap.Format.JSON.prototype.serialize
  8787. * @description 提供一些类型对象转 JSON 字符串的方法。
  8788. */
  8789. _this.serialize = {
  8790. /**
  8791. * @function SuperMap.Format.JSON.serialize.object
  8792. * @description 把对象转换为 JSON 字符串。
  8793. * @param {Object} object - 可序列化的对象。
  8794. * @returns {string} JSON 字符串。
  8795. */
  8796. 'object': function object(_object) {
  8797. // three special objects that we want to treat differently
  8798. if (_object == null) {
  8799. return "null";
  8800. }
  8801. if (_object.constructor === Date) {
  8802. return this.serialize.date.apply(this, [_object]);
  8803. }
  8804. if (_object.constructor === Array) {
  8805. return this.serialize.array.apply(this, [_object]);
  8806. }
  8807. var pieces = ['{'];
  8808. this.level += 1;
  8809. var key, keyJSON, valueJSON;
  8810. var addComma = false;
  8811. for (key in _object) {
  8812. if (_object.hasOwnProperty(key)) {
  8813. // recursive calls need to allow for sub-classing
  8814. keyJSON = this.write.apply(this, [key, this.pretty]);
  8815. valueJSON = this.write.apply(this, [_object[key], this.pretty]);
  8816. if (keyJSON != null && valueJSON != null) {
  8817. if (addComma) {
  8818. pieces.push(',');
  8819. }
  8820. pieces.push(this.writeNewline(), this.writeIndent(), keyJSON, ':', this.writeSpace(), valueJSON);
  8821. addComma = true;
  8822. }
  8823. }
  8824. }
  8825. this.level -= 1;
  8826. pieces.push(this.writeNewline(), this.writeIndent(), '}');
  8827. return pieces.join('');
  8828. },
  8829. /**
  8830. * @function SuperMap.Format.JSON.serialize.array
  8831. * @description 把数组转换成 JSON 字符串。
  8832. * @param {Array} array - 可序列化的数组。
  8833. * @returns {string} JSON 字符串。
  8834. */
  8835. 'array': function array(_array) {
  8836. var json;
  8837. var pieces = ['['];
  8838. this.level += 1;
  8839. for (var i = 0, len = _array.length; i < len; ++i) {
  8840. // recursive calls need to allow for sub-classing
  8841. json = this.write.apply(this, [_array[i], this.pretty]);
  8842. if (json != null) {
  8843. if (i > 0) {
  8844. pieces.push(',');
  8845. }
  8846. pieces.push(this.writeNewline(), this.writeIndent(), json);
  8847. }
  8848. }
  8849. this.level -= 1;
  8850. pieces.push(this.writeNewline(), this.writeIndent(), ']');
  8851. return pieces.join('');
  8852. },
  8853. /**
  8854. * @function SuperMap.Format.JSON.serialize.string
  8855. * @description 把字符串转换成 JSON 字符串。
  8856. * @param {string} string - 可序列化的字符串。
  8857. * @returns {string} JSON 字符串。
  8858. */
  8859. 'string': function string(_string) {
  8860. // If the string contains no control characters, no quote characters, and no
  8861. // backslash characters, then we can simply slap some quotes around it.
  8862. // Otherwise we must also replace the offending characters with safe
  8863. // sequences.
  8864. var m = {
  8865. '\b': '\\b',
  8866. '\t': '\\t',
  8867. '\n': '\\n',
  8868. '\f': '\\f',
  8869. '\r': '\\r',
  8870. '"': '\\"',
  8871. '\\': '\\\\'
  8872. };
  8873. /*eslint-disable no-control-regex*/
  8874. if (/["\\\x00-\x1f]/.test(_string)) {
  8875. return '"' + _string.replace(/([\x00-\x1f\\"])/g, function (a, b) {
  8876. var c = m[b];
  8877. if (c) {
  8878. return c;
  8879. }
  8880. c = b.charCodeAt();
  8881. return "\\u00" + Math.floor(c / 16).toString(16) + (c % 16).toString(16);
  8882. }) + '"';
  8883. }
  8884. return '"' + _string + '"';
  8885. },
  8886. /**
  8887. * @function SuperMap.Format.JSON.serialize.number
  8888. * @description 把数字转换成 JSON 字符串。
  8889. * @param {number} number - 可序列化的数字。
  8890. * @returns {string} JSON 字符串。
  8891. */
  8892. 'number': function number(_number) {
  8893. return isFinite(_number) ? String(_number) : "null";
  8894. },
  8895. /**
  8896. * @function SuperMap.Format.JSON.serialize.boolean
  8897. * @description Transform a boolean into a JSON string.
  8898. * @param {boolean} bool - The boolean to be serialized.
  8899. * @returns {string} A JSON string representing the boolean.
  8900. */
  8901. 'boolean': function boolean(bool) {
  8902. return String(bool);
  8903. },
  8904. /**
  8905. * @function SuperMap.Format.JSON.serialize.object
  8906. * @description 将日期对象转换成 JSON 字符串。
  8907. * @param {Date} date - 可序列化的日期对象。
  8908. * @returns {string} JSON 字符串。
  8909. */
  8910. 'date': function date(_date) {
  8911. function format(number) {
  8912. // Format integers to have at least two digits.
  8913. return number < 10 ? '0' + number : number;
  8914. }
  8915. return '"' + _date.getFullYear() + '-' + format(_date.getMonth() + 1) + '-' + format(_date.getDate()) + 'T' + format(_date.getHours()) + ':' + format(_date.getMinutes()) + ':' + format(_date.getSeconds()) + '"';
  8916. }
  8917. };
  8918. return _this;
  8919. }
  8920. /**
  8921. * @function SuperMap.Format.JSON.prototype.read
  8922. * @description 将一个符合 JSON 结构的字符串进行解析。
  8923. * @param {string} json - 符合 JSON 结构的字符串。
  8924. * @param {function} filter - 过滤方法,最终结果的每一个键值对都会调用该过滤方法,并在对应的值的位置替换成该方法返回的值。
  8925. * @returns {Object} 对象,数组,字符串或数字。
  8926. */
  8927. JSON_createClass(JSONFormat, [{
  8928. key: "read",
  8929. value: function read(json, filter) {
  8930. var object;
  8931. if (this.nativeJSON) {
  8932. try {
  8933. object = JSON.parse(json, filter);
  8934. } catch (e) {// Fall through if the regexp test fails.
  8935. }
  8936. }
  8937. if (this.keepData) {
  8938. this.data = object;
  8939. }
  8940. return object;
  8941. }
  8942. /**
  8943. * @function SuperMap.Format.JSON.prototype.write
  8944. * @description 序列化一个对象到一个符合 JSON 格式的字符串。
  8945. * @param {(object|string|Array|number|boolean)} value - 需要被序列化的对象,数组,字符串,数字,布尔值。
  8946. * @param {boolean} [pretty=false] - 是否在序列化的时候使用额外的空格控制结构。在 write 方法中使用。
  8947. * @returns {string} 符合 JSON 格式的字符串。
  8948. *
  8949. */
  8950. }, {
  8951. key: "write",
  8952. value: function write(value, pretty) {
  8953. this.pretty = !!pretty;
  8954. var json = null;
  8955. var type = JSON_typeof(value);
  8956. if (this.serialize[type]) {
  8957. try {
  8958. json = !this.pretty && this.nativeJSON ? JSON.stringify(value) : this.serialize[type].apply(this, [value]);
  8959. } catch (err) {//SuperMap.Console.error("Trouble serializing: " + err);
  8960. }
  8961. }
  8962. return json;
  8963. }
  8964. /**
  8965. * @function SuperMap.Format.JSON.prototype.writeIndent
  8966. * @description 根据缩进级别输出一个缩进字符串。
  8967. * @private
  8968. * @returns {string} 一个适当的缩进字符串。
  8969. */
  8970. }, {
  8971. key: "writeIndent",
  8972. value: function writeIndent() {
  8973. var pieces = [];
  8974. if (this.pretty) {
  8975. for (var i = 0; i < this.level; ++i) {
  8976. pieces.push(this.indent);
  8977. }
  8978. }
  8979. return pieces.join('');
  8980. }
  8981. /**
  8982. * @function SuperMap.Format.JSON.prototype.writeNewline
  8983. * @description 在格式化输出模式情况下输出代表新一行的字符串。
  8984. * @private
  8985. * @returns {string} 代表新的一行的字符串。
  8986. */
  8987. }, {
  8988. key: "writeNewline",
  8989. value: function writeNewline() {
  8990. return this.pretty ? this.newline : '';
  8991. }
  8992. /**
  8993. * @function SuperMap.Format.JSON.prototype.writeSpace
  8994. * @private
  8995. * @description 在格式化输出模式情况下输出一个代表空格的字符串。
  8996. * @returns {string} 一个空格。
  8997. */
  8998. }, {
  8999. key: "writeSpace",
  9000. value: function writeSpace() {
  9001. return this.pretty ? this.space : '';
  9002. }
  9003. }]);
  9004. return JSONFormat;
  9005. }(Format_Format);
  9006. SuperMap.Format.JSON = JSONFormat;
  9007. // CONCATENATED MODULE: ./src/common/iServer/CommonServiceBase.js
  9008. function CommonServiceBase_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9009. function CommonServiceBase_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9010. function CommonServiceBase_createClass(Constructor, protoProps, staticProps) { if (protoProps) CommonServiceBase_defineProperties(Constructor.prototype, protoProps); if (staticProps) CommonServiceBase_defineProperties(Constructor, staticProps); return Constructor; }
  9011. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  9012. * This program are made available under the terms of the Apache License, Version 2.0
  9013. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9014. /**
  9015. * @class SuperMap.CommonServiceBase
  9016. * @category iServer
  9017. * @classdesc 对接 iServer 各种服务的 Service 的基类。
  9018. * @param {string} url - 服务地址。
  9019. * @param {Object} options - 参数。
  9020. * @param {Object} options.eventListeners - 事件监听器对象。有 processCompleted 属性可传入处理完成后的回调函数。processFailed 属性传入处理失败后的回调函数。
  9021. * @param {string} [options.proxy] - 服务代理地址。
  9022. * @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务器类型,ISERVER|IPORTAL|ONLINE。
  9023. * @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
  9024. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  9025. * @param {Object} [options.headers] - 请求头。
  9026. */
  9027. var CommonServiceBase_CommonServiceBase = /*#__PURE__*/function () {
  9028. function CommonServiceBase(url, options) {
  9029. CommonServiceBase_classCallCheck(this, CommonServiceBase);
  9030. var me = this;
  9031. this.EVENT_TYPES = ["processCompleted", "processFailed"];
  9032. this.events = null;
  9033. this.eventListeners = null;
  9034. this.url = null;
  9035. this.urls = null;
  9036. this.proxy = null;
  9037. this.serverType = null;
  9038. this.index = null;
  9039. this.length = null;
  9040. this.options = null;
  9041. this.totalTimes = null;
  9042. this.POLLING_TIMES = 3;
  9043. this._processSuccess = null;
  9044. this._processFailed = null;
  9045. this.isInTheSameDomain = null;
  9046. this.withCredentials = false;
  9047. if (Util.isArray(url)) {
  9048. me.urls = url;
  9049. me.length = url.length;
  9050. me.totalTimes = me.length;
  9051. if (me.length === 1) {
  9052. me.url = url[0];
  9053. } else {
  9054. me.index = parseInt(Math.random() * me.length);
  9055. me.url = url[me.index];
  9056. }
  9057. } else {
  9058. me.totalTimes = 1;
  9059. me.url = url;
  9060. }
  9061. if (Util.isArray(url) && !me.isServiceSupportPolling()) {
  9062. me.url = url[0];
  9063. me.totalTimes = 1;
  9064. }
  9065. me.serverType = me.serverType || ServerType.ISERVER;
  9066. options = options || {};
  9067. this.crossOrigin = options.crossOrigin;
  9068. this.headers = options.headers;
  9069. Util.extend(this, options);
  9070. me.isInTheSameDomain = Util.isInTheSameDomain(me.url);
  9071. me.events = new Events_Events(me, null, me.EVENT_TYPES, true);
  9072. if (me.eventListeners instanceof Object) {
  9073. me.events.on(me.eventListeners);
  9074. }
  9075. this.CLASS_NAME = "SuperMap.CommonServiceBase";
  9076. }
  9077. /**
  9078. * @function SuperMap.CommonServiceBase.prototype.destroy
  9079. * @description 释放资源,将引用的资源属性置空。
  9080. */
  9081. CommonServiceBase_createClass(CommonServiceBase, [{
  9082. key: "destroy",
  9083. value: function destroy() {
  9084. var me = this;
  9085. if (Util.isArray(me.urls)) {
  9086. me.urls = null;
  9087. me.index = null;
  9088. me.length = null;
  9089. me.totalTimes = null;
  9090. }
  9091. me.url = null;
  9092. me.options = null;
  9093. me._processSuccess = null;
  9094. me._processFailed = null;
  9095. me.isInTheSameDomain = null;
  9096. me.EVENT_TYPES = null;
  9097. if (me.events) {
  9098. me.events.destroy();
  9099. me.events = null;
  9100. }
  9101. if (me.eventListeners) {
  9102. me.eventListeners = null;
  9103. }
  9104. }
  9105. /**
  9106. * @function SuperMap.CommonServiceBase.prototype.request
  9107. * @description: 该方法用于向服务发送请求。
  9108. * @param {Object} options - 参数。
  9109. * @param {string} [options.method='GET'] - 请求方式,包括 "GET","POST","PUT","DELETE"。
  9110. * @param {string} [options.url] - 发送请求的地址。
  9111. * @param {Object} [options.params] - 作为查询字符串添加到 URL 中的一组键值对,此参数只适用于 GET 方式发送的请求。
  9112. * @param {string} [options.data] - 发送到服务器的数据。
  9113. * @param {function} options.success - 请求成功后的回调函数。
  9114. * @param {function} options.failure - 请求失败后的回调函数。
  9115. * @param {Object} [options.scope] - 如果回调函数是对象的一个公共方法,设定该对象的范围。
  9116. * @param {boolean} [options.isInTheSameDomain] - 请求是否在当前域中。
  9117. * @param {boolean} [options.withCredentials=false] - 请求是否携带 cookie。
  9118. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  9119. * @param {Object} [options.headers] - 请求头。
  9120. */
  9121. }, {
  9122. key: "request",
  9123. value: function request(options) {
  9124. var me = this;
  9125. options.url = options.url || me.url;
  9126. options.proxy = options.proxy || me.proxy;
  9127. options.withCredentials = options.withCredentials != undefined ? options.withCredentials : me.withCredentials;
  9128. options.crossOrigin = options.crossOrigin != undefined ? options.crossOrigin : me.crossOrigin;
  9129. options.headers = options.headers || me.headers;
  9130. options.isInTheSameDomain = me.isInTheSameDomain; //为url添加安全认证信息片段
  9131. var credential = this.getCredential(options.url);
  9132. if (credential) {
  9133. options.url = Util.urlAppend(options.url, credential.getUrlParameters());
  9134. }
  9135. me.calculatePollingTimes();
  9136. me._processSuccess = options.success;
  9137. me._processFailed = options.failure;
  9138. options.scope = me;
  9139. options.success = me.getUrlCompleted;
  9140. options.failure = me.getUrlFailed;
  9141. me.options = options;
  9142. me._commit(me.options);
  9143. }
  9144. /**
  9145. * @function SuperMap.CommonServiceBase.prototype.getCredential
  9146. * @description 获取凭据信息
  9147. * @param {string} url - 服务地址。
  9148. * @returns {SuperMap.Credential} 凭据信息对象。
  9149. */
  9150. }, {
  9151. key: "getCredential",
  9152. value: function getCredential(url) {
  9153. var keyUrl = url,
  9154. credential,
  9155. value;
  9156. switch (this.serverType) {
  9157. case ServerType.IPORTAL:
  9158. value = SecurityManager_SecurityManager.getToken(keyUrl);
  9159. credential = value ? new Credential(value, "token") : null;
  9160. if (!credential) {
  9161. value = SecurityManager_SecurityManager.getKey(keyUrl);
  9162. credential = value ? new Credential(value, "key") : null;
  9163. }
  9164. break;
  9165. case ServerType.ONLINE:
  9166. value = SecurityManager_SecurityManager.getKey(keyUrl);
  9167. credential = value ? new Credential(value, "key") : null;
  9168. break;
  9169. default:
  9170. //iServer or others
  9171. value = SecurityManager_SecurityManager.getToken(keyUrl);
  9172. credential = value ? new Credential(value, "token") : null;
  9173. break;
  9174. }
  9175. return credential;
  9176. }
  9177. /**
  9178. * @function SuperMap.CommonServiceBase.prototype.getUrlCompleted
  9179. * @description 请求成功后执行此方法。
  9180. * @param {Object} result - 服务器返回的结果对象。
  9181. */
  9182. }, {
  9183. key: "getUrlCompleted",
  9184. value: function getUrlCompleted(result) {
  9185. var me = this;
  9186. me._processSuccess(result);
  9187. }
  9188. /**
  9189. * @function SuperMap.CommonServiceBase.prototype.getUrlFailed
  9190. * @description 请求失败后执行此方法。
  9191. * @param {Object} result - 服务器返回的结果对象。
  9192. */
  9193. }, {
  9194. key: "getUrlFailed",
  9195. value: function getUrlFailed(result) {
  9196. var me = this;
  9197. if (me.totalTimes > 0) {
  9198. me.totalTimes--;
  9199. me.ajaxPolling();
  9200. } else {
  9201. me._processFailed(result);
  9202. }
  9203. }
  9204. /**
  9205. *
  9206. * @function SuperMap.CommonServiceBase.prototype.ajaxPolling
  9207. * @description 请求失败后,如果剩余请求失败次数不为 0,重新获取 URL 发送请求
  9208. */
  9209. }, {
  9210. key: "ajaxPolling",
  9211. value: function ajaxPolling() {
  9212. var me = this,
  9213. url = me.options.url,
  9214. re = /^http:\/\/([a-z]{9}|(\d+\.){3}\d+):\d{0,4}/;
  9215. me.index = parseInt(Math.random() * me.length);
  9216. me.url = me.urls[me.index];
  9217. url = url.replace(re, re.exec(me.url)[0]);
  9218. me.options.url = url;
  9219. me.options.isInTheSameDomain = Util.isInTheSameDomain(url);
  9220. me._commit(me.options);
  9221. }
  9222. /**
  9223. * @function SuperMap.CommonServiceBase.prototype.calculatePollingTimes
  9224. * @description 计算剩余请求失败执行次数。
  9225. */
  9226. }, {
  9227. key: "calculatePollingTimes",
  9228. value: function calculatePollingTimes() {
  9229. var me = this;
  9230. if (me.times) {
  9231. if (me.totalTimes > me.POLLING_TIMES) {
  9232. if (me.times > me.POLLING_TIMES) {
  9233. me.totalTimes = me.POLLING_TIMES;
  9234. } else {
  9235. me.totalTimes = me.times;
  9236. }
  9237. } else {
  9238. if (me.times < me.totalTimes) {
  9239. me.totalTimes = me.times;
  9240. }
  9241. }
  9242. } else {
  9243. if (me.totalTimes > me.POLLING_TIMES) {
  9244. me.totalTimes = me.POLLING_TIMES;
  9245. }
  9246. }
  9247. me.totalTimes--;
  9248. }
  9249. /**
  9250. * @function SuperMap.CommonServiceBase.prototype.isServiceSupportPolling
  9251. * @description 判断服务是否支持轮询。
  9252. */
  9253. }, {
  9254. key: "isServiceSupportPolling",
  9255. value: function isServiceSupportPolling() {
  9256. var me = this;
  9257. return !(me.CLASS_NAME === "SuperMap.REST.ThemeService" || me.CLASS_NAME === "SuperMap.REST.EditFeaturesService");
  9258. }
  9259. /**
  9260. * @function SuperMap.CommonServiceBase.prototype.serviceProcessCompleted
  9261. * @description 状态完成,执行此方法。
  9262. * @param {Object} result - 服务器返回的结果对象。
  9263. */
  9264. }, {
  9265. key: "serviceProcessCompleted",
  9266. value: function serviceProcessCompleted(result) {
  9267. result = Util.transformResult(result);
  9268. this.events.triggerEvent("processCompleted", {
  9269. result: result
  9270. });
  9271. }
  9272. /**
  9273. * @function SuperMap.CommonServiceBase.prototype.serviceProcessFailed
  9274. * @description 状态失败,执行此方法。
  9275. * @param {Object} result - 服务器返回的结果对象。
  9276. */
  9277. }, {
  9278. key: "serviceProcessFailed",
  9279. value: function serviceProcessFailed(result) {
  9280. result = Util.transformResult(result);
  9281. var error = result.error || result;
  9282. this.events.triggerEvent("processFailed", {
  9283. error: error
  9284. });
  9285. }
  9286. }, {
  9287. key: "_commit",
  9288. value: function _commit(options) {
  9289. if (options.method === "POST" || options.method === "PUT") {
  9290. if (options.params) {
  9291. options.url = Util.urlAppend(options.url, Util.getParameterString(options.params || {}));
  9292. }
  9293. options.params = options.data;
  9294. }
  9295. FetchRequest.commit(options.method, options.url, options.params, {
  9296. headers: options.headers,
  9297. withCredentials: options.withCredentials,
  9298. crossOrigin: options.crossOrigin,
  9299. timeout: options.async ? 0 : null,
  9300. proxy: options.proxy
  9301. }).then(function (response) {
  9302. if (response.text) {
  9303. return response.text();
  9304. }
  9305. if (response.json) {
  9306. return response.json();
  9307. }
  9308. return response;
  9309. }).then(function (text) {
  9310. var result = text;
  9311. if (typeof text === "string") {
  9312. result = new JSONFormat().read(text);
  9313. }
  9314. if (!result || result.error || result.code >= 300 && result.code !== 304) {
  9315. if (result && result.error) {
  9316. result = {
  9317. error: result.error
  9318. };
  9319. } else {
  9320. result = {
  9321. error: result
  9322. };
  9323. }
  9324. }
  9325. if (result.error) {
  9326. var failure = options.scope ? FunctionExt.bind(options.failure, options.scope) : options.failure;
  9327. failure(result);
  9328. } else {
  9329. result.succeed = result.succeed == undefined ? true : result.succeed;
  9330. var success = options.scope ? FunctionExt.bind(options.success, options.scope) : options.success;
  9331. success(result);
  9332. }
  9333. })["catch"](function (e) {
  9334. var failure = options.scope ? FunctionExt.bind(options.failure, options.scope) : options.failure;
  9335. failure(e);
  9336. });
  9337. }
  9338. }]);
  9339. return CommonServiceBase;
  9340. }();
  9341. SuperMap.CommonServiceBase = CommonServiceBase_CommonServiceBase;
  9342. /**
  9343. * 服务器请求回调函数
  9344. * @callback RequestCallback
  9345. * @example
  9346. * var requestCallback = function (serviceResult){
  9347. * console.log(serviceResult.result);
  9348. * }
  9349. * new QueryService(url).queryByBounds(param, requestCallback);
  9350. * @param {Object} serviceResult
  9351. * @param {Object} serviceResult.result 服务器返回结果。
  9352. * @param {Object} serviceResult.object 发布应用程序事件的对象。
  9353. * @param {Object} serviceResult.type 事件类型。
  9354. * @param {Object} serviceResult.element 接受浏览器事件的 DOM 节点。
  9355. */
  9356. // CONCATENATED MODULE: ./src/common/iServer/AddressMatchService.js
  9357. function AddressMatchService_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { AddressMatchService_typeof = function _typeof(obj) { return typeof obj; }; } else { AddressMatchService_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return AddressMatchService_typeof(obj); }
  9358. function AddressMatchService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9359. function AddressMatchService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9360. function AddressMatchService_createClass(Constructor, protoProps, staticProps) { if (protoProps) AddressMatchService_defineProperties(Constructor.prototype, protoProps); if (staticProps) AddressMatchService_defineProperties(Constructor, staticProps); return Constructor; }
  9361. function AddressMatchService_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { AddressMatchService_get = Reflect.get; } else { AddressMatchService_get = function _get(target, property, receiver) { var base = AddressMatchService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return AddressMatchService_get(target, property, receiver || target); }
  9362. function AddressMatchService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = AddressMatchService_getPrototypeOf(object); if (object === null) break; } return object; }
  9363. function AddressMatchService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) AddressMatchService_setPrototypeOf(subClass, superClass); }
  9364. function AddressMatchService_setPrototypeOf(o, p) { AddressMatchService_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return AddressMatchService_setPrototypeOf(o, p); }
  9365. function AddressMatchService_createSuper(Derived) { var hasNativeReflectConstruct = AddressMatchService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = AddressMatchService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = AddressMatchService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return AddressMatchService_possibleConstructorReturn(this, result); }; }
  9366. function AddressMatchService_possibleConstructorReturn(self, call) { if (call && (AddressMatchService_typeof(call) === "object" || typeof call === "function")) { return call; } return AddressMatchService_assertThisInitialized(self); }
  9367. function AddressMatchService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  9368. function AddressMatchService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  9369. function AddressMatchService_getPrototypeOf(o) { AddressMatchService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return AddressMatchService_getPrototypeOf(o); }
  9370. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  9371. * This program are made available under the terms of the Apache License, Version 2.0
  9372. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9373. /**
  9374. * @class SuperMap.AddressMatchService
  9375. * @category iServer AddressMatch
  9376. * @classdesc 地址匹配服务,包括正向匹配和反向匹配。
  9377. * @param {string} url - 地址匹配服务地址。
  9378. * @param {Object} options - 参数。
  9379. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  9380. * @param {Object} [options.headers] - 请求头。
  9381. */
  9382. var AddressMatchService_AddressMatchService = /*#__PURE__*/function (_CommonServiceBase) {
  9383. AddressMatchService_inherits(AddressMatchService, _CommonServiceBase);
  9384. var _super = AddressMatchService_createSuper(AddressMatchService);
  9385. function AddressMatchService(url, options) {
  9386. var _this;
  9387. AddressMatchService_classCallCheck(this, AddressMatchService);
  9388. _this = _super.call(this, url, options);
  9389. _this.options = options || {};
  9390. _this.CLASS_NAME = 'SuperMap.AddressMatchService';
  9391. return _this;
  9392. }
  9393. /**
  9394. * @function SuperMap.AddressMatchService.prototype.destroy
  9395. * @override
  9396. */
  9397. AddressMatchService_createClass(AddressMatchService, [{
  9398. key: "destroy",
  9399. value: function destroy() {
  9400. AddressMatchService_get(AddressMatchService_getPrototypeOf(AddressMatchService.prototype), "destroy", this).call(this);
  9401. }
  9402. /**
  9403. * @function SuperMap.AddressMatchService.prototype.code
  9404. * @param {string} url - 正向地址匹配服务地址。
  9405. * @param {SuperMap.GeoCodingParameter} params - 正向地址匹配服务参数。
  9406. */
  9407. }, {
  9408. key: "code",
  9409. value: function code(url, params) {
  9410. if (!(params instanceof GeoCodingParameter_GeoCodingParameter)) {
  9411. return;
  9412. }
  9413. this.processAsync(url, params);
  9414. }
  9415. /**
  9416. * @function SuperMap.AddressMatchService.prototype.decode
  9417. * @param {string} url - 反向地址匹配服务地址。
  9418. * @param {SuperMap.GeoDecodingParameter} params - 反向地址匹配服务参数。
  9419. */
  9420. }, {
  9421. key: "decode",
  9422. value: function decode(url, params) {
  9423. if (!(params instanceof GeoDecodingParameter_GeoDecodingParameter)) {
  9424. return;
  9425. }
  9426. this.processAsync(url, params);
  9427. }
  9428. /**
  9429. * @function SuperMap.AddressMatchService.prototype.processAsync
  9430. * @description 负责将客户端的动态分段服务参数传递到服务端。
  9431. * @param {string} url - 服务地址。
  9432. * @param {Object} params - 参数。
  9433. */
  9434. }, {
  9435. key: "processAsync",
  9436. value: function processAsync(url, params) {
  9437. this.request({
  9438. method: 'GET',
  9439. url: url,
  9440. params: params,
  9441. scope: this,
  9442. success: this.serviceProcessCompleted,
  9443. failure: this.serviceProcessFailed
  9444. });
  9445. }
  9446. /**
  9447. * @function SuperMap.AddressMatchService.prototype.serviceProcessCompleted
  9448. * @param {Object} result - 服务器返回的结果对象。
  9449. * @description 服务流程是否完成
  9450. */
  9451. }, {
  9452. key: "serviceProcessCompleted",
  9453. value: function serviceProcessCompleted(result) {
  9454. if (result.succeed) {
  9455. delete result.succeed;
  9456. }
  9457. AddressMatchService_get(AddressMatchService_getPrototypeOf(AddressMatchService.prototype), "serviceProcessCompleted", this).call(this, result);
  9458. }
  9459. /**
  9460. * @function SuperMap.AddressMatchService.prototype.serviceProcessCompleted
  9461. * @param {Object} result - 服务器返回的结果对象。
  9462. * @description 服务流程是否失败
  9463. */
  9464. }, {
  9465. key: "serviceProcessFailed",
  9466. value: function serviceProcessFailed(result) {
  9467. AddressMatchService_get(AddressMatchService_getPrototypeOf(AddressMatchService.prototype), "serviceProcessFailed", this).call(this, result);
  9468. }
  9469. }]);
  9470. return AddressMatchService;
  9471. }(CommonServiceBase_CommonServiceBase);
  9472. SuperMap.AddressMatchService = AddressMatchService_AddressMatchService;
  9473. // CONCATENATED MODULE: ./src/classic/services/AddressMatchService.js
  9474. function services_AddressMatchService_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { services_AddressMatchService_typeof = function _typeof(obj) { return typeof obj; }; } else { services_AddressMatchService_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return services_AddressMatchService_typeof(obj); }
  9475. function services_AddressMatchService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9476. function services_AddressMatchService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9477. function services_AddressMatchService_createClass(Constructor, protoProps, staticProps) { if (protoProps) services_AddressMatchService_defineProperties(Constructor.prototype, protoProps); if (staticProps) services_AddressMatchService_defineProperties(Constructor, staticProps); return Constructor; }
  9478. function services_AddressMatchService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) services_AddressMatchService_setPrototypeOf(subClass, superClass); }
  9479. function services_AddressMatchService_setPrototypeOf(o, p) { services_AddressMatchService_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return services_AddressMatchService_setPrototypeOf(o, p); }
  9480. function services_AddressMatchService_createSuper(Derived) { var hasNativeReflectConstruct = services_AddressMatchService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = services_AddressMatchService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = services_AddressMatchService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return services_AddressMatchService_possibleConstructorReturn(this, result); }; }
  9481. function services_AddressMatchService_possibleConstructorReturn(self, call) { if (call && (services_AddressMatchService_typeof(call) === "object" || typeof call === "function")) { return call; } return services_AddressMatchService_assertThisInitialized(self); }
  9482. function services_AddressMatchService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  9483. function services_AddressMatchService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  9484. function services_AddressMatchService_getPrototypeOf(o) { services_AddressMatchService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return services_AddressMatchService_getPrototypeOf(o); }
  9485. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  9486. * This program are made available under the terms of the Apache License, Version 2.0
  9487. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9488. /**
  9489. * @class SuperMap.REST.AddressMatchService
  9490. * @category iServer AddressMatch
  9491. * @classdesc 地址匹配服务,包括正向匹配和反向匹配。
  9492. * @extends {SuperMap.CommonServiceBase}
  9493. * @param {string} url - 服务地址。
  9494. * @param {Object} options - 参数。
  9495. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  9496. * @param {Object} [options.headers] - 请求头。
  9497. */
  9498. var services_AddressMatchService_AddressMatchService = /*#__PURE__*/function (_CommonServiceBase) {
  9499. services_AddressMatchService_inherits(AddressMatchService, _CommonServiceBase);
  9500. var _super = services_AddressMatchService_createSuper(AddressMatchService);
  9501. function AddressMatchService(url, options) {
  9502. var _this;
  9503. services_AddressMatchService_classCallCheck(this, AddressMatchService);
  9504. _this = _super.call(this, url, options);
  9505. _this.CLASS_NAME = "SuperMap.REST.AddressMatchService";
  9506. return _this;
  9507. }
  9508. /**
  9509. * @function SuperMap.REST.AddressMatchService.prototype.code
  9510. * @description 正向匹配。
  9511. * @param {SuperMap.GeoCodingParameter} params - 正向匹配参数。
  9512. * @param {RequestCallback} callback - 回调函数。
  9513. */
  9514. services_AddressMatchService_createClass(AddressMatchService, [{
  9515. key: "code",
  9516. value: function code(params, callback) {
  9517. var me = this;
  9518. var addressMatchService = new AddressMatchService_AddressMatchService(me.url, {
  9519. headers: me.headers,
  9520. proxy: me.proxy,
  9521. withCredentials: me.withCredentials,
  9522. crossOrigin: me.crossOrigin,
  9523. serverType: me.serverType,
  9524. eventListeners: {
  9525. scope: me,
  9526. processCompleted: callback,
  9527. processFailed: callback
  9528. }
  9529. });
  9530. addressMatchService.code(me.url + '/geocoding', params);
  9531. }
  9532. /**
  9533. * @function SuperMap.REST.AddressMatchService.prototype.decode
  9534. * @description 反向匹配。
  9535. * @param {SuperMap.GeoDecodingParameter} params - 反向匹配参数。
  9536. * @param {RequestCallback} callback - 回调函数。
  9537. */
  9538. }, {
  9539. key: "decode",
  9540. value: function decode(params, callback) {
  9541. var me = this;
  9542. var addressMatchService = new AddressMatchService_AddressMatchService(me.url, {
  9543. headers: me.headers,
  9544. proxy: me.proxy,
  9545. withCredentials: me.withCredentials,
  9546. crossOrigin: me.crossOrigin,
  9547. serverType: me.serverType,
  9548. eventListeners: {
  9549. scope: me,
  9550. processCompleted: callback,
  9551. processFailed: callback
  9552. }
  9553. });
  9554. addressMatchService.decode(me.url + '/geodecoding', params);
  9555. }
  9556. }]);
  9557. return AddressMatchService;
  9558. }(CommonServiceBase_CommonServiceBase);
  9559. SuperMap_SuperMap.REST.AddressMatchService = services_AddressMatchService_AddressMatchService;
  9560. // CONCATENATED MODULE: ./src/common/iServer/ProcessingServiceBase.js
  9561. function ProcessingServiceBase_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { ProcessingServiceBase_typeof = function _typeof(obj) { return typeof obj; }; } else { ProcessingServiceBase_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return ProcessingServiceBase_typeof(obj); }
  9562. function ProcessingServiceBase_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9563. function ProcessingServiceBase_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9564. function ProcessingServiceBase_createClass(Constructor, protoProps, staticProps) { if (protoProps) ProcessingServiceBase_defineProperties(Constructor.prototype, protoProps); if (staticProps) ProcessingServiceBase_defineProperties(Constructor, staticProps); return Constructor; }
  9565. function ProcessingServiceBase_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { ProcessingServiceBase_get = Reflect.get; } else { ProcessingServiceBase_get = function _get(target, property, receiver) { var base = ProcessingServiceBase_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return ProcessingServiceBase_get(target, property, receiver || target); }
  9566. function ProcessingServiceBase_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = ProcessingServiceBase_getPrototypeOf(object); if (object === null) break; } return object; }
  9567. function ProcessingServiceBase_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) ProcessingServiceBase_setPrototypeOf(subClass, superClass); }
  9568. function ProcessingServiceBase_setPrototypeOf(o, p) { ProcessingServiceBase_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return ProcessingServiceBase_setPrototypeOf(o, p); }
  9569. function ProcessingServiceBase_createSuper(Derived) { var hasNativeReflectConstruct = ProcessingServiceBase_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = ProcessingServiceBase_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = ProcessingServiceBase_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return ProcessingServiceBase_possibleConstructorReturn(this, result); }; }
  9570. function ProcessingServiceBase_possibleConstructorReturn(self, call) { if (call && (ProcessingServiceBase_typeof(call) === "object" || typeof call === "function")) { return call; } return ProcessingServiceBase_assertThisInitialized(self); }
  9571. function ProcessingServiceBase_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  9572. function ProcessingServiceBase_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  9573. function ProcessingServiceBase_getPrototypeOf(o) { ProcessingServiceBase_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return ProcessingServiceBase_getPrototypeOf(o); }
  9574. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  9575. * This program are made available under the terms of the Apache License, Version 2.0
  9576. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9577. /**
  9578. * @class SuperMap.ProcessingServiceBase
  9579. * @category iServer ProcessingService
  9580. * @classdesc 分布式分析服务基类
  9581. * @extends {SuperMap.CommonServiceBase}
  9582. * @param {string} url - 分布式分析服务地址。
  9583. * @param {Object} options - 参数。
  9584. * @param {SuperMap.Events} options.events - 处理所有事件的对象。
  9585. * @param {number} options.index - 服务访问地址在数组中的位置。
  9586. * @param {number} options.length - 服务访问地址数组长度。
  9587. * @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务器类型,ISERVER|IPORTAL|ONLINE。
  9588. * @param {Object} [options.eventListeners] - 事件监听器对象。有 processCompleted 属性可传入处理完成后的回调函数。processFailed 属性传入处理失败后的回调函数。
  9589. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  9590. * @param {Object} [options.headers] - 请求头。
  9591. */
  9592. var ProcessingServiceBase_ProcessingServiceBase = /*#__PURE__*/function (_CommonServiceBase) {
  9593. ProcessingServiceBase_inherits(ProcessingServiceBase, _CommonServiceBase);
  9594. var _super = ProcessingServiceBase_createSuper(ProcessingServiceBase);
  9595. function ProcessingServiceBase(url, options) {
  9596. var _this;
  9597. ProcessingServiceBase_classCallCheck(this, ProcessingServiceBase);
  9598. options = options || {};
  9599. /*
  9600. * Constant: EVENT_TYPES
  9601. * {Array.<string>}
  9602. * 此类支持的事件类型
  9603. * - *processCompleted* 创建成功后触发的事件。
  9604. * - *processFailed* 创建失败后触发的事件 。
  9605. * - *processRunning* 创建过程的整个阶段都会触发的事件,用于获取创建过程的状态 。
  9606. */
  9607. options.EVENT_TYPES = ["processCompleted", "processFailed", "processRunning"];
  9608. _this = _super.call(this, url, options);
  9609. _this.CLASS_NAME = "SuperMap.ProcessingServiceBase";
  9610. return _this;
  9611. }
  9612. /**
  9613. * @function SuperMap.ProcessingServiceBase.prototype.destroy
  9614. * @override
  9615. */
  9616. ProcessingServiceBase_createClass(ProcessingServiceBase, [{
  9617. key: "destroy",
  9618. value: function destroy() {
  9619. ProcessingServiceBase_get(ProcessingServiceBase_getPrototypeOf(ProcessingServiceBase.prototype), "destroy", this).call(this);
  9620. }
  9621. /**
  9622. * @function SuperMap.ProcessingServiceBase.prototype.getJobs
  9623. * @description 获取分布式分析任务。
  9624. * @param {string} url - 资源地址。
  9625. */
  9626. }, {
  9627. key: "getJobs",
  9628. value: function getJobs(url) {
  9629. var me = this;
  9630. FetchRequest.get(me._processUrl(url), null, {
  9631. proxy: me.proxy
  9632. }).then(function (response) {
  9633. return response.json();
  9634. }).then(function (result) {
  9635. me.events.triggerEvent("processCompleted", {
  9636. result: result
  9637. });
  9638. })["catch"](function (e) {
  9639. me.eventListeners.processFailed({
  9640. error: e
  9641. });
  9642. });
  9643. }
  9644. /**
  9645. * @function SuperMap.ProcessingServiceBase.prototype.addJob
  9646. * @description 添加分布式分析任务。
  9647. * @param {string} url - 资源根地址。
  9648. * @param {Object} params - 创建一个空间分析的请求参数。
  9649. * @param {string} paramType - 请求参数类型。
  9650. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  9651. */
  9652. }, {
  9653. key: "addJob",
  9654. value: function addJob(url, params, paramType, seconds) {
  9655. var me = this,
  9656. parameterObject = null;
  9657. if (params && params instanceof paramType) {
  9658. parameterObject = new Object();
  9659. paramType.toObject(params, parameterObject);
  9660. }
  9661. var headers = Object.assign({
  9662. 'Content-Type': 'application/x-www-form-urlencoded'
  9663. }, me.headers || {});
  9664. var options = {
  9665. proxy: me.proxy,
  9666. headers: headers,
  9667. withCredentials: me.withCredentials,
  9668. crossOrigin: me.crossOrigin,
  9669. isInTheSameDomain: me.isInTheSameDomain
  9670. };
  9671. FetchRequest.post(me._processUrl(url), JSON.stringify(parameterObject), options).then(function (response) {
  9672. return response.json();
  9673. }).then(function (result) {
  9674. if (result.succeed) {
  9675. me.serviceProcessCompleted(result, seconds);
  9676. } else {
  9677. me.serviceProcessFailed(result);
  9678. }
  9679. })["catch"](function (e) {
  9680. me.serviceProcessFailed({
  9681. error: e
  9682. });
  9683. });
  9684. }
  9685. }, {
  9686. key: "serviceProcessCompleted",
  9687. value: function serviceProcessCompleted(result, seconds) {
  9688. result = Util.transformResult(result);
  9689. seconds = seconds || 1000;
  9690. var me = this;
  9691. if (result) {
  9692. var id = setInterval(function () {
  9693. FetchRequest.get(me._processUrl(result.newResourceLocation), {
  9694. _t: new Date().getTime()
  9695. }).then(function (response) {
  9696. return response.json();
  9697. }).then(function (job) {
  9698. me.events.triggerEvent("processRunning", {
  9699. id: job.id,
  9700. state: job.state
  9701. });
  9702. if (job.state.runState === 'LOST' || job.state.runState === 'KILLED' || job.state.runState === 'FAILED') {
  9703. clearInterval(id);
  9704. me.events.triggerEvent("processFailed", {
  9705. error: job.state.errorMsg,
  9706. state: job.state.runState
  9707. });
  9708. }
  9709. if (job.state.runState === 'FINISHED' && job.setting.serviceInfo) {
  9710. clearInterval(id);
  9711. me.events.triggerEvent("processCompleted", {
  9712. result: job
  9713. });
  9714. }
  9715. })["catch"](function (e) {
  9716. clearInterval(id);
  9717. me.events.triggerEvent("processFailed", {
  9718. error: e
  9719. });
  9720. });
  9721. }, seconds);
  9722. }
  9723. }
  9724. }, {
  9725. key: "serviceProcessFailed",
  9726. value: function serviceProcessFailed(result) {
  9727. ProcessingServiceBase_get(ProcessingServiceBase_getPrototypeOf(ProcessingServiceBase.prototype), "serviceProcessFailed", this).call(this, result);
  9728. }
  9729. }, {
  9730. key: "_processUrl",
  9731. value: function _processUrl(url) {
  9732. if (SecurityManager_SecurityManager.getToken(url)) {
  9733. url = Util.urlAppend(url, 'token=' + SecurityManager_SecurityManager.getToken(url));
  9734. }
  9735. return url;
  9736. }
  9737. }]);
  9738. return ProcessingServiceBase;
  9739. }(CommonServiceBase_CommonServiceBase);
  9740. SuperMap.ProcessingServiceBase = ProcessingServiceBase_ProcessingServiceBase;
  9741. // CONCATENATED MODULE: ./src/common/iServer/KernelDensityJobsService.js
  9742. function KernelDensityJobsService_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { KernelDensityJobsService_typeof = function _typeof(obj) { return typeof obj; }; } else { KernelDensityJobsService_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return KernelDensityJobsService_typeof(obj); }
  9743. function KernelDensityJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9744. function KernelDensityJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9745. function KernelDensityJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) KernelDensityJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) KernelDensityJobsService_defineProperties(Constructor, staticProps); return Constructor; }
  9746. function KernelDensityJobsService_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { KernelDensityJobsService_get = Reflect.get; } else { KernelDensityJobsService_get = function _get(target, property, receiver) { var base = KernelDensityJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return KernelDensityJobsService_get(target, property, receiver || target); }
  9747. function KernelDensityJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = KernelDensityJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  9748. function KernelDensityJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) KernelDensityJobsService_setPrototypeOf(subClass, superClass); }
  9749. function KernelDensityJobsService_setPrototypeOf(o, p) { KernelDensityJobsService_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return KernelDensityJobsService_setPrototypeOf(o, p); }
  9750. function KernelDensityJobsService_createSuper(Derived) { var hasNativeReflectConstruct = KernelDensityJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = KernelDensityJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = KernelDensityJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return KernelDensityJobsService_possibleConstructorReturn(this, result); }; }
  9751. function KernelDensityJobsService_possibleConstructorReturn(self, call) { if (call && (KernelDensityJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } return KernelDensityJobsService_assertThisInitialized(self); }
  9752. function KernelDensityJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  9753. function KernelDensityJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  9754. function KernelDensityJobsService_getPrototypeOf(o) { KernelDensityJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return KernelDensityJobsService_getPrototypeOf(o); }
  9755. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  9756. * This program are made available under the terms of the Apache License, Version 2.0
  9757. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9758. /**
  9759. * @class SuperMap.KernelDensityJobsService
  9760. * @category iServer ProcessingService DensityAnalyst
  9761. * @classdesc 核密度分析服务类
  9762. * @extends {SuperMap.ProcessingServiceBase}
  9763. * @param {string} url -核密度分析服务地址。
  9764. * @param {Object} options - 交互服务时所需可选参数。
  9765. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  9766. * @param {Object} [options.headers] - 请求头。
  9767. */
  9768. var KernelDensityJobsService_KernelDensityJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  9769. KernelDensityJobsService_inherits(KernelDensityJobsService, _ProcessingServiceBas);
  9770. var _super = KernelDensityJobsService_createSuper(KernelDensityJobsService);
  9771. function KernelDensityJobsService(url, options) {
  9772. var _this;
  9773. KernelDensityJobsService_classCallCheck(this, KernelDensityJobsService);
  9774. _this = _super.call(this, url, options);
  9775. _this.url = Util.urlPathAppend(_this.url, 'spatialanalyst/density');
  9776. _this.CLASS_NAME = "SuperMap.KernelDensityJobsService";
  9777. return _this;
  9778. }
  9779. /**
  9780. * @function SuperMap.KernelDensityJobsService.prototype.destroy
  9781. * @override
  9782. */
  9783. KernelDensityJobsService_createClass(KernelDensityJobsService, [{
  9784. key: "destroy",
  9785. value: function destroy() {
  9786. KernelDensityJobsService_get(KernelDensityJobsService_getPrototypeOf(KernelDensityJobsService.prototype), "destroy", this).call(this);
  9787. }
  9788. /**
  9789. * @function SuperMap.KernelDensityJobsService.prototype.getKernelDensityJobs
  9790. * @description 获取核密度分析任务
  9791. */
  9792. }, {
  9793. key: "getKernelDensityJobs",
  9794. value: function getKernelDensityJobs() {
  9795. KernelDensityJobsService_get(KernelDensityJobsService_getPrototypeOf(KernelDensityJobsService.prototype), "getJobs", this).call(this, this.url);
  9796. }
  9797. /**
  9798. * @function SuperMap.KernelDensityJobsService.prototype.getKernelDensityJobs
  9799. * @description 获取指定id的核密度分析服务
  9800. * @param {string} id - 指定要获取数据的id
  9801. */
  9802. }, {
  9803. key: "getKernelDensityJob",
  9804. value: function getKernelDensityJob(id) {
  9805. KernelDensityJobsService_get(KernelDensityJobsService_getPrototypeOf(KernelDensityJobsService.prototype), "getJobs", this).call(this, Util.urlPathAppend(this.url, id));
  9806. }
  9807. /**
  9808. * @function SuperMap.KernelDensityJobsService.prototype.addKernelDensityJob
  9809. * @description 新建核密度分析服务
  9810. * @param {SuperMap.KernelDensityJobParameter} params - 创建一个空间分析的请求参数。
  9811. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  9812. */
  9813. }, {
  9814. key: "addKernelDensityJob",
  9815. value: function addKernelDensityJob(params, seconds) {
  9816. KernelDensityJobsService_get(KernelDensityJobsService_getPrototypeOf(KernelDensityJobsService.prototype), "addJob", this).call(this, this.url, params, KernelDensityJobParameter_KernelDensityJobParameter, seconds);
  9817. }
  9818. }]);
  9819. return KernelDensityJobsService;
  9820. }(ProcessingServiceBase_ProcessingServiceBase);
  9821. SuperMap.KernelDensityJobsService = KernelDensityJobsService_KernelDensityJobsService;
  9822. // CONCATENATED MODULE: ./src/common/iServer/SingleObjectQueryJobsService.js
  9823. function SingleObjectQueryJobsService_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { SingleObjectQueryJobsService_typeof = function _typeof(obj) { return typeof obj; }; } else { SingleObjectQueryJobsService_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return SingleObjectQueryJobsService_typeof(obj); }
  9824. function SingleObjectQueryJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9825. function SingleObjectQueryJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9826. function SingleObjectQueryJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) SingleObjectQueryJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) SingleObjectQueryJobsService_defineProperties(Constructor, staticProps); return Constructor; }
  9827. function SingleObjectQueryJobsService_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { SingleObjectQueryJobsService_get = Reflect.get; } else { SingleObjectQueryJobsService_get = function _get(target, property, receiver) { var base = SingleObjectQueryJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return SingleObjectQueryJobsService_get(target, property, receiver || target); }
  9828. function SingleObjectQueryJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = SingleObjectQueryJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  9829. function SingleObjectQueryJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) SingleObjectQueryJobsService_setPrototypeOf(subClass, superClass); }
  9830. function SingleObjectQueryJobsService_setPrototypeOf(o, p) { SingleObjectQueryJobsService_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return SingleObjectQueryJobsService_setPrototypeOf(o, p); }
  9831. function SingleObjectQueryJobsService_createSuper(Derived) { var hasNativeReflectConstruct = SingleObjectQueryJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = SingleObjectQueryJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = SingleObjectQueryJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return SingleObjectQueryJobsService_possibleConstructorReturn(this, result); }; }
  9832. function SingleObjectQueryJobsService_possibleConstructorReturn(self, call) { if (call && (SingleObjectQueryJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } return SingleObjectQueryJobsService_assertThisInitialized(self); }
  9833. function SingleObjectQueryJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  9834. function SingleObjectQueryJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  9835. function SingleObjectQueryJobsService_getPrototypeOf(o) { SingleObjectQueryJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return SingleObjectQueryJobsService_getPrototypeOf(o); }
  9836. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  9837. * This program are made available under the terms of the Apache License, Version 2.0
  9838. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9839. /**
  9840. * @class SuperMap.SingleObjectQueryJobsService
  9841. * @category iServer ProcessingService Query
  9842. * @classdesc 单对象查询分析服务类
  9843. * @extends {SuperMap.ProcessingServiceBase}
  9844. * @param {string} url - 单对象空间查询分析服务地址。
  9845. * @param {Object} options - 参数。
  9846. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  9847. * @param {Object} [options.headers] - 请求头。
  9848. */
  9849. var SingleObjectQueryJobsService_SingleObjectQueryJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  9850. SingleObjectQueryJobsService_inherits(SingleObjectQueryJobsService, _ProcessingServiceBas);
  9851. var _super = SingleObjectQueryJobsService_createSuper(SingleObjectQueryJobsService);
  9852. function SingleObjectQueryJobsService(url, options) {
  9853. var _this;
  9854. SingleObjectQueryJobsService_classCallCheck(this, SingleObjectQueryJobsService);
  9855. _this = _super.call(this, url, options);
  9856. _this.url = Util.urlPathAppend(_this.url, 'spatialanalyst/query');
  9857. _this.CLASS_NAME = 'SuperMap.SingleObjectQueryJobsService';
  9858. return _this;
  9859. }
  9860. /**
  9861. *@override
  9862. */
  9863. SingleObjectQueryJobsService_createClass(SingleObjectQueryJobsService, [{
  9864. key: "destroy",
  9865. value: function destroy() {
  9866. SingleObjectQueryJobsService_get(SingleObjectQueryJobsService_getPrototypeOf(SingleObjectQueryJobsService.prototype), "destroy", this).call(this);
  9867. }
  9868. /**
  9869. * @function SuperMap.SingleObjectQueryJobsService.protitype.getQueryJobs
  9870. * @description 获取单对象空间查询分析所有任务
  9871. */
  9872. }, {
  9873. key: "getQueryJobs",
  9874. value: function getQueryJobs() {
  9875. SingleObjectQueryJobsService_get(SingleObjectQueryJobsService_getPrototypeOf(SingleObjectQueryJobsService.prototype), "getJobs", this).call(this, this.url);
  9876. }
  9877. /**
  9878. * @function SuperMap.KernelDensityJobsService.protitype.getQueryJob
  9879. * @description 获取指定id的单对象空间查询分析服务
  9880. * @param {string} id - 指定要获取数据的id
  9881. */
  9882. }, {
  9883. key: "getQueryJob",
  9884. value: function getQueryJob(id) {
  9885. SingleObjectQueryJobsService_get(SingleObjectQueryJobsService_getPrototypeOf(SingleObjectQueryJobsService.prototype), "getJobs", this).call(this, Util.urlPathAppend(this.url, id));
  9886. }
  9887. /**
  9888. * @function SuperMap.SingleObjectQueryJobsService.protitype.addQueryJob
  9889. * @description 新建单对象空间查询分析服务
  9890. * @param {SuperMap.SingleObjectQueryJobsParameter} params - 创建一个空间分析的请求参数。
  9891. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  9892. */
  9893. }, {
  9894. key: "addQueryJob",
  9895. value: function addQueryJob(params, seconds) {
  9896. SingleObjectQueryJobsService_get(SingleObjectQueryJobsService_getPrototypeOf(SingleObjectQueryJobsService.prototype), "addJob", this).call(this, this.url, params, SingleObjectQueryJobsParameter_SingleObjectQueryJobsParameter, seconds);
  9897. }
  9898. }]);
  9899. return SingleObjectQueryJobsService;
  9900. }(ProcessingServiceBase_ProcessingServiceBase);
  9901. SuperMap.SingleObjectQueryJobsService = SingleObjectQueryJobsService_SingleObjectQueryJobsService;
  9902. // CONCATENATED MODULE: ./src/common/iServer/SummaryMeshJobsService.js
  9903. function SummaryMeshJobsService_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { SummaryMeshJobsService_typeof = function _typeof(obj) { return typeof obj; }; } else { SummaryMeshJobsService_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return SummaryMeshJobsService_typeof(obj); }
  9904. function SummaryMeshJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9905. function SummaryMeshJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9906. function SummaryMeshJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) SummaryMeshJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) SummaryMeshJobsService_defineProperties(Constructor, staticProps); return Constructor; }
  9907. function SummaryMeshJobsService_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { SummaryMeshJobsService_get = Reflect.get; } else { SummaryMeshJobsService_get = function _get(target, property, receiver) { var base = SummaryMeshJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return SummaryMeshJobsService_get(target, property, receiver || target); }
  9908. function SummaryMeshJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = SummaryMeshJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  9909. function SummaryMeshJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) SummaryMeshJobsService_setPrototypeOf(subClass, superClass); }
  9910. function SummaryMeshJobsService_setPrototypeOf(o, p) { SummaryMeshJobsService_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return SummaryMeshJobsService_setPrototypeOf(o, p); }
  9911. function SummaryMeshJobsService_createSuper(Derived) { var hasNativeReflectConstruct = SummaryMeshJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = SummaryMeshJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = SummaryMeshJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return SummaryMeshJobsService_possibleConstructorReturn(this, result); }; }
  9912. function SummaryMeshJobsService_possibleConstructorReturn(self, call) { if (call && (SummaryMeshJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } return SummaryMeshJobsService_assertThisInitialized(self); }
  9913. function SummaryMeshJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  9914. function SummaryMeshJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  9915. function SummaryMeshJobsService_getPrototypeOf(o) { SummaryMeshJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return SummaryMeshJobsService_getPrototypeOf(o); }
  9916. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  9917. * This program are made available under the terms of the Apache License, Version 2.0
  9918. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  9919. /**
  9920. * @class SuperMap.SummaryMeshJobsService
  9921. * @category iServer ProcessingService AggregatePoints
  9922. * @classdesc 点聚合分析任务类。
  9923. * @param {string} url -点聚合分析任务地址。
  9924. * @param {Object} options - 参数。
  9925. * @param {SuperMap.Events} options.events - 处理所有事件的对象。<br>
  9926. * @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务器类型,ISERVER|IPORTAL|ONLINE。
  9927. * @param {Object} [options.eventListeners] - 事件监听器对象。有 processCompleted 属性可传入处理完成后的回调函数。processFailed 属性传入处理失败后的回调函数。
  9928. * @param {number} options.index - 服务访问地址在数组中的位置。<br>
  9929. * @param {number} options.length - 服务访问地址数组长度。
  9930. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  9931. * @param {Object} [options.headers] - 请求头。
  9932. */
  9933. var SummaryMeshJobsService_SummaryMeshJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  9934. SummaryMeshJobsService_inherits(SummaryMeshJobsService, _ProcessingServiceBas);
  9935. var _super = SummaryMeshJobsService_createSuper(SummaryMeshJobsService);
  9936. function SummaryMeshJobsService(url, options) {
  9937. var _this;
  9938. SummaryMeshJobsService_classCallCheck(this, SummaryMeshJobsService);
  9939. _this = _super.call(this, url, options);
  9940. _this.url = Util.urlPathAppend(_this.url, 'spatialanalyst/aggregatepoints');
  9941. _this.CLASS_NAME = 'SuperMap.SummaryMeshJobsService';
  9942. return _this;
  9943. }
  9944. /**
  9945. * @override
  9946. */
  9947. SummaryMeshJobsService_createClass(SummaryMeshJobsService, [{
  9948. key: "destroy",
  9949. value: function destroy() {
  9950. SummaryMeshJobsService_get(SummaryMeshJobsService_getPrototypeOf(SummaryMeshJobsService.prototype), "destroy", this).call(this);
  9951. }
  9952. /**
  9953. * @function SuperMap.SummaryMeshJobsService.prototype.getSummaryMeshJobs
  9954. * @description 获取点聚合分析任务
  9955. */
  9956. }, {
  9957. key: "getSummaryMeshJobs",
  9958. value: function getSummaryMeshJobs() {
  9959. SummaryMeshJobsService_get(SummaryMeshJobsService_getPrototypeOf(SummaryMeshJobsService.prototype), "getJobs", this).call(this, this.url);
  9960. }
  9961. /**
  9962. * @function SuperMap.SummaryMeshJobsService.prototype.getSummaryMeshJob
  9963. * @description 获取指定ip的点聚合分析任务
  9964. * @param {string} id - 指定要获取数据的id
  9965. */
  9966. }, {
  9967. key: "getSummaryMeshJob",
  9968. value: function getSummaryMeshJob(id) {
  9969. SummaryMeshJobsService_get(SummaryMeshJobsService_getPrototypeOf(SummaryMeshJobsService.prototype), "getJobs", this).call(this, Util.urlPathAppend(this.url, id));
  9970. }
  9971. /**
  9972. * @function SuperMap.SummaryMeshJobsService.prototype.addSummaryMeshJob
  9973. * @description 新建点聚合分析服务
  9974. * @param {SuperMap.SummaryMeshJobParameter} params - 创建一个空间分析的请求参数。
  9975. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  9976. */
  9977. }, {
  9978. key: "addSummaryMeshJob",
  9979. value: function addSummaryMeshJob(params, seconds) {
  9980. SummaryMeshJobsService_get(SummaryMeshJobsService_getPrototypeOf(SummaryMeshJobsService.prototype), "addJob", this).call(this, this.url, params, SummaryMeshJobParameter_SummaryMeshJobParameter, seconds);
  9981. }
  9982. }]);
  9983. return SummaryMeshJobsService;
  9984. }(ProcessingServiceBase_ProcessingServiceBase);
  9985. SuperMap.SummaryMeshJobsService = SummaryMeshJobsService_SummaryMeshJobsService;
  9986. // CONCATENATED MODULE: ./src/common/iServer/SummaryRegionJobsService.js
  9987. function SummaryRegionJobsService_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { SummaryRegionJobsService_typeof = function _typeof(obj) { return typeof obj; }; } else { SummaryRegionJobsService_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return SummaryRegionJobsService_typeof(obj); }
  9988. function SummaryRegionJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  9989. function SummaryRegionJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  9990. function SummaryRegionJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) SummaryRegionJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) SummaryRegionJobsService_defineProperties(Constructor, staticProps); return Constructor; }
  9991. function SummaryRegionJobsService_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { SummaryRegionJobsService_get = Reflect.get; } else { SummaryRegionJobsService_get = function _get(target, property, receiver) { var base = SummaryRegionJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return SummaryRegionJobsService_get(target, property, receiver || target); }
  9992. function SummaryRegionJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = SummaryRegionJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  9993. function SummaryRegionJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) SummaryRegionJobsService_setPrototypeOf(subClass, superClass); }
  9994. function SummaryRegionJobsService_setPrototypeOf(o, p) { SummaryRegionJobsService_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return SummaryRegionJobsService_setPrototypeOf(o, p); }
  9995. function SummaryRegionJobsService_createSuper(Derived) { var hasNativeReflectConstruct = SummaryRegionJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = SummaryRegionJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = SummaryRegionJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return SummaryRegionJobsService_possibleConstructorReturn(this, result); }; }
  9996. function SummaryRegionJobsService_possibleConstructorReturn(self, call) { if (call && (SummaryRegionJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } return SummaryRegionJobsService_assertThisInitialized(self); }
  9997. function SummaryRegionJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  9998. function SummaryRegionJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  9999. function SummaryRegionJobsService_getPrototypeOf(o) { SummaryRegionJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return SummaryRegionJobsService_getPrototypeOf(o); }
  10000. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  10001. * This program are made available under the terms of the Apache License, Version 2.0
  10002. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10003. /**
  10004. * @class SuperMap.SummaryRegionJobsService
  10005. * @category iServer ProcessingService SummaryRegion
  10006. * @classdesc 区域汇总分析服务类
  10007. * @extends {SuperMap.ProcessingServiceBase}
  10008. * @param {string} url - 区域汇总分析服务地址。
  10009. * @param {Object} options - 参数。
  10010. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  10011. * @param {Object} [options.headers] - 请求头。
  10012. */
  10013. var SummaryRegionJobsService_SummaryRegionJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  10014. SummaryRegionJobsService_inherits(SummaryRegionJobsService, _ProcessingServiceBas);
  10015. var _super = SummaryRegionJobsService_createSuper(SummaryRegionJobsService);
  10016. function SummaryRegionJobsService(url, options) {
  10017. var _this;
  10018. SummaryRegionJobsService_classCallCheck(this, SummaryRegionJobsService);
  10019. _this = _super.call(this, url, options);
  10020. _this.url = Util.urlPathAppend(_this.url, 'spatialanalyst/summaryregion');
  10021. _this.CLASS_NAME = 'SuperMap.SummaryRegionJobsService';
  10022. return _this;
  10023. }
  10024. /**
  10025. *@override
  10026. */
  10027. SummaryRegionJobsService_createClass(SummaryRegionJobsService, [{
  10028. key: "destroy",
  10029. value: function destroy() {
  10030. SummaryRegionJobsService_get(SummaryRegionJobsService_getPrototypeOf(SummaryRegionJobsService.prototype), "destroy", this).call(this);
  10031. }
  10032. /**
  10033. * @function SuperMap.SummaryRegionJobsService.prototype.getSummaryRegionJobs
  10034. * @description 获取区域汇总分析任务集合。
  10035. */
  10036. }, {
  10037. key: "getSummaryRegionJobs",
  10038. value: function getSummaryRegionJobs() {
  10039. SummaryRegionJobsService_get(SummaryRegionJobsService_getPrototypeOf(SummaryRegionJobsService.prototype), "getJobs", this).call(this, this.url);
  10040. }
  10041. /**
  10042. * @function SuperMap.SummaryRegionJobsService.prototype.getSummaryRegionJob
  10043. * @description 获取指定id的区域汇总分析任务。
  10044. * @param {string} id -要获取区域汇总分析任务的id
  10045. */
  10046. }, {
  10047. key: "getSummaryRegionJob",
  10048. value: function getSummaryRegionJob(id) {
  10049. SummaryRegionJobsService_get(SummaryRegionJobsService_getPrototypeOf(SummaryRegionJobsService.prototype), "getJobs", this).call(this, Util.urlPathAppend(this.url, id));
  10050. }
  10051. /**
  10052. * @function SuperMap.SummaryRegionJobsService.prototype.addSummaryRegionJob
  10053. * @description 新建区域汇总任务。
  10054. * @param {SuperMap.SummaryRegionJobParameter} params - 创建一个区域汇总任务的请求参数。
  10055. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  10056. */
  10057. }, {
  10058. key: "addSummaryRegionJob",
  10059. value: function addSummaryRegionJob(params, seconds) {
  10060. SummaryRegionJobsService_get(SummaryRegionJobsService_getPrototypeOf(SummaryRegionJobsService.prototype), "addJob", this).call(this, this.url, params, SummaryRegionJobParameter_SummaryRegionJobParameter, seconds);
  10061. }
  10062. }]);
  10063. return SummaryRegionJobsService;
  10064. }(ProcessingServiceBase_ProcessingServiceBase);
  10065. SuperMap.SummaryRegionJobsService = SummaryRegionJobsService_SummaryRegionJobsService;
  10066. // CONCATENATED MODULE: ./src/common/iServer/VectorClipJobsParameter.js
  10067. function VectorClipJobsParameter_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10068. function VectorClipJobsParameter_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  10069. function VectorClipJobsParameter_createClass(Constructor, protoProps, staticProps) { if (protoProps) VectorClipJobsParameter_defineProperties(Constructor.prototype, protoProps); if (staticProps) VectorClipJobsParameter_defineProperties(Constructor, staticProps); return Constructor; }
  10070. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  10071. * This program are made available under the terms of the Apache License, Version 2.0
  10072. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10073. /**
  10074. * @class SuperMap.VectorClipJobsParameter
  10075. * @category iServer ProcessingService VectorClip
  10076. * @classdesc 矢量裁剪分析任务参数类。
  10077. * @param {Object} options - 参数。
  10078. * @param {string} options.datasetName - 数据集名。
  10079. * @param {string} options.datasetOverlay - 裁剪对象数据集。
  10080. * @param {SuperMap.ClipAnalystMode} [options.mode=SuperMap.ClipAnalystMode.CLIP] - 裁剪分析模式。
  10081. * @param {SuperMap.OutputSetting} [options.output] - 输出参数设置。
  10082. * @param {SuperMap.MappingParameters} [options.mappingParameters] - 分析后结果可视化的参数类。
  10083. */
  10084. var VectorClipJobsParameter_VectorClipJobsParameter = /*#__PURE__*/function () {
  10085. function VectorClipJobsParameter(options) {
  10086. VectorClipJobsParameter_classCallCheck(this, VectorClipJobsParameter);
  10087. options = options || {};
  10088. /**
  10089. * @member {string} SuperMap.VectorClipJobsParameter.prototype.datasetName
  10090. * @description 数据集名。
  10091. */
  10092. this.datasetName = "";
  10093. /**
  10094. * @member {string} SuperMap.VectorClipJobsParameter.prototype.datasetOverlay
  10095. * @description 裁剪对象数据集。
  10096. */
  10097. this.datasetVectorClip = "";
  10098. /**
  10099. * @member {string} SuperMap.VectorClipJobsParameter.prototype.geometryClip
  10100. * @description 裁剪几何对象。
  10101. */
  10102. this.geometryClip = "";
  10103. /**
  10104. * @member {SuperMap.ClipAnalystMode} [SuperMap.VectorClipJobsParameter.prototype.mode=ClipAnalystMode.CLIP]
  10105. * @description 裁剪分析模式 。
  10106. */
  10107. this.mode = ClipAnalystMode.CLIP;
  10108. /**
  10109. * @member {SuperMap.OutputSetting} SuperMap.VectorClipJobsParameter.prototype.output
  10110. * @description 输出参数设置类。
  10111. */
  10112. this.output = null;
  10113. /**
  10114. * @member {SuperMap.MappingParameters} [SuperMap.VectorClipJobsParameter.prototype.mappingParameters]
  10115. * @description 分析后结果可视化的参数类。
  10116. */
  10117. this.mappingParameters = null;
  10118. Util.extend(this, options);
  10119. this.CLASS_NAME = "SuperMap.VectorClipJobsParameter";
  10120. }
  10121. /**
  10122. * @function SuperMap.VectorClipJobsParameter.prototype.destroy
  10123. * @description 释放资源,将引用资源的属性置空。
  10124. */
  10125. VectorClipJobsParameter_createClass(VectorClipJobsParameter, [{
  10126. key: "destroy",
  10127. value: function destroy() {
  10128. this.datasetName = null;
  10129. this.datasetVectorClip = null;
  10130. this.geometryClip = null;
  10131. this.mode = null;
  10132. if (this.output instanceof OutputSetting_OutputSetting) {
  10133. this.output.destroy();
  10134. this.output = null;
  10135. }
  10136. if (this.mappingParameters instanceof MappingParameters_MappingParameters) {
  10137. this.mappingParameters.destroy();
  10138. this.mappingParameters = null;
  10139. }
  10140. }
  10141. /**
  10142. * @function SuperMap.VectorClipJobsParameter.toObject
  10143. * @param {Object} vectorClipJobsParameter - 区域汇总分析服务参数。
  10144. * @param {Object} tempObj - 目标对象。
  10145. * @description 矢量裁剪分析任务对象。
  10146. */
  10147. }], [{
  10148. key: "toObject",
  10149. value: function toObject(vectorClipJobsParameter, tempObj) {
  10150. for (var name in vectorClipJobsParameter) {
  10151. if (name === "datasetName") {
  10152. tempObj['input'] = tempObj['input'] || {};
  10153. tempObj['input'][name] = vectorClipJobsParameter[name];
  10154. continue;
  10155. }
  10156. if (name === "output") {
  10157. tempObj['output'] = tempObj['output'] || {};
  10158. tempObj['output'] = vectorClipJobsParameter[name];
  10159. continue;
  10160. }
  10161. tempObj['analyst'] = tempObj['analyst'] || {};
  10162. tempObj['analyst'][name] = vectorClipJobsParameter[name];
  10163. if (name === 'mappingParameters') {
  10164. tempObj['analyst'][name] = tempObj['analyst'][name] || {};
  10165. tempObj['analyst']['mappingParameters'] = vectorClipJobsParameter[name];
  10166. }
  10167. }
  10168. }
  10169. }]);
  10170. return VectorClipJobsParameter;
  10171. }();
  10172. SuperMap.VectorClipJobsParameter = VectorClipJobsParameter_VectorClipJobsParameter;
  10173. // CONCATENATED MODULE: ./src/common/iServer/VectorClipJobsService.js
  10174. function VectorClipJobsService_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { VectorClipJobsService_typeof = function _typeof(obj) { return typeof obj; }; } else { VectorClipJobsService_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return VectorClipJobsService_typeof(obj); }
  10175. function VectorClipJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10176. function VectorClipJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  10177. function VectorClipJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) VectorClipJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) VectorClipJobsService_defineProperties(Constructor, staticProps); return Constructor; }
  10178. function VectorClipJobsService_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { VectorClipJobsService_get = Reflect.get; } else { VectorClipJobsService_get = function _get(target, property, receiver) { var base = VectorClipJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return VectorClipJobsService_get(target, property, receiver || target); }
  10179. function VectorClipJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = VectorClipJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  10180. function VectorClipJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) VectorClipJobsService_setPrototypeOf(subClass, superClass); }
  10181. function VectorClipJobsService_setPrototypeOf(o, p) { VectorClipJobsService_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return VectorClipJobsService_setPrototypeOf(o, p); }
  10182. function VectorClipJobsService_createSuper(Derived) { var hasNativeReflectConstruct = VectorClipJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = VectorClipJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = VectorClipJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return VectorClipJobsService_possibleConstructorReturn(this, result); }; }
  10183. function VectorClipJobsService_possibleConstructorReturn(self, call) { if (call && (VectorClipJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } return VectorClipJobsService_assertThisInitialized(self); }
  10184. function VectorClipJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  10185. function VectorClipJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  10186. function VectorClipJobsService_getPrototypeOf(o) { VectorClipJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return VectorClipJobsService_getPrototypeOf(o); }
  10187. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  10188. * This program are made available under the terms of the Apache License, Version 2.0
  10189. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10190. /**
  10191. * @class SuperMap.VectorClipJobsService
  10192. * @category iServer ProcessingService VectorClip
  10193. * @classdesc 矢量裁剪分析服务类
  10194. * @extends {SuperMap.ProcessingServiceBase}
  10195. * @param {string} url -矢量裁剪分析服务地址。
  10196. * @param {Object} options - 交互服务时所需可选参数。
  10197. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  10198. * @param {Object} [options.headers] - 请求头。
  10199. */
  10200. var VectorClipJobsService_VectorClipJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  10201. VectorClipJobsService_inherits(VectorClipJobsService, _ProcessingServiceBas);
  10202. var _super = VectorClipJobsService_createSuper(VectorClipJobsService);
  10203. function VectorClipJobsService(url, options) {
  10204. var _this;
  10205. VectorClipJobsService_classCallCheck(this, VectorClipJobsService);
  10206. _this = _super.call(this, url, options);
  10207. _this.url = Util.urlPathAppend(_this.url, 'spatialanalyst/vectorclip');
  10208. _this.CLASS_NAME = 'SuperMap.VectorClipJobsService';
  10209. return _this;
  10210. }
  10211. /**
  10212. *@override
  10213. */
  10214. VectorClipJobsService_createClass(VectorClipJobsService, [{
  10215. key: "destroy",
  10216. value: function destroy() {
  10217. VectorClipJobsService_get(VectorClipJobsService_getPrototypeOf(VectorClipJobsService.prototype), "destroy", this).call(this);
  10218. }
  10219. /**
  10220. * @function SuperMap.VectorClipJobsService.protitype.getVectorClipJobs
  10221. * @description 获取矢量裁剪分析所有任务
  10222. */
  10223. }, {
  10224. key: "getVectorClipJobs",
  10225. value: function getVectorClipJobs() {
  10226. VectorClipJobsService_get(VectorClipJobsService_getPrototypeOf(VectorClipJobsService.prototype), "getJobs", this).call(this, this.url);
  10227. }
  10228. /**
  10229. * @function SuperMap.KernelDensityJobsService.protitype.getVectorClipJob
  10230. * @description 获取指定id的矢量裁剪分析服务
  10231. * @param {string} id - 指定要获取数据的id
  10232. */
  10233. }, {
  10234. key: "getVectorClipJob",
  10235. value: function getVectorClipJob(id) {
  10236. VectorClipJobsService_get(VectorClipJobsService_getPrototypeOf(VectorClipJobsService.prototype), "getJobs", this).call(this, Util.urlPathAppend(this.url, id));
  10237. }
  10238. /**
  10239. * @function SuperMap.VectorClipJobsService.protitype.addVectorClipJob
  10240. * @description 新建矢量裁剪分析服务
  10241. * @param {SuperMap.VectorClipJobsParameter} params - 创建一个空间分析的请求参数。
  10242. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  10243. */
  10244. }, {
  10245. key: "addVectorClipJob",
  10246. value: function addVectorClipJob(params, seconds) {
  10247. VectorClipJobsService_get(VectorClipJobsService_getPrototypeOf(VectorClipJobsService.prototype), "addJob", this).call(this, this.url, params, VectorClipJobsParameter_VectorClipJobsParameter, seconds);
  10248. }
  10249. }]);
  10250. return VectorClipJobsService;
  10251. }(ProcessingServiceBase_ProcessingServiceBase);
  10252. SuperMap.VectorClipJobsService = VectorClipJobsService_VectorClipJobsService;
  10253. // CONCATENATED MODULE: ./src/common/iServer/OverlayGeoJobsService.js
  10254. function OverlayGeoJobsService_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { OverlayGeoJobsService_typeof = function _typeof(obj) { return typeof obj; }; } else { OverlayGeoJobsService_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return OverlayGeoJobsService_typeof(obj); }
  10255. function OverlayGeoJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10256. function OverlayGeoJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  10257. function OverlayGeoJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) OverlayGeoJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) OverlayGeoJobsService_defineProperties(Constructor, staticProps); return Constructor; }
  10258. function OverlayGeoJobsService_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { OverlayGeoJobsService_get = Reflect.get; } else { OverlayGeoJobsService_get = function _get(target, property, receiver) { var base = OverlayGeoJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return OverlayGeoJobsService_get(target, property, receiver || target); }
  10259. function OverlayGeoJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = OverlayGeoJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  10260. function OverlayGeoJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) OverlayGeoJobsService_setPrototypeOf(subClass, superClass); }
  10261. function OverlayGeoJobsService_setPrototypeOf(o, p) { OverlayGeoJobsService_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return OverlayGeoJobsService_setPrototypeOf(o, p); }
  10262. function OverlayGeoJobsService_createSuper(Derived) { var hasNativeReflectConstruct = OverlayGeoJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = OverlayGeoJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = OverlayGeoJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return OverlayGeoJobsService_possibleConstructorReturn(this, result); }; }
  10263. function OverlayGeoJobsService_possibleConstructorReturn(self, call) { if (call && (OverlayGeoJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } return OverlayGeoJobsService_assertThisInitialized(self); }
  10264. function OverlayGeoJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  10265. function OverlayGeoJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  10266. function OverlayGeoJobsService_getPrototypeOf(o) { OverlayGeoJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return OverlayGeoJobsService_getPrototypeOf(o); }
  10267. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  10268. * This program are made available under the terms of the Apache License, Version 2.0
  10269. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10270. /**
  10271. * @class SuperMap.OverlayGeoJobsService
  10272. * @category iServer ProcessingService OverlayAnalyst
  10273. * @classdesc 叠加分析任务类。
  10274. * @param {string} url - 叠加分析任务地址。
  10275. * @param {Object} options - 参数。
  10276. * @param {SuperMap.Events} options.events - 处理所有事件的对象。
  10277. * @param {SuperMap.ServerType} [options.serverType=SuperMap.ServerType.ISERVER] - 服务器类型,ISERVER|IPORTAL|ONLINE。
  10278. * @param {Object} [options.eventListeners] - 事件监听器对象。有 processCompleted 属性可传入处理完成后的回调函数。processFailed 属性传入处理失败后的回调函数。
  10279. * @param {number} options.index - 服务访问地址在数组中的位置。
  10280. * @param {number} options.length - 服务访问地址数组长度。
  10281. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  10282. * @param {Object} [options.headers] - 请求头。
  10283. */
  10284. var OverlayGeoJobsService_OverlayGeoJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  10285. OverlayGeoJobsService_inherits(OverlayGeoJobsService, _ProcessingServiceBas);
  10286. var _super = OverlayGeoJobsService_createSuper(OverlayGeoJobsService);
  10287. function OverlayGeoJobsService(url, options) {
  10288. var _this;
  10289. OverlayGeoJobsService_classCallCheck(this, OverlayGeoJobsService);
  10290. _this = _super.call(this, url, options);
  10291. _this.url = Util.urlPathAppend(_this.url, 'spatialanalyst/overlay');
  10292. _this.CLASS_NAME = 'SuperMap.OverlayGeoJobsService';
  10293. return _this;
  10294. }
  10295. /**
  10296. * @override
  10297. */
  10298. OverlayGeoJobsService_createClass(OverlayGeoJobsService, [{
  10299. key: "destroy",
  10300. value: function destroy() {
  10301. OverlayGeoJobsService_get(OverlayGeoJobsService_getPrototypeOf(OverlayGeoJobsService.prototype), "destroy", this).call(this);
  10302. }
  10303. /**
  10304. * @function SuperMap.OverlayGeoJobsService.prototype.getOverlayGeoJobs
  10305. * @description 获取叠加分析任务
  10306. */
  10307. }, {
  10308. key: "getOverlayGeoJobs",
  10309. value: function getOverlayGeoJobs() {
  10310. OverlayGeoJobsService_get(OverlayGeoJobsService_getPrototypeOf(OverlayGeoJobsService.prototype), "getJobs", this).call(this, this.url);
  10311. }
  10312. /**
  10313. * @function SuperMap.OverlayGeoJobsService.prototype.getOverlayGeoJob
  10314. * @description 获取指定id的叠加分析任务
  10315. * @param {string} id - 指定要获取数据的id
  10316. */
  10317. }, {
  10318. key: "getOverlayGeoJob",
  10319. value: function getOverlayGeoJob(id) {
  10320. OverlayGeoJobsService_get(OverlayGeoJobsService_getPrototypeOf(OverlayGeoJobsService.prototype), "getJobs", this).call(this, Util.urlPathAppend(this.url, id));
  10321. }
  10322. /**
  10323. * @function SuperMap.OverlayGeoJobsService.prototype.addOverlayGeoJob
  10324. * @description 新建点叠加析服务
  10325. * @param {SuperMap.OverlayGeoJobParameter} params - 创建一个叠加分析的请求参数。
  10326. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  10327. */
  10328. }, {
  10329. key: "addOverlayGeoJob",
  10330. value: function addOverlayGeoJob(params, seconds) {
  10331. OverlayGeoJobsService_get(OverlayGeoJobsService_getPrototypeOf(OverlayGeoJobsService.prototype), "addJob", this).call(this, this.url, params, OverlayGeoJobParameter_OverlayGeoJobParameter, seconds);
  10332. }
  10333. }]);
  10334. return OverlayGeoJobsService;
  10335. }(ProcessingServiceBase_ProcessingServiceBase);
  10336. SuperMap.OverlayGeoJobsService = OverlayGeoJobsService_OverlayGeoJobsService;
  10337. // CONCATENATED MODULE: ./src/common/iServer/BuffersAnalystJobsService.js
  10338. function BuffersAnalystJobsService_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { BuffersAnalystJobsService_typeof = function _typeof(obj) { return typeof obj; }; } else { BuffersAnalystJobsService_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return BuffersAnalystJobsService_typeof(obj); }
  10339. function BuffersAnalystJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10340. function BuffersAnalystJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  10341. function BuffersAnalystJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) BuffersAnalystJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) BuffersAnalystJobsService_defineProperties(Constructor, staticProps); return Constructor; }
  10342. function BuffersAnalystJobsService_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { BuffersAnalystJobsService_get = Reflect.get; } else { BuffersAnalystJobsService_get = function _get(target, property, receiver) { var base = BuffersAnalystJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return BuffersAnalystJobsService_get(target, property, receiver || target); }
  10343. function BuffersAnalystJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = BuffersAnalystJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  10344. function BuffersAnalystJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) BuffersAnalystJobsService_setPrototypeOf(subClass, superClass); }
  10345. function BuffersAnalystJobsService_setPrototypeOf(o, p) { BuffersAnalystJobsService_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return BuffersAnalystJobsService_setPrototypeOf(o, p); }
  10346. function BuffersAnalystJobsService_createSuper(Derived) { var hasNativeReflectConstruct = BuffersAnalystJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = BuffersAnalystJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = BuffersAnalystJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return BuffersAnalystJobsService_possibleConstructorReturn(this, result); }; }
  10347. function BuffersAnalystJobsService_possibleConstructorReturn(self, call) { if (call && (BuffersAnalystJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } return BuffersAnalystJobsService_assertThisInitialized(self); }
  10348. function BuffersAnalystJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  10349. function BuffersAnalystJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  10350. function BuffersAnalystJobsService_getPrototypeOf(o) { BuffersAnalystJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return BuffersAnalystJobsService_getPrototypeOf(o); }
  10351. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  10352. * This program are made available under the terms of the Apache License, Version 2.0
  10353. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10354. /**
  10355. * @class SuperMap.BuffersAnalystJobsService
  10356. * @category iServer ProcessingService BufferAnalyst
  10357. * @classdesc 缓冲区分析服务类
  10358. * @extends {SuperMap.ProcessingServiceBase}
  10359. * @param {string} url - 服务地址。
  10360. * @param {Object} options - 参数。
  10361. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  10362. * @param {Object} [options.headers] - 请求头。
  10363. */
  10364. var BuffersAnalystJobsService_BuffersAnalystJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  10365. BuffersAnalystJobsService_inherits(BuffersAnalystJobsService, _ProcessingServiceBas);
  10366. var _super = BuffersAnalystJobsService_createSuper(BuffersAnalystJobsService);
  10367. function BuffersAnalystJobsService(url, options) {
  10368. var _this;
  10369. BuffersAnalystJobsService_classCallCheck(this, BuffersAnalystJobsService);
  10370. _this = _super.call(this, url, options);
  10371. _this.url = Util.urlPathAppend(_this.url, 'spatialanalyst/buffers');
  10372. _this.CLASS_NAME = 'SuperMap.BuffersAnalystJobsService';
  10373. return _this;
  10374. }
  10375. /**
  10376. *@override
  10377. */
  10378. BuffersAnalystJobsService_createClass(BuffersAnalystJobsService, [{
  10379. key: "destroy",
  10380. value: function destroy() {
  10381. BuffersAnalystJobsService_get(BuffersAnalystJobsService_getPrototypeOf(BuffersAnalystJobsService.prototype), "destroy", this).call(this);
  10382. }
  10383. /**
  10384. * @function SuperMap.BuffersAnalystJobsService.prototype.getBufferJobs
  10385. * @description 获取缓冲区分析所有任务
  10386. */
  10387. }, {
  10388. key: "getBuffersJobs",
  10389. value: function getBuffersJobs() {
  10390. BuffersAnalystJobsService_get(BuffersAnalystJobsService_getPrototypeOf(BuffersAnalystJobsService.prototype), "getJobs", this).call(this, this.url);
  10391. }
  10392. /**
  10393. * @function SuperMap.BuffersAnalystJobsService.prototype.getBufferJob
  10394. * @description 获取指定id的缓冲区分析服务
  10395. * @param {string} id - 指定要获取数据的id。
  10396. */
  10397. }, {
  10398. key: "getBuffersJob",
  10399. value: function getBuffersJob(id) {
  10400. BuffersAnalystJobsService_get(BuffersAnalystJobsService_getPrototypeOf(BuffersAnalystJobsService.prototype), "getJobs", this).call(this, Util.urlPathAppend(this.url, id));
  10401. }
  10402. /**
  10403. * @function SuperMap.BuffersAnalystJobsService.prototype.addBufferJob
  10404. * @description 新建缓冲区分析服务
  10405. * @param {SuperMap.BuffersAnalystJobsParameter} params - 创建一个空间分析的请求参数。
  10406. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  10407. */
  10408. }, {
  10409. key: "addBuffersJob",
  10410. value: function addBuffersJob(params, seconds) {
  10411. BuffersAnalystJobsService_get(BuffersAnalystJobsService_getPrototypeOf(BuffersAnalystJobsService.prototype), "addJob", this).call(this, this.url, params, BuffersAnalystJobsParameter_BuffersAnalystJobsParameter, seconds);
  10412. }
  10413. }]);
  10414. return BuffersAnalystJobsService;
  10415. }(ProcessingServiceBase_ProcessingServiceBase);
  10416. SuperMap.BuffersAnalystJobsService = BuffersAnalystJobsService_BuffersAnalystJobsService;
  10417. // CONCATENATED MODULE: ./src/common/iServer/TopologyValidatorJobsService.js
  10418. function TopologyValidatorJobsService_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { TopologyValidatorJobsService_typeof = function _typeof(obj) { return typeof obj; }; } else { TopologyValidatorJobsService_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return TopologyValidatorJobsService_typeof(obj); }
  10419. function TopologyValidatorJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10420. function TopologyValidatorJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  10421. function TopologyValidatorJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) TopologyValidatorJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) TopologyValidatorJobsService_defineProperties(Constructor, staticProps); return Constructor; }
  10422. function TopologyValidatorJobsService_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { TopologyValidatorJobsService_get = Reflect.get; } else { TopologyValidatorJobsService_get = function _get(target, property, receiver) { var base = TopologyValidatorJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return TopologyValidatorJobsService_get(target, property, receiver || target); }
  10423. function TopologyValidatorJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = TopologyValidatorJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  10424. function TopologyValidatorJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) TopologyValidatorJobsService_setPrototypeOf(subClass, superClass); }
  10425. function TopologyValidatorJobsService_setPrototypeOf(o, p) { TopologyValidatorJobsService_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return TopologyValidatorJobsService_setPrototypeOf(o, p); }
  10426. function TopologyValidatorJobsService_createSuper(Derived) { var hasNativeReflectConstruct = TopologyValidatorJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = TopologyValidatorJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = TopologyValidatorJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return TopologyValidatorJobsService_possibleConstructorReturn(this, result); }; }
  10427. function TopologyValidatorJobsService_possibleConstructorReturn(self, call) { if (call && (TopologyValidatorJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } return TopologyValidatorJobsService_assertThisInitialized(self); }
  10428. function TopologyValidatorJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  10429. function TopologyValidatorJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  10430. function TopologyValidatorJobsService_getPrototypeOf(o) { TopologyValidatorJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return TopologyValidatorJobsService_getPrototypeOf(o); }
  10431. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  10432. * This program are made available under the terms of the Apache License, Version 2.0
  10433. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10434. /**
  10435. * @class SuperMap.TopologyValidatorJobsService
  10436. * @category iServer ProcessingService TopologyValidator
  10437. * @classdesc 拓扑检查分析服务类
  10438. * @extends {SuperMap.ProcessingServiceBase}
  10439. * @param {string} url - 拓扑检查分析服务地址。
  10440. * @param {Object} options - 参数。
  10441. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  10442. * @param {Object} [options.headers] - 请求头。
  10443. */
  10444. var TopologyValidatorJobsService_TopologyValidatorJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  10445. TopologyValidatorJobsService_inherits(TopologyValidatorJobsService, _ProcessingServiceBas);
  10446. var _super = TopologyValidatorJobsService_createSuper(TopologyValidatorJobsService);
  10447. function TopologyValidatorJobsService(url, options) {
  10448. var _this;
  10449. TopologyValidatorJobsService_classCallCheck(this, TopologyValidatorJobsService);
  10450. _this = _super.call(this, url, options);
  10451. _this.url = Util.urlPathAppend(_this.url, 'spatialanalyst/topologyvalidator');
  10452. _this.CLASS_NAME = "SuperMap.TopologyValidatorJobsService";
  10453. return _this;
  10454. }
  10455. /**
  10456. *@override
  10457. */
  10458. TopologyValidatorJobsService_createClass(TopologyValidatorJobsService, [{
  10459. key: "destroy",
  10460. value: function destroy() {
  10461. TopologyValidatorJobsService_get(TopologyValidatorJobsService_getPrototypeOf(TopologyValidatorJobsService.prototype), "destroy", this).call(this);
  10462. }
  10463. /**
  10464. * @function SuperMap.TopologyValidatorJobsService.protitype.getTopologyValidatorJobs
  10465. * @description 获取拓扑检查分析所有任务
  10466. */
  10467. }, {
  10468. key: "getTopologyValidatorJobs",
  10469. value: function getTopologyValidatorJobs() {
  10470. TopologyValidatorJobsService_get(TopologyValidatorJobsService_getPrototypeOf(TopologyValidatorJobsService.prototype), "getJobs", this).call(this, this.url);
  10471. }
  10472. /**
  10473. * @function SuperMap.TopologyValidatorJobsService.protitype.getTopologyValidatorJob
  10474. * @description 获取指定id的拓扑检查分析服务
  10475. * @param {string} id - 指定要获取数据的id
  10476. */
  10477. }, {
  10478. key: "getTopologyValidatorJob",
  10479. value: function getTopologyValidatorJob(id) {
  10480. TopologyValidatorJobsService_get(TopologyValidatorJobsService_getPrototypeOf(TopologyValidatorJobsService.prototype), "getJobs", this).call(this, Util.urlPathAppend(this.url, id));
  10481. }
  10482. /**
  10483. * @function SuperMap.TopologyValidatorJobsService.protitype.addTopologyValidatorJob
  10484. * @description 新建拓扑检查分析服务
  10485. * @param {SuperMap.TopologyValidatorJobsParameter} params - 创建一个空间分析的请求参数。
  10486. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  10487. */
  10488. }, {
  10489. key: "addTopologyValidatorJob",
  10490. value: function addTopologyValidatorJob(params, seconds) {
  10491. TopologyValidatorJobsService_get(TopologyValidatorJobsService_getPrototypeOf(TopologyValidatorJobsService.prototype), "addJob", this).call(this, this.url, params, TopologyValidatorJobsParameter_TopologyValidatorJobsParameter, seconds);
  10492. }
  10493. }]);
  10494. return TopologyValidatorJobsService;
  10495. }(ProcessingServiceBase_ProcessingServiceBase);
  10496. SuperMap.TopologyValidatorJobsService = TopologyValidatorJobsService_TopologyValidatorJobsService;
  10497. // CONCATENATED MODULE: ./src/common/iServer/SummaryAttributesJobsService.js
  10498. function SummaryAttributesJobsService_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { SummaryAttributesJobsService_typeof = function _typeof(obj) { return typeof obj; }; } else { SummaryAttributesJobsService_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return SummaryAttributesJobsService_typeof(obj); }
  10499. function SummaryAttributesJobsService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10500. function SummaryAttributesJobsService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  10501. function SummaryAttributesJobsService_createClass(Constructor, protoProps, staticProps) { if (protoProps) SummaryAttributesJobsService_defineProperties(Constructor.prototype, protoProps); if (staticProps) SummaryAttributesJobsService_defineProperties(Constructor, staticProps); return Constructor; }
  10502. function SummaryAttributesJobsService_get(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { SummaryAttributesJobsService_get = Reflect.get; } else { SummaryAttributesJobsService_get = function _get(target, property, receiver) { var base = SummaryAttributesJobsService_superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return SummaryAttributesJobsService_get(target, property, receiver || target); }
  10503. function SummaryAttributesJobsService_superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = SummaryAttributesJobsService_getPrototypeOf(object); if (object === null) break; } return object; }
  10504. function SummaryAttributesJobsService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) SummaryAttributesJobsService_setPrototypeOf(subClass, superClass); }
  10505. function SummaryAttributesJobsService_setPrototypeOf(o, p) { SummaryAttributesJobsService_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return SummaryAttributesJobsService_setPrototypeOf(o, p); }
  10506. function SummaryAttributesJobsService_createSuper(Derived) { var hasNativeReflectConstruct = SummaryAttributesJobsService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = SummaryAttributesJobsService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = SummaryAttributesJobsService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return SummaryAttributesJobsService_possibleConstructorReturn(this, result); }; }
  10507. function SummaryAttributesJobsService_possibleConstructorReturn(self, call) { if (call && (SummaryAttributesJobsService_typeof(call) === "object" || typeof call === "function")) { return call; } return SummaryAttributesJobsService_assertThisInitialized(self); }
  10508. function SummaryAttributesJobsService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  10509. function SummaryAttributesJobsService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  10510. function SummaryAttributesJobsService_getPrototypeOf(o) { SummaryAttributesJobsService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return SummaryAttributesJobsService_getPrototypeOf(o); }
  10511. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  10512. * This program are made available under the terms of the Apache License, Version 2.0
  10513. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10514. /**
  10515. * @class SuperMap.SummaryAttributesJobsService
  10516. * @category iServer ProcessingService SummaryAttributes
  10517. * @classdesc 属性汇总分析服务类
  10518. * @extends {SuperMap.ProcessingServiceBase}
  10519. * @param {string} url - 汇总统计分析服务地址。
  10520. * @param {Object} options - 参数。
  10521. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  10522. * @param {Object} [options.headers] - 请求头。
  10523. */
  10524. var SummaryAttributesJobsService_SummaryAttributesJobsService = /*#__PURE__*/function (_ProcessingServiceBas) {
  10525. SummaryAttributesJobsService_inherits(SummaryAttributesJobsService, _ProcessingServiceBas);
  10526. var _super = SummaryAttributesJobsService_createSuper(SummaryAttributesJobsService);
  10527. function SummaryAttributesJobsService(url, options) {
  10528. var _this;
  10529. SummaryAttributesJobsService_classCallCheck(this, SummaryAttributesJobsService);
  10530. _this = _super.call(this, url, options);
  10531. _this.url = Util.urlPathAppend(_this.url, 'spatialanalyst/summaryattributes');
  10532. _this.CLASS_NAME = "SuperMap.SummaryAttributesJobsService";
  10533. return _this;
  10534. }
  10535. /**
  10536. *@override
  10537. */
  10538. SummaryAttributesJobsService_createClass(SummaryAttributesJobsService, [{
  10539. key: "destroy",
  10540. value: function destroy() {
  10541. SummaryAttributesJobsService_get(SummaryAttributesJobsService_getPrototypeOf(SummaryAttributesJobsService.prototype), "destroy", this).call(this);
  10542. }
  10543. /**
  10544. * @function SuperMap.SummaryAttributesJobsService.protitype.getSummaryAttributesJobs
  10545. * @description 获取属性汇总分析所有任务
  10546. */
  10547. }, {
  10548. key: "getSummaryAttributesJobs",
  10549. value: function getSummaryAttributesJobs() {
  10550. SummaryAttributesJobsService_get(SummaryAttributesJobsService_getPrototypeOf(SummaryAttributesJobsService.prototype), "getJobs", this).call(this, this.url);
  10551. }
  10552. /**
  10553. * @function SuperMap.SummaryAttributesJobsService.protitype.getSummaryAttributesJob
  10554. * @description 获取指定id的属性汇总分析服务
  10555. * @param {string} id - 指定要获取数据的id
  10556. */
  10557. }, {
  10558. key: "getSummaryAttributesJob",
  10559. value: function getSummaryAttributesJob(id) {
  10560. SummaryAttributesJobsService_get(SummaryAttributesJobsService_getPrototypeOf(SummaryAttributesJobsService.prototype), "getJobs", this).call(this, Util.urlPathAppend(this.url, id));
  10561. }
  10562. /**
  10563. * @function SuperMap.SummaryAttributesJobsService.protitype.addSummaryAttributesJob
  10564. * @description 新建属性汇总分析服务
  10565. * @param {SuperMap.SummaryAttributesJobsParameter} params - 创建一个空间分析的请求参数。
  10566. * @param {number} seconds - 开始创建后,获取创建成功结果的时间间隔。
  10567. */
  10568. }, {
  10569. key: "addSummaryAttributesJob",
  10570. value: function addSummaryAttributesJob(params, seconds) {
  10571. SummaryAttributesJobsService_get(SummaryAttributesJobsService_getPrototypeOf(SummaryAttributesJobsService.prototype), "addJob", this).call(this, this.url, params, SummaryAttributesJobsParameter_SummaryAttributesJobsParameter, seconds);
  10572. }
  10573. }]);
  10574. return SummaryAttributesJobsService;
  10575. }(ProcessingServiceBase_ProcessingServiceBase);
  10576. SuperMap.SummaryAttributesJobsService = SummaryAttributesJobsService_SummaryAttributesJobsService;
  10577. // CONCATENATED MODULE: ./src/classic/services/ProcessingService.js
  10578. function ProcessingService_typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { ProcessingService_typeof = function _typeof(obj) { return typeof obj; }; } else { ProcessingService_typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return ProcessingService_typeof(obj); }
  10579. function ProcessingService_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
  10580. function ProcessingService_defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
  10581. function ProcessingService_createClass(Constructor, protoProps, staticProps) { if (protoProps) ProcessingService_defineProperties(Constructor.prototype, protoProps); if (staticProps) ProcessingService_defineProperties(Constructor, staticProps); return Constructor; }
  10582. function ProcessingService_inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) ProcessingService_setPrototypeOf(subClass, superClass); }
  10583. function ProcessingService_setPrototypeOf(o, p) { ProcessingService_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return ProcessingService_setPrototypeOf(o, p); }
  10584. function ProcessingService_createSuper(Derived) { var hasNativeReflectConstruct = ProcessingService_isNativeReflectConstruct(); return function _createSuperInternal() { var Super = ProcessingService_getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = ProcessingService_getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return ProcessingService_possibleConstructorReturn(this, result); }; }
  10585. function ProcessingService_possibleConstructorReturn(self, call) { if (call && (ProcessingService_typeof(call) === "object" || typeof call === "function")) { return call; } return ProcessingService_assertThisInitialized(self); }
  10586. function ProcessingService_assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
  10587. function ProcessingService_isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } }
  10588. function ProcessingService_getPrototypeOf(o) { ProcessingService_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return ProcessingService_getPrototypeOf(o); }
  10589. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  10590. * This program are made available under the terms of the Apache License, Version 2.0
  10591. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  10592. /**
  10593. * @class SuperMap.REST.ProcessingService
  10594. * @category iServer ProcessingService
  10595. * @classdesc 分布式分析相关服务类。
  10596. * @augments SuperMap.CommonServiceBase
  10597. * @example
  10598. * 用法:
  10599. * new SuperMap.REST.ProcessingService(url,options)
  10600. * .getKernelDensityJobs(function(result){
  10601. * //doSomething
  10602. * })
  10603. * @param {string} url - 分布式分析服务地址。
  10604. * @param {Object} options - 可选参数。
  10605. * @param {boolean} [options.crossOrigin] - 是否允许跨域请求。
  10606. * @param {Object} [options.headers] - 请求头。
  10607. */
  10608. var ProcessingService_ProcessingService = /*#__PURE__*/function (_CommonServiceBase) {
  10609. ProcessingService_inherits(ProcessingService, _CommonServiceBase);
  10610. var _super = ProcessingService_createSuper(ProcessingService);
  10611. function ProcessingService(url, options) {
  10612. var _this;
  10613. ProcessingService_classCallCheck(this, ProcessingService);
  10614. _this = _super.call(this, url, options);
  10615. _this.kernelDensityJobs = {};
  10616. _this.summaryMeshJobs = {};
  10617. _this.queryJobs = {};
  10618. _this.summaryRegionJobs = {};
  10619. _this.vectorClipJobs = {};
  10620. _this.overlayGeoJobs = {};
  10621. _this.buffersJobs = {};
  10622. _this.topologyValidatorJobs = {};
  10623. _this.summaryAttributesJobs = {};
  10624. return _this;
  10625. }
  10626. /**
  10627. * @function SuperMap.REST.ProcessingService.prototype.getKernelDensityJobs
  10628. * @description 获取密度分析的列表。
  10629. * @param {function} callback - 请求结果的回调函数。
  10630. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  10631. */
  10632. ProcessingService_createClass(ProcessingService, [{
  10633. key: "getKernelDensityJobs",
  10634. value: function getKernelDensityJobs(callback, resultFormat) {
  10635. var me = this,
  10636. format = me._processFormat(resultFormat);
  10637. var kernelDensityJobsService = new KernelDensityJobsService_KernelDensityJobsService(me.url, {
  10638. headers: me.headers,
  10639. proxy: me.proxy,
  10640. withCredentials: me.withCredentials,
  10641. crossOrigin: me.crossOrigin,
  10642. serverType: me.serverType,
  10643. eventListeners: {
  10644. scope: me,
  10645. processCompleted: callback,
  10646. processFailed: callback
  10647. },
  10648. format: format
  10649. });
  10650. kernelDensityJobsService.getKernelDensityJobs();
  10651. }
  10652. /**
  10653. * @function SuperMap.REST.ProcessingService.prototype.getKernelDensityJob
  10654. * @description 获取某一个密度分析。
  10655. * @param {string} id - 空间分析的 id。
  10656. * @param {function} callback - 请求结果的回调函数。
  10657. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  10658. */
  10659. }, {
  10660. key: "getKernelDensityJob",
  10661. value: function getKernelDensityJob(id, callback, resultFormat) {
  10662. var me = this,
  10663. format = me._processFormat(resultFormat);
  10664. var kernelDensityJobsService = new KernelDensityJobsService_KernelDensityJobsService(me.url, {
  10665. headers: me.headers,
  10666. proxy: me.proxy,
  10667. withCredentials: me.withCredentials,
  10668. crossOrigin: me.crossOrigin,
  10669. serverType: me.serverType,
  10670. eventListeners: {
  10671. scope: me,
  10672. processCompleted: callback,
  10673. processFailed: callback
  10674. },
  10675. format: format
  10676. });
  10677. kernelDensityJobsService.getKernelDensityJob(id);
  10678. }
  10679. /**
  10680. * @function SuperMap.REST.ProcessingService.prototype.addKernelDensityJob
  10681. * @description 新建一个密度分析。
  10682. * @param {SuperMap.KernelDensityJobParameter} params - 创建一个空间分析的请求参数。
  10683. * @param {function} callback - 请求结果的回调函数。
  10684. * @param {number} [seconds=1000] - 开始创建后,获取创建成功结果的时间间隔。
  10685. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  10686. */
  10687. }, {
  10688. key: "addKernelDensityJob",
  10689. value: function addKernelDensityJob(params, callback, seconds, resultFormat) {
  10690. var me = this,
  10691. format = me._processFormat(resultFormat);
  10692. var kernelDensityJobsService = new KernelDensityJobsService_KernelDensityJobsService(me.url, {
  10693. headers: me.headers,
  10694. proxy: me.proxy,
  10695. withCredentials: me.withCredentials,
  10696. crossOrigin: me.crossOrigin,
  10697. eventListeners: {
  10698. scope: me,
  10699. processCompleted: callback,
  10700. processFailed: callback,
  10701. processRunning: function processRunning(job) {
  10702. me.kernelDensityJobs[job.id] = job.state;
  10703. }
  10704. },
  10705. format: format
  10706. });
  10707. kernelDensityJobsService.addKernelDensityJob(params, seconds);
  10708. }
  10709. /**
  10710. * @function SuperMap.REST.ProcessingService.prototype.getKernelDensityJobState
  10711. * @description 获取密度分析的状态。
  10712. * @param {string} id - 密度分析的 id。
  10713. * @returns {Object} - 密度分析的状态。
  10714. */
  10715. }, {
  10716. key: "getKernelDensityJobState",
  10717. value: function getKernelDensityJobState(id) {
  10718. return this.kernelDensityJobs[id];
  10719. }
  10720. /**
  10721. * @function SuperMap.REST.ProcessingService.prototype.getSummaryMeshJobs
  10722. * @description 获取点聚合分析的列表。
  10723. * @param {function} callback - 请求结果的回调函数。
  10724. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  10725. */
  10726. }, {
  10727. key: "getSummaryMeshJobs",
  10728. value: function getSummaryMeshJobs(callback, resultFormat) {
  10729. var me = this,
  10730. format = me._processFormat(resultFormat);
  10731. var summaryMeshJobsService = new SummaryMeshJobsService_SummaryMeshJobsService(me.url, {
  10732. headers: me.headers,
  10733. proxy: me.proxy,
  10734. withCredentials: me.withCredentials,
  10735. crossOrigin: me.crossOrigin,
  10736. serverType: me.serverType,
  10737. eventListeners: {
  10738. scope: me,
  10739. processCompleted: callback,
  10740. processFailed: callback
  10741. },
  10742. format: format
  10743. });
  10744. summaryMeshJobsService.getSummaryMeshJobs();
  10745. }
  10746. /**
  10747. * @function SuperMap.REST.ProcessingService.prototype.getSummaryMeshJob
  10748. * @description 获取某一个点聚合分析。
  10749. * @param {string} id - 空间分析的 id。
  10750. * @param {function} callback - 请求结果的回调函数。
  10751. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  10752. */
  10753. }, {
  10754. key: "getSummaryMeshJob",
  10755. value: function getSummaryMeshJob(id, callback, resultFormat) {
  10756. var me = this,
  10757. format = me._processFormat(resultFormat);
  10758. var summaryMeshJobsService = new SummaryMeshJobsService_SummaryMeshJobsService(me.url, {
  10759. headers: me.headers,
  10760. proxy: me.proxy,
  10761. withCredentials: me.withCredentials,
  10762. crossOrigin: me.crossOrigin,
  10763. serverType: me.serverType,
  10764. eventListeners: {
  10765. scope: me,
  10766. processCompleted: callback,
  10767. processFailed: callback
  10768. },
  10769. format: format
  10770. });
  10771. summaryMeshJobsService.getSummaryMeshJob(id);
  10772. }
  10773. /**
  10774. * @function SuperMap.REST.ProcessingService.prototype.addSummaryMeshJob
  10775. * @description 新建一个点聚合分析。
  10776. * @param {SuperMap.SummaryMeshJobParameter} params - 点聚合分析任务参数类。
  10777. * @param {function} callback - 请求结果的回调函数。
  10778. * @param {number} [seconds=1000] - 开始创建后,获取创建成功结果的时间间隔。
  10779. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  10780. */
  10781. }, {
  10782. key: "addSummaryMeshJob",
  10783. value: function addSummaryMeshJob(params, callback, seconds, resultFormat) {
  10784. var me = this,
  10785. format = me._processFormat(resultFormat);
  10786. var summaryMeshJobsService = new SummaryMeshJobsService_SummaryMeshJobsService(me.url, {
  10787. headers: me.headers,
  10788. proxy: me.proxy,
  10789. withCredentials: me.withCredentials,
  10790. crossOrigin: me.crossOrigin,
  10791. eventListeners: {
  10792. scope: me,
  10793. processCompleted: callback,
  10794. processFailed: callback,
  10795. processRunning: function processRunning(job) {
  10796. me.summaryMeshJobs[job.id] = job.state;
  10797. }
  10798. },
  10799. format: format
  10800. });
  10801. summaryMeshJobsService.addSummaryMeshJob(params, seconds);
  10802. }
  10803. /**
  10804. * @function SuperMap.REST.ProcessingService.prototype.getSummaryMeshJobState
  10805. * @description 获取点聚合分析的状态。
  10806. * @param {string} id - 点聚合分析的 id。
  10807. * @returns {Object} 点聚合分析的状态。
  10808. */
  10809. }, {
  10810. key: "getSummaryMeshJobState",
  10811. value: function getSummaryMeshJobState(id) {
  10812. return this.summaryMeshJobs[id];
  10813. }
  10814. /**
  10815. * @function SuperMap.REST.ProcessingService.prototype.getQueryJobs
  10816. * @description 获取单对象查询分析的列表。
  10817. * @param {function} callback - 请求结果的回调函数。
  10818. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  10819. */
  10820. }, {
  10821. key: "getQueryJobs",
  10822. value: function getQueryJobs(callback, resultFormat) {
  10823. var me = this,
  10824. format = me._processFormat(resultFormat);
  10825. var singleObjectQueryJobsService = new SingleObjectQueryJobsService_SingleObjectQueryJobsService(me.url, {
  10826. headers: me.headers,
  10827. proxy: me.proxy,
  10828. withCredentials: me.withCredentials,
  10829. crossOrigin: me.crossOrigin,
  10830. serverType: me.serverType,
  10831. eventListeners: {
  10832. scope: me,
  10833. processCompleted: callback,
  10834. processFailed: callback
  10835. },
  10836. format: format
  10837. });
  10838. singleObjectQueryJobsService.getQueryJobs();
  10839. }
  10840. /**
  10841. * @function SuperMap.REST.ProcessingService.prototype.getQueryJob
  10842. * @description 获取某一个单对象查询分析。
  10843. * @param {string} id - 空间分析的 id。
  10844. * @param {function} callback - 请求结果的回调函数。
  10845. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  10846. */
  10847. }, {
  10848. key: "getQueryJob",
  10849. value: function getQueryJob(id, callback, resultFormat) {
  10850. var me = this,
  10851. format = me._processFormat(resultFormat);
  10852. var singleObjectQueryJobsService = new SingleObjectQueryJobsService_SingleObjectQueryJobsService(me.url, {
  10853. headers: me.headers,
  10854. proxy: me.proxy,
  10855. withCredentials: me.withCredentials,
  10856. crossOrigin: me.crossOrigin,
  10857. serverType: me.serverType,
  10858. eventListeners: {
  10859. scope: me,
  10860. processCompleted: callback,
  10861. processFailed: callback
  10862. },
  10863. format: format
  10864. });
  10865. singleObjectQueryJobsService.getQueryJob(id);
  10866. }
  10867. /**
  10868. * @function SuperMap.REST.ProcessingService.prototype.addQueryJob
  10869. * @description 新建一个单对象查询分析。
  10870. * @param {SuperMap.SingleObjectQueryJobsParameter} params - 创建一个空间分析的请求参数。
  10871. * @param {function} callback - 请求结果的回调函数。
  10872. * @param {number} [seconds=1000] - 开始创建后,获取创建成功结果的时间间隔。
  10873. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  10874. */
  10875. }, {
  10876. key: "addQueryJob",
  10877. value: function addQueryJob(params, callback, seconds, resultFormat) {
  10878. var me = this,
  10879. param = me._processParams(params),
  10880. format = me._processFormat(resultFormat);
  10881. var singleObjectQueryJobsService = new SingleObjectQueryJobsService_SingleObjectQueryJobsService(me.url, {
  10882. headers: me.headers,
  10883. proxy: me.proxy,
  10884. withCredentials: me.withCredentials,
  10885. crossOrigin: me.crossOrigin,
  10886. eventListeners: {
  10887. scope: me,
  10888. processCompleted: callback,
  10889. processFailed: callback,
  10890. processRunning: function processRunning(job) {
  10891. me.queryJobs[job.id] = job.state;
  10892. }
  10893. },
  10894. format: format
  10895. });
  10896. singleObjectQueryJobsService.addQueryJob(param, seconds);
  10897. }
  10898. /**
  10899. * @function SuperMap.REST.ProcessingService.prototype.getQueryJobState
  10900. * @description 获取单对象查询分析的状态。
  10901. * @param {string} id - 单对象查询分析的 id。
  10902. * @returns {Object} 单对象查询分析的状态
  10903. */
  10904. }, {
  10905. key: "getQueryJobState",
  10906. value: function getQueryJobState(id) {
  10907. return this.queryJobs[id];
  10908. }
  10909. /**
  10910. * @function SuperMap.REST.ProcessingService.prototype.getSummaryRegionJobs
  10911. * @description 获取区域汇总分析的列表。
  10912. * @param {function} callback - 请求结果的回调函数。
  10913. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  10914. */
  10915. }, {
  10916. key: "getSummaryRegionJobs",
  10917. value: function getSummaryRegionJobs(callback, resultFormat) {
  10918. var me = this,
  10919. format = me._processFormat(resultFormat);
  10920. var summaryRegionJobsService = new SummaryRegionJobsService_SummaryRegionJobsService(me.url, {
  10921. proxy: me.proxy,
  10922. headers: me.headers,
  10923. withCredentials: me.withCredentials,
  10924. crossOrigin: me.crossOrigin,
  10925. serverType: me.serverType,
  10926. eventListeners: {
  10927. scope: me,
  10928. processCompleted: callback,
  10929. processFailed: callback
  10930. },
  10931. format: format
  10932. });
  10933. summaryRegionJobsService.getSummaryRegionJobs();
  10934. }
  10935. /**
  10936. * @function SuperMap.REST.ProcessingService.prototype.getSummaryRegionJob
  10937. * @description 获取某一个区域汇总分析。
  10938. * @param {string} id - 区域汇总分析的 id。
  10939. * @param {function} callback - 请求结果的回调函数。
  10940. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  10941. */
  10942. }, {
  10943. key: "getSummaryRegionJob",
  10944. value: function getSummaryRegionJob(id, callback, resultFormat) {
  10945. var me = this,
  10946. format = me._processFormat(resultFormat);
  10947. var summaryRegionJobsService = new SummaryRegionJobsService_SummaryRegionJobsService(me.url, {
  10948. proxy: me.proxy,
  10949. withCredentials: me.withCredentials,
  10950. crossOrigin: me.crossOrigin,
  10951. headers: me.headers,
  10952. serverType: me.serverType,
  10953. eventListeners: {
  10954. scope: me,
  10955. processCompleted: callback,
  10956. processFailed: callback
  10957. },
  10958. format: format
  10959. });
  10960. summaryRegionJobsService.getSummaryRegionJob(id);
  10961. }
  10962. /**
  10963. * @function SuperMap.REST.ProcessingService.prototype.addSummaryRegionJob
  10964. * @description 新建一个区域汇总分析。
  10965. * @param {SuperMap.SummaryRegionJobParameter} params -创建一个区域汇总分析的请求参数。
  10966. * @param {function} callback - 请求结果的回调函数。
  10967. * @param {number} [seconds=1000] - 开始创建后,获取创建成功结果的时间间隔。
  10968. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  10969. */
  10970. }, {
  10971. key: "addSummaryRegionJob",
  10972. value: function addSummaryRegionJob(params, callback, seconds, resultFormat) {
  10973. var me = this,
  10974. format = me._processFormat(resultFormat);
  10975. var summaryRegionJobsService = new SummaryRegionJobsService_SummaryRegionJobsService(me.url, {
  10976. proxy: me.proxy,
  10977. withCredentials: me.withCredentials,
  10978. crossOrigin: me.crossOrigin,
  10979. headers: me.headers,
  10980. eventListeners: {
  10981. scope: me,
  10982. processCompleted: callback,
  10983. processFailed: callback,
  10984. processRunning: function processRunning(job) {
  10985. me.summaryRegionJobs[job.id] = job.state;
  10986. }
  10987. },
  10988. format: format
  10989. });
  10990. summaryRegionJobsService.addSummaryRegionJob(params, seconds);
  10991. }
  10992. /**
  10993. * @function SuperMap.REST.ProcessingService.prototype.getSummaryRegionJobState
  10994. * @description 获取区域汇总分析的状态。
  10995. * @param {string} id - 区域汇总分析的 id。
  10996. * @returns {Object} 区域汇总分析的状态。
  10997. */
  10998. }, {
  10999. key: "getSummaryRegionJobState",
  11000. value: function getSummaryRegionJobState(id) {
  11001. return this.summaryRegionJobs[id];
  11002. }
  11003. /**
  11004. * @function SuperMap.REST.ProcessingService.prototype.getVectorClipJobs
  11005. * @description 获取矢量裁剪分析的列表。
  11006. * @param {function} callback - 请求结果的回调函数。
  11007. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11008. */
  11009. }, {
  11010. key: "getVectorClipJobs",
  11011. value: function getVectorClipJobs(callback, resultFormat) {
  11012. var me = this,
  11013. format = me._processFormat(resultFormat);
  11014. var vectorClipJobsService = new VectorClipJobsService_VectorClipJobsService(me.url, {
  11015. proxy: me.proxy,
  11016. withCredentials: me.withCredentials,
  11017. crossOrigin: me.crossOrigin,
  11018. headers: me.headers,
  11019. serverType: me.serverType,
  11020. eventListeners: {
  11021. scope: me,
  11022. processCompleted: callback,
  11023. processFailed: callback
  11024. },
  11025. format: format
  11026. });
  11027. vectorClipJobsService.getVectorClipJobs();
  11028. }
  11029. /**
  11030. * @function SuperMap.REST.ProcessingService.prototype.getVectorClipJob
  11031. * @description 获取某一个矢量裁剪分析。
  11032. * @param {string} id - 空间分析的 id。
  11033. * @param {function} callback - 请求结果的回调函数。
  11034. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11035. */
  11036. }, {
  11037. key: "getVectorClipJob",
  11038. value: function getVectorClipJob(id, callback, resultFormat) {
  11039. var me = this,
  11040. format = me._processFormat(resultFormat);
  11041. var vectorClipJobsService = new VectorClipJobsService_VectorClipJobsService(me.url, {
  11042. proxy: me.proxy,
  11043. withCredentials: me.withCredentials,
  11044. crossOrigin: me.crossOrigin,
  11045. headers: me.headers,
  11046. serverType: me.serverType,
  11047. eventListeners: {
  11048. scope: me,
  11049. processCompleted: callback,
  11050. processFailed: callback
  11051. },
  11052. format: format
  11053. });
  11054. vectorClipJobsService.getVectorClipJob(id);
  11055. }
  11056. /**
  11057. * @function SuperMap.REST.ProcessingService.prototype.addVectorClipJob
  11058. * @description 新建一个矢量裁剪分析。
  11059. * @param {SuperMap.VectorClipJobsParameter} params - 创建一个空间分析的请求参数。
  11060. * @param {function} callback - 请求结果的回调函数。
  11061. * @param {number} [seconds=1000] - 开始创建后,获取创建成功结果的时间间隔。
  11062. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11063. */
  11064. }, {
  11065. key: "addVectorClipJob",
  11066. value: function addVectorClipJob(params, callback, seconds, resultFormat) {
  11067. var me = this,
  11068. param = me._processParams(params),
  11069. format = me._processFormat(resultFormat);
  11070. var vectorClipJobsService = new VectorClipJobsService_VectorClipJobsService(me.url, {
  11071. proxy: me.proxy,
  11072. withCredentials: me.withCredentials,
  11073. crossOrigin: me.crossOrigin,
  11074. headers: me.headers,
  11075. serverType: me.serverType,
  11076. eventListeners: {
  11077. scope: me,
  11078. processCompleted: callback,
  11079. processFailed: callback,
  11080. processRunning: function processRunning(job) {
  11081. me.vectorClipJobs[job.id] = job.state;
  11082. }
  11083. },
  11084. format: format
  11085. });
  11086. vectorClipJobsService.addVectorClipJob(param, seconds);
  11087. }
  11088. /**
  11089. * @function SuperMap.REST.ProcessingService.prototype.getVectorClipJobState
  11090. * @description 获取矢量裁剪分析的状态。
  11091. * @param {string} id - 矢量裁剪分析的 id。
  11092. * @returns {Object} 矢量裁剪分析的状态。
  11093. */
  11094. }, {
  11095. key: "getVectorClipJobState",
  11096. value: function getVectorClipJobState(id) {
  11097. return this.vectorClipJobs[id];
  11098. }
  11099. /**
  11100. * @function SuperMap.REST.ProcessingService.prototype.getOverlayGeoJobs
  11101. * @description 获取叠加分析的列表。
  11102. * @param {function} callback - 请求结果的回调函数。
  11103. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11104. */
  11105. }, {
  11106. key: "getOverlayGeoJobs",
  11107. value: function getOverlayGeoJobs(callback, resultFormat) {
  11108. var me = this,
  11109. format = me._processFormat(resultFormat);
  11110. var overlayGeoJobsService = new OverlayGeoJobsService_OverlayGeoJobsService(me.url, {
  11111. proxy: me.proxy,
  11112. withCredentials: me.withCredentials,
  11113. crossOrigin: me.crossOrigin,
  11114. headers: me.headers,
  11115. serverType: me.serverType,
  11116. eventListeners: {
  11117. scope: me,
  11118. processCompleted: callback,
  11119. processFailed: callback
  11120. },
  11121. format: format
  11122. });
  11123. overlayGeoJobsService.getOverlayGeoJobs();
  11124. }
  11125. /**
  11126. * @function SuperMap.REST.ProcessingService.prototype.getOverlayGeoJob
  11127. * @description 获取某一个叠加分析。
  11128. * @param {string} id - 空间分析的 id。
  11129. * @param {function} callback - 请求结果的回调函数。
  11130. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11131. */
  11132. }, {
  11133. key: "getOverlayGeoJob",
  11134. value: function getOverlayGeoJob(id, callback, resultFormat) {
  11135. var me = this,
  11136. format = me._processFormat(resultFormat);
  11137. var overlayGeoJobsService = new OverlayGeoJobsService_OverlayGeoJobsService(me.url, {
  11138. proxy: me.proxy,
  11139. withCredentials: me.withCredentials,
  11140. crossOrigin: me.crossOrigin,
  11141. headers: me.headers,
  11142. serverType: me.serverType,
  11143. eventListeners: {
  11144. scope: me,
  11145. processCompleted: callback,
  11146. processFailed: callback
  11147. },
  11148. format: format
  11149. });
  11150. overlayGeoJobsService.getOverlayGeoJob(id);
  11151. }
  11152. /**
  11153. * @function SuperMap.REST.ProcessingService.prototype.addOverlayGeoJob
  11154. * @description 新建一个叠加分析。
  11155. * @param {SuperMap.OverlayGeoJobParameter} params - 创建一个空间分析的请求参数。
  11156. * @param {function} callback - 请求结果的回调函数。
  11157. * @param {number} [seconds=1000] - 开始创建后,获取创建成功结果的时间间隔。
  11158. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11159. */
  11160. }, {
  11161. key: "addOverlayGeoJob",
  11162. value: function addOverlayGeoJob(params, callback, seconds, resultFormat) {
  11163. var me = this,
  11164. format = me._processFormat(resultFormat);
  11165. var overlayGeoJobsService = new OverlayGeoJobsService_OverlayGeoJobsService(me.url, {
  11166. proxy: me.proxy,
  11167. withCredentials: me.withCredentials,
  11168. crossOrigin: me.crossOrigin,
  11169. headers: me.headers,
  11170. serverType: me.serverType,
  11171. eventListeners: {
  11172. scope: me,
  11173. processCompleted: callback,
  11174. processFailed: callback,
  11175. processRunning: function processRunning(job) {
  11176. me.overlayGeoJobs[job.id] = job.state;
  11177. }
  11178. },
  11179. format: format
  11180. });
  11181. overlayGeoJobsService.addOverlayGeoJob(params, seconds);
  11182. }
  11183. /**
  11184. * @function SuperMap.REST.ProcessingService.prototype.getoverlayGeoJobState
  11185. * @description 获取叠加分析的状态。
  11186. * @param {string} id - 叠加分析的 id。
  11187. * @returns {Object} 叠加分析的状态。
  11188. */
  11189. }, {
  11190. key: "getoverlayGeoJobState",
  11191. value: function getoverlayGeoJobState(id) {
  11192. return this.overlayGeoJobs[id];
  11193. }
  11194. /**
  11195. * @function SuperMap.REST.ProcessingService.prototype.getBuffersJobs
  11196. * @description 获取缓冲区分析的列表。
  11197. * @param {function} callback - 请求结果的回调函数。
  11198. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11199. */
  11200. }, {
  11201. key: "getBuffersJobs",
  11202. value: function getBuffersJobs(callback, resultFormat) {
  11203. var me = this,
  11204. format = me._processFormat(resultFormat);
  11205. var buffersAnalystJobsService = new BuffersAnalystJobsService_BuffersAnalystJobsService(me.url, {
  11206. proxy: me.proxy,
  11207. withCredentials: me.withCredentials,
  11208. crossOrigin: me.crossOrigin,
  11209. headers: me.headers,
  11210. serverType: me.serverType,
  11211. eventListeners: {
  11212. scope: me,
  11213. processCompleted: callback,
  11214. processFailed: callback
  11215. },
  11216. format: format
  11217. });
  11218. buffersAnalystJobsService.getBuffersJobs();
  11219. }
  11220. /**
  11221. * @function SuperMap.REST.ProcessingService.prototype.getBuffersJob
  11222. * @description 获取某一个缓冲区分析。
  11223. * @param {string} id - 空间分析的 id。
  11224. * @param {function} callback - 请求结果的回调函数。
  11225. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11226. */
  11227. }, {
  11228. key: "getBuffersJob",
  11229. value: function getBuffersJob(id, callback, resultFormat) {
  11230. var me = this,
  11231. format = me._processFormat(resultFormat);
  11232. var buffersAnalystJobsService = new BuffersAnalystJobsService_BuffersAnalystJobsService(me.url, {
  11233. proxy: me.proxy,
  11234. withCredentials: me.withCredentials,
  11235. crossOrigin: me.crossOrigin,
  11236. headers: me.headers,
  11237. serverType: me.serverType,
  11238. eventListeners: {
  11239. scope: me,
  11240. processCompleted: callback,
  11241. processFailed: callback
  11242. },
  11243. format: format
  11244. });
  11245. buffersAnalystJobsService.getBuffersJob(id);
  11246. }
  11247. /**
  11248. * @function SuperMap.REST.ProcessingService.prototype.addBuffersJob
  11249. * @description 新建一个缓冲区分析。
  11250. * @param {SuperMap.BuffersAnalystJobsParameter} params - 创建一个空间分析的请求参数。
  11251. * @param {function} callback - 请求结果的回调函数。
  11252. * @param {number} [seconds=1000] - 开始创建后,获取创建成功结果的时间间隔。
  11253. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11254. */
  11255. }, {
  11256. key: "addBuffersJob",
  11257. value: function addBuffersJob(params, callback, seconds, resultFormat) {
  11258. var me = this,
  11259. format = me._processFormat(resultFormat);
  11260. var buffersAnalystJobsService = new BuffersAnalystJobsService_BuffersAnalystJobsService(me.url, {
  11261. proxy: me.proxy,
  11262. withCredentials: me.withCredentials,
  11263. crossOrigin: me.crossOrigin,
  11264. headers: me.headers,
  11265. serverType: me.serverType,
  11266. eventListeners: {
  11267. scope: me,
  11268. processCompleted: callback,
  11269. processFailed: callback,
  11270. processRunning: function processRunning(job) {
  11271. me.buffersJobs[job.id] = job.state;
  11272. }
  11273. },
  11274. format: format
  11275. });
  11276. buffersAnalystJobsService.addBuffersJob(params, seconds);
  11277. }
  11278. /**
  11279. * @function SuperMap.REST.ProcessingService.prototype.getBuffersJobState
  11280. * @description 获取缓冲区分析的状态。
  11281. * @param {string} id - 缓冲区分析的 id。
  11282. * @returns {Object} 缓冲区分析的状态。
  11283. */
  11284. }, {
  11285. key: "getBuffersJobState",
  11286. value: function getBuffersJobState(id) {
  11287. return this.buffersJobs[id];
  11288. }
  11289. /**
  11290. * @function SuperMap.REST.ProcessingService.prototype.getTopologyValidatorJobs
  11291. * @description 获取拓扑检查分析的列表。
  11292. * @param {function} callback - 请求结果的回调函数。
  11293. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11294. */
  11295. }, {
  11296. key: "getTopologyValidatorJobs",
  11297. value: function getTopologyValidatorJobs(callback, resultFormat) {
  11298. var me = this,
  11299. format = me._processFormat(resultFormat);
  11300. var topologyValidatorJobsService = new TopologyValidatorJobsService_TopologyValidatorJobsService(me.url, {
  11301. proxy: me.proxy,
  11302. withCredentials: me.withCredentials,
  11303. crossOrigin: me.crossOrigin,
  11304. headers: me.headers,
  11305. serverType: me.serverType,
  11306. eventListeners: {
  11307. scope: me,
  11308. processCompleted: callback,
  11309. processFailed: callback
  11310. },
  11311. format: format
  11312. });
  11313. topologyValidatorJobsService.getTopologyValidatorJobs();
  11314. }
  11315. /**
  11316. * @function SuperMap.REST.ProcessingService.prototype.getTopologyValidatorJob
  11317. * @description 获取某一个拓扑检查分析。
  11318. * @param {string} id - 空间分析的 id。
  11319. * @param {function} callback - 请求结果的回调函数。
  11320. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11321. */
  11322. }, {
  11323. key: "getTopologyValidatorJob",
  11324. value: function getTopologyValidatorJob(id, callback, resultFormat) {
  11325. var me = this,
  11326. format = me._processFormat(resultFormat);
  11327. var topologyValidatorJobsService = new TopologyValidatorJobsService_TopologyValidatorJobsService(me.url, {
  11328. proxy: me.proxy,
  11329. withCredentials: me.withCredentials,
  11330. crossOrigin: me.crossOrigin,
  11331. headers: me.headers,
  11332. serverType: me.serverType,
  11333. eventListeners: {
  11334. scope: me,
  11335. processCompleted: callback,
  11336. processFailed: callback
  11337. },
  11338. format: format
  11339. });
  11340. topologyValidatorJobsService.getTopologyValidatorJob(id);
  11341. }
  11342. /**
  11343. * @function SuperMap.REST.ProcessingService.prototype.addTopologyValidatorJob
  11344. * @description 新建一个拓扑检查分析。
  11345. * @param {SuperMap.TopologyValidatorJobsParameter} params - 创建一个空间分析的请求参数。
  11346. * @param {function} callback - 请求结果的回调函数。
  11347. * @param {number} [seconds=1000] - 开始创建后,获取创建成功结果的时间间隔。
  11348. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11349. */
  11350. }, {
  11351. key: "addTopologyValidatorJob",
  11352. value: function addTopologyValidatorJob(params, callback, seconds, resultFormat) {
  11353. var me = this,
  11354. format = me._processFormat(resultFormat);
  11355. var topologyValidatorJobsService = new TopologyValidatorJobsService_TopologyValidatorJobsService(me.url, {
  11356. proxy: me.proxy,
  11357. withCredentials: me.withCredentials,
  11358. crossOrigin: me.crossOrigin,
  11359. headers: me.headers,
  11360. serverType: me.serverType,
  11361. eventListeners: {
  11362. scope: me,
  11363. processCompleted: callback,
  11364. processFailed: callback,
  11365. processRunning: function processRunning(job) {
  11366. me.topologyValidatorJobs[job.id] = job.state;
  11367. }
  11368. },
  11369. format: format
  11370. });
  11371. topologyValidatorJobsService.addTopologyValidatorJob(params, seconds);
  11372. }
  11373. /**
  11374. * @function SuperMap.REST.ProcessingService.prototype.getTopologyValidatorJobState
  11375. * @description 获取拓扑检查分析的状态。
  11376. * @param {string} id - 拓扑检查分析的 id。
  11377. * @returns {Object} 拓扑检查分析的状态。
  11378. */
  11379. }, {
  11380. key: "getTopologyValidatorJobState",
  11381. value: function getTopologyValidatorJobState(id) {
  11382. return this.topologyValidatorJobs[id];
  11383. }
  11384. /**
  11385. * @function SuperMap.REST.ProcessingService.prototype.getSummaryAttributesJobs
  11386. * @description 获取属性汇总分析的列表。
  11387. * @param {function} callback - 请求结果的回调函数。
  11388. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11389. */
  11390. }, {
  11391. key: "getSummaryAttributesJobs",
  11392. value: function getSummaryAttributesJobs(callback, resultFormat) {
  11393. var me = this,
  11394. format = me._processFormat(resultFormat);
  11395. var summaryAttributesJobsService = new SummaryAttributesJobsService_SummaryAttributesJobsService(me.url, {
  11396. proxy: me.proxy,
  11397. withCredentials: me.withCredentials,
  11398. crossOrigin: me.crossOrigin,
  11399. headers: me.headers,
  11400. serverType: me.serverType,
  11401. eventListeners: {
  11402. scope: me,
  11403. processCompleted: callback,
  11404. processFailed: callback
  11405. },
  11406. format: format
  11407. });
  11408. summaryAttributesJobsService.getSummaryAttributesJobs();
  11409. }
  11410. /**
  11411. * @function SuperMap.REST.ProcessingService.prototype.getSummaryAttributesJob
  11412. * @description 获取某一个属性汇总分析。
  11413. * @param {string} id - 空间分析的 id。
  11414. * @param {function} callback - 请求结果的回调函数。
  11415. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11416. */
  11417. }, {
  11418. key: "getSummaryAttributesJob",
  11419. value: function getSummaryAttributesJob(id, callback, resultFormat) {
  11420. var me = this,
  11421. format = me._processFormat(resultFormat);
  11422. var summaryAttributesJobsService = new SummaryAttributesJobsService_SummaryAttributesJobsService(me.url, {
  11423. proxy: me.proxy,
  11424. withCredentials: me.withCredentials,
  11425. crossOrigin: me.crossOrigin,
  11426. headers: me.headers,
  11427. serverType: me.serverType,
  11428. eventListeners: {
  11429. scope: me,
  11430. processCompleted: callback,
  11431. processFailed: callback
  11432. },
  11433. format: format
  11434. });
  11435. summaryAttributesJobsService.getSummaryAttributesJob(id);
  11436. }
  11437. /**
  11438. * @function SuperMap.REST.ProcessingService.prototype.addSummaryAttributesJob
  11439. * @description 新建一个属性汇总分析。
  11440. * @param {SuperMap.SummaryAttributesJobsParameter} params - 创建一个空间分析的请求参数。
  11441. * @param {function} callback - 请求结果的回调函数。
  11442. * @param {number} [seconds=1000] - 开始创建后,获取创建成功结果的时间间隔。
  11443. * @param {SuperMap.DataFormat} [resultFormat=SuperMap.DataFormat.GEOJSON] - 返回的结果类型。
  11444. */
  11445. }, {
  11446. key: "addSummaryAttributesJob",
  11447. value: function addSummaryAttributesJob(params, callback, seconds, resultFormat) {
  11448. var me = this,
  11449. format = me._processFormat(resultFormat);
  11450. var summaryAttributesJobsService = new SummaryAttributesJobsService_SummaryAttributesJobsService(me.url, {
  11451. proxy: me.proxy,
  11452. withCredentials: me.withCredentials,
  11453. crossOrigin: me.crossOrigin,
  11454. headers: me.headers,
  11455. serverType: me.serverType,
  11456. eventListeners: {
  11457. scope: me,
  11458. processCompleted: callback,
  11459. processFailed: callback,
  11460. processRunning: function processRunning(job) {
  11461. me.summaryAttributesJobs[job.id] = job.state;
  11462. }
  11463. },
  11464. format: format
  11465. });
  11466. summaryAttributesJobsService.addSummaryAttributesJob(params, seconds);
  11467. }
  11468. /**
  11469. * @function SuperMap.REST.ProcessingService.prototype.getSummaryAttributesJobState
  11470. * @description 获取属性汇总分析的状态。
  11471. * @param {string} id - 属性汇总分析的 id。
  11472. * @returns {Object} 属性汇总分析的状态。
  11473. */
  11474. }, {
  11475. key: "getSummaryAttributesJobState",
  11476. value: function getSummaryAttributesJobState(id) {
  11477. return this.summaryAttributesJobs[id];
  11478. }
  11479. }, {
  11480. key: "_processFormat",
  11481. value: function _processFormat(resultFormat) {
  11482. return resultFormat ? resultFormat : DataFormat.GEOJSON;
  11483. }
  11484. }, {
  11485. key: "_processParams",
  11486. value: function _processParams(params) {
  11487. if (!params) {
  11488. return {};
  11489. }
  11490. if (params.geometryQuery) {
  11491. params.geometryQuery = this._convertPatams(params.geometryQuery);
  11492. }
  11493. if (params.geometryClip) {
  11494. params.geometryClip = this._convertPatams(params.geometryClip);
  11495. }
  11496. return params;
  11497. }
  11498. }, {
  11499. key: "_convertPatams",
  11500. value: function _convertPatams(points) {
  11501. var geometryParam = {};
  11502. if (points.length < 1) {
  11503. geometryParam = "";
  11504. } else {
  11505. var results = [];
  11506. for (var i = 0; i < points.length; i++) {
  11507. var point = {};
  11508. point.x = points[i].x;
  11509. point.y = points[i].y;
  11510. results.push(point);
  11511. }
  11512. geometryParam.type = "REGION";
  11513. geometryParam.points = results;
  11514. }
  11515. return geometryParam;
  11516. }
  11517. }]);
  11518. return ProcessingService;
  11519. }(CommonServiceBase_CommonServiceBase);
  11520. SuperMap_SuperMap.REST.ProcessingService = ProcessingService_ProcessingService;
  11521. // CONCATENATED MODULE: ./src/classic/services/index.js
  11522. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  11523. * This program are made available under the terms of the Apache License, Version 2.0
  11524. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  11525. // CONCATENATED MODULE: ./src/classic/index.js
  11526. /* Copyright© 2000 - 2020 SuperMap Software Co.Ltd. All rights reserved.
  11527. * This program are made available under the terms of the Apache License, Version 2.0
  11528. * which accompanies this distribution and is available at http://www.apache.org/licenses/LICENSE-2.0.html.*/
  11529. /***/ })
  11530. /******/ ]);