123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999100001000110002100031000410005100061000710008100091001010011100121001310014100151001610017100181001910020100211002210023100241002510026100271002810029100301003110032100331003410035100361003710038100391004010041100421004310044100451004610047100481004910050100511005210053100541005510056100571005810059100601006110062100631006410065100661006710068100691007010071100721007310074100751007610077100781007910080100811008210083100841008510086100871008810089100901009110092100931009410095100961009710098100991010010101101021010310104101051010610107101081010910110101111011210113101141011510116101171011810119101201012110122101231012410125101261012710128101291013010131101321013310134101351013610137101381013910140101411014210143101441014510146101471014810149101501015110152101531015410155101561015710158101591016010161101621016310164101651016610167101681016910170101711017210173101741017510176101771017810179101801018110182101831018410185101861018710188101891019010191101921019310194101951019610197101981019910200102011020210203102041020510206102071020810209102101021110212102131021410215102161021710218102191022010221102221022310224102251022610227102281022910230102311023210233102341023510236102371023810239102401024110242102431024410245102461024710248102491025010251102521025310254102551025610257102581025910260102611026210263102641026510266102671026810269102701027110272102731027410275102761027710278102791028010281102821028310284102851028610287102881028910290102911029210293102941029510296102971029810299103001030110302103031030410305103061030710308103091031010311103121031310314103151031610317103181031910320103211032210323103241032510326103271032810329103301033110332103331033410335103361033710338103391034010341103421034310344103451034610347103481034910350103511035210353103541035510356103571035810359103601036110362103631036410365103661036710368103691037010371103721037310374103751037610377103781037910380103811038210383103841038510386103871038810389103901039110392103931039410395103961039710398103991040010401104021040310404104051040610407104081040910410104111041210413104141041510416104171041810419104201042110422104231042410425104261042710428104291043010431104321043310434104351043610437104381043910440104411044210443104441044510446104471044810449104501045110452104531045410455104561045710458104591046010461104621046310464104651046610467104681046910470104711047210473104741047510476104771047810479104801048110482104831048410485104861048710488104891049010491104921049310494104951049610497104981049910500105011050210503105041050510506105071050810509105101051110512105131051410515105161051710518105191052010521105221052310524105251052610527105281052910530105311053210533105341053510536105371053810539105401054110542105431054410545105461054710548105491055010551105521055310554105551055610557105581055910560105611056210563105641056510566105671056810569105701057110572105731057410575105761057710578105791058010581105821058310584105851058610587105881058910590105911059210593105941059510596105971059810599106001060110602106031060410605106061060710608106091061010611106121061310614106151061610617106181061910620106211062210623106241062510626106271062810629106301063110632106331063410635106361063710638106391064010641106421064310644106451064610647106481064910650106511065210653106541065510656106571065810659106601066110662106631066410665106661066710668106691067010671106721067310674106751067610677106781067910680106811068210683106841068510686106871068810689106901069110692106931069410695106961069710698106991070010701107021070310704107051070610707107081070910710107111071210713107141071510716107171071810719107201072110722107231072410725107261072710728107291073010731107321073310734107351073610737107381073910740107411074210743107441074510746107471074810749107501075110752107531075410755107561075710758107591076010761107621076310764107651076610767107681076910770107711077210773107741077510776107771077810779107801078110782107831078410785107861078710788107891079010791107921079310794107951079610797107981079910800108011080210803108041080510806108071080810809108101081110812108131081410815108161081710818108191082010821108221082310824108251082610827108281082910830108311083210833108341083510836108371083810839108401084110842108431084410845108461084710848108491085010851108521085310854108551085610857108581085910860108611086210863108641086510866108671086810869108701087110872108731087410875108761087710878108791088010881108821088310884108851088610887108881088910890108911089210893108941089510896108971089810899109001090110902109031090410905109061090710908109091091010911109121091310914109151091610917109181091910920109211092210923109241092510926109271092810929109301093110932109331093410935109361093710938109391094010941109421094310944109451094610947109481094910950109511095210953109541095510956109571095810959109601096110962109631096410965109661096710968109691097010971109721097310974109751097610977109781097910980109811098210983109841098510986109871098810989109901099110992109931099410995109961099710998109991100011001110021100311004110051100611007110081100911010110111101211013110141101511016110171101811019110201102111022110231102411025110261102711028110291103011031110321103311034110351103611037110381103911040110411104211043110441104511046110471104811049110501105111052110531105411055110561105711058110591106011061110621106311064110651106611067110681106911070110711107211073110741107511076110771107811079110801108111082110831108411085110861108711088110891109011091110921109311094110951109611097110981109911100111011110211103111041110511106111071110811109111101111111112111131111411115111161111711118111191112011121111221112311124111251112611127111281112911130111311113211133111341113511136111371113811139111401114111142111431114411145111461114711148111491115011151111521115311154111551115611157111581115911160111611116211163111641116511166111671116811169111701117111172111731117411175111761117711178111791118011181111821118311184111851118611187111881118911190111911119211193111941119511196111971119811199112001120111202112031120411205112061120711208112091121011211112121121311214112151121611217112181121911220112211122211223112241122511226112271122811229112301123111232112331123411235112361123711238112391124011241112421124311244112451124611247112481124911250112511125211253112541125511256112571125811259112601126111262112631126411265112661126711268112691127011271112721127311274112751127611277112781127911280112811128211283112841128511286112871128811289112901129111292112931129411295112961129711298112991130011301113021130311304113051130611307113081130911310113111131211313113141131511316113171131811319113201132111322113231132411325113261132711328113291133011331113321133311334113351133611337113381133911340113411134211343113441134511346113471134811349113501135111352113531135411355113561135711358113591136011361113621136311364113651136611367113681136911370113711137211373113741137511376113771137811379113801138111382113831138411385113861138711388113891139011391113921139311394113951139611397113981139911400114011140211403114041140511406114071140811409114101141111412114131141411415114161141711418114191142011421114221142311424114251142611427114281142911430114311143211433114341143511436114371143811439114401144111442114431144411445114461144711448114491145011451114521145311454114551145611457114581145911460114611146211463114641146511466114671146811469114701147111472114731147411475114761147711478114791148011481114821148311484114851148611487114881148911490114911149211493114941149511496114971149811499115001150111502115031150411505115061150711508115091151011511115121151311514115151151611517115181151911520115211152211523115241152511526115271152811529115301153111532115331153411535115361153711538115391154011541115421154311544115451154611547115481154911550115511155211553115541155511556115571155811559115601156111562115631156411565115661156711568115691157011571115721157311574115751157611577115781157911580115811158211583115841158511586115871158811589115901159111592115931159411595115961159711598115991160011601116021160311604116051160611607116081160911610116111161211613116141161511616116171161811619116201162111622116231162411625116261162711628116291163011631116321163311634116351163611637116381163911640116411164211643116441164511646116471164811649116501165111652116531165411655116561165711658116591166011661116621166311664116651166611667116681166911670116711167211673116741167511676116771167811679116801168111682116831168411685116861168711688116891169011691116921169311694116951169611697116981169911700117011170211703117041170511706117071170811709117101171111712117131171411715117161171711718117191172011721117221172311724117251172611727117281172911730117311173211733117341173511736117371173811739117401174111742117431174411745117461174711748117491175011751117521175311754117551175611757117581175911760117611176211763117641176511766117671176811769117701177111772117731177411775117761177711778117791178011781117821178311784117851178611787117881178911790117911179211793117941179511796117971179811799118001180111802118031180411805118061180711808118091181011811118121181311814118151181611817118181181911820118211182211823118241182511826118271182811829118301183111832118331183411835118361183711838118391184011841118421184311844118451184611847118481184911850118511185211853118541185511856118571185811859118601186111862118631186411865118661186711868118691187011871118721187311874118751187611877118781187911880118811188211883118841188511886118871188811889118901189111892118931189411895118961189711898118991190011901119021190311904119051190611907119081190911910119111191211913119141191511916119171191811919119201192111922119231192411925119261192711928119291193011931119321193311934119351193611937119381193911940119411194211943119441194511946119471194811949119501195111952119531195411955119561195711958119591196011961119621196311964119651196611967119681196911970119711197211973119741197511976119771197811979119801198111982119831198411985119861198711988119891199011991119921199311994119951199611997119981199912000120011200212003120041200512006120071200812009120101201112012120131201412015120161201712018120191202012021120221202312024120251202612027120281202912030120311203212033120341203512036120371203812039120401204112042120431204412045120461204712048120491205012051120521205312054120551205612057120581205912060120611206212063120641206512066120671206812069120701207112072120731207412075120761207712078120791208012081120821208312084120851208612087120881208912090120911209212093120941209512096120971209812099121001210112102121031210412105121061210712108121091211012111121121211312114121151211612117121181211912120121211212212123121241212512126121271212812129121301213112132121331213412135121361213712138121391214012141121421214312144121451214612147121481214912150121511215212153121541215512156121571215812159121601216112162121631216412165121661216712168121691217012171121721217312174121751217612177121781217912180121811218212183121841218512186121871218812189121901219112192121931219412195121961219712198121991220012201122021220312204122051220612207122081220912210122111221212213122141221512216122171221812219122201222112222122231222412225122261222712228122291223012231122321223312234122351223612237122381223912240122411224212243122441224512246122471224812249122501225112252122531225412255122561225712258122591226012261122621226312264122651226612267122681226912270122711227212273122741227512276122771227812279122801228112282122831228412285122861228712288122891229012291122921229312294122951229612297122981229912300123011230212303123041230512306123071230812309123101231112312123131231412315123161231712318123191232012321123221232312324123251232612327123281232912330123311233212333123341233512336123371233812339123401234112342123431234412345123461234712348123491235012351123521235312354123551235612357123581235912360123611236212363123641236512366123671236812369123701237112372123731237412375123761237712378123791238012381123821238312384123851238612387123881238912390123911239212393123941239512396123971239812399124001240112402124031240412405124061240712408124091241012411124121241312414124151241612417124181241912420124211242212423124241242512426124271242812429124301243112432124331243412435124361243712438124391244012441124421244312444124451244612447124481244912450124511245212453124541245512456124571245812459124601246112462124631246412465124661246712468124691247012471124721247312474124751247612477124781247912480124811248212483124841248512486124871248812489124901249112492124931249412495124961249712498124991250012501125021250312504125051250612507125081250912510125111251212513125141251512516125171251812519125201252112522125231252412525125261252712528125291253012531125321253312534125351253612537125381253912540125411254212543125441254512546125471254812549125501255112552125531255412555125561255712558125591256012561125621256312564125651256612567125681256912570125711257212573125741257512576125771257812579125801258112582125831258412585125861258712588125891259012591125921259312594125951259612597125981259912600126011260212603126041260512606126071260812609126101261112612126131261412615126161261712618126191262012621126221262312624126251262612627126281262912630126311263212633126341263512636126371263812639126401264112642126431264412645126461264712648126491265012651126521265312654126551265612657126581265912660126611266212663126641266512666126671266812669126701267112672126731267412675126761267712678126791268012681126821268312684126851268612687126881268912690126911269212693126941269512696126971269812699127001270112702127031270412705127061270712708127091271012711127121271312714127151271612717127181271912720127211272212723127241272512726127271272812729127301273112732127331273412735127361273712738127391274012741127421274312744127451274612747127481274912750127511275212753127541275512756127571275812759127601276112762127631276412765127661276712768127691277012771127721277312774127751277612777127781277912780127811278212783127841278512786127871278812789127901279112792127931279412795127961279712798127991280012801128021280312804128051280612807128081280912810128111281212813128141281512816128171281812819128201282112822128231282412825128261282712828128291283012831128321283312834128351283612837128381283912840128411284212843128441284512846128471284812849128501285112852128531285412855128561285712858128591286012861128621286312864128651286612867128681286912870128711287212873128741287512876128771287812879128801288112882128831288412885128861288712888128891289012891128921289312894128951289612897128981289912900129011290212903129041290512906129071290812909129101291112912129131291412915129161291712918129191292012921129221292312924129251292612927129281292912930129311293212933129341293512936129371293812939129401294112942129431294412945129461294712948129491295012951129521295312954129551295612957129581295912960129611296212963129641296512966129671296812969129701297112972129731297412975129761297712978129791298012981129821298312984129851298612987129881298912990129911299212993129941299512996129971299812999130001300113002130031300413005130061300713008130091301013011130121301313014130151301613017130181301913020130211302213023130241302513026130271302813029130301303113032130331303413035130361303713038130391304013041130421304313044130451304613047130481304913050130511305213053130541305513056130571305813059130601306113062130631306413065130661306713068130691307013071130721307313074130751307613077130781307913080130811308213083130841308513086130871308813089130901309113092130931309413095130961309713098130991310013101131021310313104131051310613107131081310913110131111311213113131141311513116131171311813119131201312113122131231312413125131261312713128131291313013131131321313313134131351313613137131381313913140131411314213143131441314513146131471314813149131501315113152131531315413155131561315713158131591316013161131621316313164131651316613167131681316913170131711317213173131741317513176131771317813179131801318113182131831318413185131861318713188131891319013191131921319313194131951319613197131981319913200132011320213203132041320513206132071320813209132101321113212132131321413215132161321713218132191322013221132221322313224132251322613227132281322913230132311323213233132341323513236132371323813239132401324113242132431324413245132461324713248132491325013251132521325313254132551325613257132581325913260132611326213263132641326513266132671326813269132701327113272132731327413275132761327713278132791328013281132821328313284132851328613287132881328913290132911329213293132941329513296132971329813299133001330113302133031330413305133061330713308133091331013311133121331313314133151331613317133181331913320133211332213323133241332513326133271332813329133301333113332133331333413335133361333713338133391334013341133421334313344133451334613347133481334913350133511335213353133541335513356133571335813359133601336113362133631336413365133661336713368133691337013371133721337313374133751337613377133781337913380133811338213383133841338513386133871338813389133901339113392133931339413395133961339713398133991340013401134021340313404134051340613407134081340913410134111341213413134141341513416134171341813419134201342113422134231342413425134261342713428134291343013431134321343313434134351343613437134381343913440134411344213443134441344513446134471344813449134501345113452134531345413455134561345713458134591346013461134621346313464134651346613467134681346913470134711347213473134741347513476134771347813479134801348113482134831348413485134861348713488134891349013491134921349313494134951349613497134981349913500135011350213503135041350513506135071350813509135101351113512135131351413515135161351713518135191352013521135221352313524135251352613527135281352913530135311353213533135341353513536135371353813539135401354113542135431354413545135461354713548135491355013551135521355313554135551355613557135581355913560135611356213563135641356513566135671356813569135701357113572135731357413575135761357713578135791358013581135821358313584135851358613587135881358913590135911359213593135941359513596135971359813599136001360113602136031360413605136061360713608136091361013611136121361313614136151361613617136181361913620136211362213623136241362513626136271362813629136301363113632136331363413635136361363713638136391364013641136421364313644136451364613647136481364913650136511365213653136541365513656136571365813659136601366113662136631366413665136661366713668136691367013671136721367313674136751367613677136781367913680136811368213683136841368513686136871368813689136901369113692136931369413695136961369713698136991370013701137021370313704137051370613707137081370913710137111371213713137141371513716137171371813719137201372113722137231372413725137261372713728137291373013731137321373313734137351373613737137381373913740137411374213743137441374513746137471374813749137501375113752137531375413755137561375713758137591376013761137621376313764137651376613767137681376913770137711377213773137741377513776137771377813779137801378113782137831378413785137861378713788137891379013791137921379313794137951379613797137981379913800138011380213803138041380513806138071380813809138101381113812138131381413815138161381713818138191382013821138221382313824138251382613827138281382913830138311383213833138341383513836138371383813839138401384113842138431384413845138461384713848138491385013851138521385313854138551385613857138581385913860138611386213863138641386513866138671386813869138701387113872138731387413875138761387713878138791388013881138821388313884138851388613887138881388913890138911389213893138941389513896138971389813899139001390113902139031390413905139061390713908139091391013911139121391313914139151391613917139181391913920139211392213923139241392513926139271392813929139301393113932139331393413935139361393713938139391394013941139421394313944139451394613947139481394913950139511395213953139541395513956139571395813959139601396113962139631396413965139661396713968139691397013971139721397313974139751397613977139781397913980139811398213983139841398513986139871398813989139901399113992139931399413995139961399713998139991400014001140021400314004140051400614007140081400914010140111401214013140141401514016140171401814019140201402114022140231402414025140261402714028140291403014031140321403314034140351403614037140381403914040140411404214043140441404514046140471404814049140501405114052140531405414055140561405714058140591406014061140621406314064140651406614067140681406914070140711407214073140741407514076140771407814079140801408114082140831408414085140861408714088140891409014091140921409314094140951409614097140981409914100141011410214103141041410514106141071410814109141101411114112141131411414115141161411714118141191412014121141221412314124141251412614127141281412914130141311413214133141341413514136141371413814139141401414114142141431414414145141461414714148141491415014151141521415314154141551415614157141581415914160141611416214163141641416514166141671416814169141701417114172141731417414175141761417714178141791418014181141821418314184141851418614187141881418914190141911419214193141941419514196141971419814199142001420114202142031420414205142061420714208142091421014211142121421314214142151421614217142181421914220142211422214223142241422514226142271422814229142301423114232142331423414235142361423714238142391424014241142421424314244142451424614247142481424914250142511425214253142541425514256142571425814259142601426114262142631426414265142661426714268142691427014271142721427314274142751427614277142781427914280142811428214283142841428514286142871428814289142901429114292142931429414295142961429714298142991430014301143021430314304143051430614307143081430914310143111431214313143141431514316143171431814319143201432114322143231432414325143261432714328143291433014331143321433314334143351433614337143381433914340143411434214343143441434514346143471434814349143501435114352143531435414355143561435714358143591436014361143621436314364143651436614367143681436914370143711437214373143741437514376143771437814379143801438114382143831438414385143861438714388143891439014391143921439314394143951439614397143981439914400144011440214403144041440514406144071440814409144101441114412144131441414415144161441714418144191442014421144221442314424144251442614427144281442914430144311443214433144341443514436144371443814439144401444114442144431444414445144461444714448144491445014451144521445314454144551445614457144581445914460144611446214463144641446514466144671446814469144701447114472144731447414475144761447714478144791448014481144821448314484144851448614487144881448914490144911449214493144941449514496144971449814499145001450114502145031450414505145061450714508145091451014511145121451314514145151451614517145181451914520145211452214523145241452514526145271452814529145301453114532145331453414535145361453714538145391454014541145421454314544145451454614547145481454914550145511455214553145541455514556145571455814559145601456114562145631456414565145661456714568145691457014571145721457314574145751457614577145781457914580145811458214583145841458514586145871458814589145901459114592145931459414595145961459714598145991460014601146021460314604146051460614607146081460914610146111461214613146141461514616146171461814619146201462114622146231462414625146261462714628146291463014631146321463314634146351463614637146381463914640146411464214643146441464514646146471464814649146501465114652146531465414655146561465714658146591466014661146621466314664146651466614667146681466914670146711467214673146741467514676146771467814679146801468114682146831468414685146861468714688146891469014691146921469314694146951469614697146981469914700147011470214703147041470514706147071470814709147101471114712147131471414715147161471714718147191472014721147221472314724147251472614727147281472914730147311473214733147341473514736147371473814739147401474114742147431474414745147461474714748147491475014751147521475314754147551475614757147581475914760147611476214763147641476514766147671476814769147701477114772147731477414775147761477714778147791478014781147821478314784147851478614787147881478914790147911479214793147941479514796147971479814799148001480114802148031480414805148061480714808148091481014811148121481314814148151481614817148181481914820148211482214823148241482514826148271482814829148301483114832148331483414835148361483714838148391484014841148421484314844148451484614847148481484914850148511485214853148541485514856148571485814859148601486114862148631486414865148661486714868148691487014871148721487314874148751487614877148781487914880148811488214883148841488514886148871488814889148901489114892148931489414895148961489714898148991490014901149021490314904149051490614907149081490914910149111491214913149141491514916149171491814919149201492114922149231492414925149261492714928149291493014931149321493314934149351493614937149381493914940149411494214943149441494514946149471494814949149501495114952149531495414955149561495714958149591496014961149621496314964149651496614967149681496914970149711497214973149741497514976149771497814979149801498114982149831498414985149861498714988149891499014991149921499314994149951499614997149981499915000150011500215003150041500515006150071500815009150101501115012150131501415015150161501715018150191502015021150221502315024150251502615027150281502915030150311503215033150341503515036150371503815039150401504115042150431504415045150461504715048150491505015051150521505315054150551505615057150581505915060150611506215063150641506515066150671506815069150701507115072150731507415075150761507715078150791508015081150821508315084150851508615087150881508915090150911509215093150941509515096150971509815099151001510115102151031510415105151061510715108151091511015111151121511315114151151511615117151181511915120151211512215123151241512515126151271512815129151301513115132151331513415135151361513715138151391514015141151421514315144151451514615147151481514915150151511515215153151541515515156151571515815159151601516115162151631516415165151661516715168151691517015171151721517315174151751517615177151781517915180151811518215183151841518515186151871518815189151901519115192151931519415195151961519715198151991520015201152021520315204152051520615207152081520915210152111521215213152141521515216152171521815219152201522115222152231522415225152261522715228152291523015231152321523315234152351523615237152381523915240152411524215243152441524515246152471524815249152501525115252152531525415255152561525715258152591526015261152621526315264152651526615267152681526915270152711527215273152741527515276152771527815279152801528115282152831528415285152861528715288152891529015291152921529315294152951529615297152981529915300153011530215303153041530515306153071530815309153101531115312153131531415315153161531715318153191532015321153221532315324153251532615327153281532915330153311533215333153341533515336153371533815339153401534115342153431534415345153461534715348153491535015351153521535315354153551535615357153581535915360153611536215363153641536515366153671536815369153701537115372153731537415375153761537715378153791538015381153821538315384153851538615387153881538915390153911539215393153941539515396153971539815399154001540115402154031540415405154061540715408154091541015411154121541315414154151541615417154181541915420154211542215423154241542515426154271542815429154301543115432154331543415435154361543715438154391544015441154421544315444154451544615447154481544915450154511545215453154541545515456154571545815459154601546115462154631546415465154661546715468154691547015471154721547315474154751547615477154781547915480154811548215483154841548515486154871548815489154901549115492154931549415495154961549715498154991550015501155021550315504155051550615507155081550915510155111551215513155141551515516155171551815519155201552115522155231552415525155261552715528155291553015531155321553315534155351553615537155381553915540155411554215543155441554515546155471554815549155501555115552155531555415555155561555715558155591556015561155621556315564155651556615567155681556915570155711557215573155741557515576155771557815579155801558115582155831558415585155861558715588155891559015591155921559315594155951559615597155981559915600156011560215603156041560515606156071560815609156101561115612156131561415615156161561715618156191562015621156221562315624156251562615627156281562915630156311563215633156341563515636156371563815639156401564115642156431564415645156461564715648156491565015651156521565315654156551565615657156581565915660156611566215663156641566515666156671566815669156701567115672156731567415675156761567715678156791568015681156821568315684156851568615687156881568915690156911569215693156941569515696156971569815699157001570115702157031570415705157061570715708157091571015711157121571315714157151571615717157181571915720157211572215723157241572515726157271572815729157301573115732157331573415735157361573715738157391574015741157421574315744157451574615747157481574915750157511575215753157541575515756157571575815759157601576115762157631576415765157661576715768157691577015771157721577315774157751577615777157781577915780157811578215783157841578515786157871578815789157901579115792157931579415795157961579715798157991580015801158021580315804158051580615807158081580915810158111581215813158141581515816158171581815819158201582115822158231582415825158261582715828158291583015831158321583315834158351583615837158381583915840158411584215843158441584515846158471584815849158501585115852158531585415855158561585715858158591586015861158621586315864158651586615867158681586915870158711587215873158741587515876158771587815879158801588115882158831588415885158861588715888158891589015891 |
- ;(function (config) {
- var ba = navigator.userAgent.toLowerCase(),
- ca = window,
- fa = document,
- ga = fa.documentElement
- function ma(a) {
- return -1 !== ba.indexOf(a)
- }
- var na = /([a-z0-9]*\d+[a-z0-9]*)/
- function pa() {
- var a = qa
- if (!a) return null
- var a = a.toLowerCase(),
- b = null
- if ((b = a.match(/angle \((.*)\)/))) (a = b[1]), (a = a.replace(/\s*direct3d.*$/, ''))
- a = a.replace(/\s*\([^\)]*wddm[^\)]*\)/, '')
- if (0 <= a.indexOf('intel')) {
- b = ['Intel']
- 0 <= a.indexOf('mobile') && b.push('Mobile')
- ;(0 <= a.indexOf('gma') || 0 <= a.indexOf('graphics media accelerator')) && b.push('GMA')
- if (0 <= a.indexOf('haswell')) b.push('Haswell')
- else if (0 <= a.indexOf('ivy')) b.push('HD 4000')
- else if (0 <= a.indexOf('sandy')) b.push('HD 3000')
- else if (0 <= a.indexOf('ironlake')) b.push('HD')
- else {
- 0 <= a.indexOf('hd') && b.push('HD')
- var c = a.match(na)
- c && c[1] && b.push(c[1].toUpperCase())
- }
- return (b = b.join(' '))
- }
- return 0 <= a.indexOf('nvidia') || 0 <= a.indexOf('quadro') || 0 <= a.indexOf('geforce') || 0 <= a.indexOf('nvs')
- ? ((b = ['nVidia']),
- 0 <= a.indexOf('geforce') && b.push('geForce'),
- 0 <= a.indexOf('quadro') && b.push('Quadro'),
- 0 <= a.indexOf('nvs') && b.push('NVS'),
- a.match(/\bion\b/) && b.push('ION'),
- a.match(/gtx\b/)
- ? b.push('GTX')
- : a.match(/gts\b/)
- ? b.push('GTS')
- : a.match(/gt\b/)
- ? b.push('GT')
- : a.match(/gs\b/)
- ? b.push('GS')
- : a.match(/ge\b/)
- ? b.push('GE')
- : a.match(/fx\b/) && b.push('FX'),
- (c = a.match(na)) && c[1] && b.push(c[1].toUpperCase().replace('GS', '')),
- 0 <= a.indexOf('titan') ? b.push('TITAN') : 0 <= a.indexOf('ti') && b.push('Ti'),
- (b = b.join(' ')))
- : 0 <= a.indexOf('amd') || 0 <= a.indexOf('ati') || 0 <= a.indexOf('radeon') || 0 <= a.indexOf('firegl') || 0 <= a.indexOf('firepro')
- ? ((b = ['AMD']),
- 0 <= a.indexOf('mobil') && b.push('Mobility'),
- (c = a.indexOf('radeon')),
- 0 <= c && b.push('Radeon'),
- 0 <= a.indexOf('firepro') ? b.push('FirePro') : 0 <= a.indexOf('firegl') && b.push('FireGL'),
- 0 <= a.indexOf('hd') && b.push('HD'),
- 0 <= c && (a = a.substring(c)),
- (c = a.match(na)) && c[1] && b.push(c[1].toUpperCase().replace('HD', '')),
- (b = b.join(' ')))
- : a.substring(0, 100)
- }
- var ra = 'microsoft basic render driver;vmware svga 3d;Intel 965GM;Intel B43;Intel G41;Intel G45;Intel G965;Intel GMA 3600;Intel Mobile 4;Intel Mobile 45;Intel Mobile 965'.split(';'),
- sa = 'ActiveXObject' in ca,
- va = ('devicePixelRatio' in ca && 1 < ca.devicePixelRatio) || (sa && 'matchMedia' in ca && ca.matchMedia('(min-resolution:144dpi)') && ca.matchMedia('(min-resolution:144dpi)').matches),
- wa = ma('windows nt'),
- xa = -1 !== ba.search(/windows nt [1-5]\./),
- ya = -1 !== ba.search(/windows nt 5\.[12]/),
- za = xa && !ya
- ma('windows nt 10')
- var Da = ma('windows phone'),
- Ea = ma('macintosh'),
- Fa = ma('Mb2345Browser'),
- Ga = ma('ipad;') || ma('ipad '),
- Ja = Ga && va,
- Ka = ma('ipod touch;'),
- La = ma('iphone;') || ma('iphone '),
- Ma = La || Ga || Ka,
- Na = Ma && -1 !== ba.search(/ os [456]_/)
- Ma && ba.search(/ os [4-8]_/)
- Ma && ba.search(/ os [78]_/)
- Ma && ma('os 8_')
- var Qa = Ma && ma('os 10_'),
- Ra = Ma && ma('os 15_'),
- Sa = ma('android'),
- Ta = 0
- Sa && (Ta = parseInt(ba.split('android ')[1]) || 0)
- var Ua = Sa && 4 > Ta
- ;(Sa && 5 <= Ta) || ba.search(/android 4.4/)
- var Va = Sa ? 'android' : Ma ? 'ios' : wa ? 'windows' : Ea ? 'mac' : 'other',
- Wa = sa && !ca.XMLHttpRequest,
- Xa = sa && !fa.querySelector,
- Ya = sa && !fa.addEventListener,
- Za = sa && ma('msie 9'),
- $a = sa && ma('msie 10'),
- ab = sa && ma('rv:11'),
- bb = Ya || Za,
- cb = ma('edge'),
- db = ma('qtweb'),
- eb = ma('ucbrowser'),
- fb = ma('alipay') || (Sa && eb),
- gb = ma('miuibrowser'),
- hb = ma('micromessenger'),
- ib = ma('mqqbrowser'),
- jb = ma('baidubrowser'),
- chrome = (ma('chrome') || ma('crios')) && !hb && !jb && !ib && !cb && !gb,
- kb = chrome && ma('chromium'),
- lb = chrome && !kb && (30 < parseInt(ba.split('chrome/')[1]) || 30 < parseInt(ba.split('crios/')[1])),
- mb = ma('firefox'),
- nb = mb && 27 < parseInt(ba.split('firefox/')[1]),
- ob = (Ea || Ma) && ma('safari') && ma('version/'),
- pb = Ea && ob && 7 < parseInt(ba.split('version/')[1]),
- qb = Ma && ma('aliapp'),
- rb = Ma && ((!ib && !eb && !hb && !chrome && !mb && !ob) || (qb && !eb)),
- sb = Sa || Ma || Da || ma('mobile'),
- tb = 'ontouchstart' in fa,
- ub = ca.navigator && ca.navigator.msPointerEnabled && !!ca.navigator.msMaxTouchPoints,
- vb = ca.navigator && !!ca.navigator.maxTouchPoints,
- wb = !tb && (vb || ub),
- xb = tb || wb,
- yb = (function () {
- if (!sb) return ca.devicePixelRatio || 1
- var a = document.getElementsByTagName('meta')
- if (window.parent && window.parent !== window)
- try {
- if (window.parent.location.origin === window.location.origin) a = window.parent.document.getElementsByTagName('meta')
- else return 1
- } catch (b) {
- return 1
- }
- for (var c = a.length - 1; 0 <= c; c -= 1)
- if ('viewport' === a[c].name) {
- var c = a[c].content,
- d
- ;-1 !== c.indexOf('initial-scale') && (d = parseFloat(c.split('initial-scale=')[1]))
- a = -1 !== c.indexOf('minimum-scale') ? parseFloat(c.split('minimum-scale=')[1]) : 0
- c = -1 !== c.indexOf('maximum-scale') ? parseFloat(c.split('maximum-scale=')[1]) : Infinity
- if (d) {
- if (c >= a) return d > c ? c : d < a ? a : d
- } else if (c >= a) return 1 <= a ? 1 : Math.min(c, 1)
- console && console.log && console.log('viewport\u53c2\u6570\u4e0d\u5408\u6cd5')
- return null
- }
- })(),
- zb = va && (!sb || (!!yb && 1 <= yb)),
- Ab = sa && 'transition' in ga.style,
- Bb = !!fa.createElementNS && !!fa.createElementNS('http://www.w3.org/2000/svg', 'svg').createSVGRect,
- Cb = fa.createElement('canvas'),
- Db = !(!Cb || !Cb.getContext),
- Eb = window.URL || window.webkitURL,
- Fb = !0 !== window.disableWorker && !sa && !cb && !(eb && Sa) && window.Worker && Eb && Eb.createObjectURL && window.Blob,
- Gb = '',
- qa = '',
- Jb = 0,
- Kb = window.forceWebGL ? { alpha: !0, antialias: !0, depth: !0 } : { alpha: !0, antialias: !0, depth: !0, failIfMajorPerformanceCaveat: !0, preserveDrawingBuffer: !0, stencil: !0 },
- Lb = (function () {
- if (!window.forceWebGL && (!Db || !Fb || (rb && qb && !eb))) return !1
- for (var a = ['webgl', 'experimental-webgl', 'moz-webgl'], b = null, c = 0; c < a.length; c += 1) {
- try {
- b = Cb.getContext(a[c], Kb)
- } catch (d) {}
- if (b) {
- if (b.drawingBufferWidth !== Cb.width || b.drawingBufferHeight !== Cb.height) break
- if (window.forceWebGL) return (Gb = a[c]), (Jb = Infinity), !0
- if (!b.getShaderPrecisionFormat || !b.getParameter || !b.getExtension) break
- Jb = b.getParameter(b.MAX_RENDERBUFFER_SIZE)
- var e = b.getParameter(b.MAX_VIEWPORT_DIMS)
- if (!e) break
- Jb = Math.min(Jb, e[0], e[1])
- ob && 'mac' === Va && (Jb = Math.min(Jb, 4096))
- e = Math.max(screen.width, screen.height)
- zb && (e *= Math.min(2, window.devicePixelRatio || 1))
- if (e > Jb) break
- if (23 > b.getShaderPrecisionFormat(35632, 36338).precision || 23 > b.getShaderPrecisionFormat(35633, 36338).precision) break
- qa = b.getExtension('WEBGL_debug_renderer_info') ? b.getParameter(37446) : null
- if ((b = pa()) && -1 !== ra.indexOf(b)) break
- Gb = a[c]
- return !0
- }
- }
- return !1
- })(),
- Mb = Lb && (lb || nb || pb) && ('mac' === Va || 'windows' === Va) && !sb,
- Nb = !window.Uint8Array || !Db || db || Da || (sb && mb) || Za || Na || Ja || Ka || Ua || ma('gt-n710') || za,
- Ob = !Nb && !Mb,
- Pb = Mb ? 'vw' : Nb ? 'd' : Ob ? 'dv' : 'v',
- Qb = ma('webkit'),
- Rb = 'WebKitCSSMatrix' in ca && 'm11' in new window.WebKitCSSMatrix(),
- Sb = 'MozPerspective' in ga.style,
- Tb = 'OTransition' in ga.style,
- Ub = Ab || Rb || Sb || Tb,
- Vb = void 0 !== config[8] ? config[8] : !0,
- Wb = void 0 !== config[9] ? config[9] : !0,
- Xb = void 0 !== config[10] ? config[10] : !0,
- Yb = void 0 !== config[11] ? config[11] : !0,
- Zb = void 0 !== config[12] ? config[12] : null,
- $b = !Bb && sb && Db,
- ac = !0
- try {
- if ('undefined' === typeof ca.localStorage) ac = !1
- else {
- var bc = new Date().getTime() + ''
- ca.localStorage.setItem('_test', bc)
- ca.localStorage.getItem('_test') !== bc && (ac = !1)
- ca.localStorage.removeItem('_test')
- }
- } catch (cc) {
- ac = !1
- }
- var dc = parseInt(ba.split('chrome/')[1]),
- ec = Vb && Db
- config.l = {
- Tra: Ga,
- Ura: La,
- size: La ? 100 : Sa ? 200 : 500,
- nz: Ea,
- $za: wa,
- ED: Ma,
- fFa: Qa,
- zJ: Ra,
- Xl: Sa,
- cma: Ua,
- L3: fb,
- Dz: Va,
- VH: jb,
- ewa: ib,
- AE: ob,
- C$: hb,
- Es: sa,
- zi: Wa,
- sv: Xa,
- j5: Za,
- i5: $a,
- Ue: Ya,
- l5: bb,
- Xra: ab,
- spa: cb,
- $ra: sa && !ab,
- Xta: Fa,
- Gv: ac,
- Ni: ec && ac && Yb && !sb && chrome,
- lf: Zb,
- geolocation: sb || (sa && !Ya) || cb,
- oza: eb,
- qL: eb && !chrome,
- chrome: chrome,
- j3: !0,
- bR: mb,
- ba: sb,
- jua: sb && Qb,
- G6: sb && Rb,
- iua: sb && ca.opera,
- Jc: va,
- yL: yb,
- ja: zb,
- Tf: xb,
- I6: ub,
- FT: vb,
- P7: wb,
- sna: chrome && 57 <= dc,
- tna: !sb && chrome && 64 <= dc,
- B$: Qb,
- Yra: Ab,
- CL: Rb,
- jqa: Sb,
- bva: Tb,
- RH: Ub,
- En: Bb,
- il: Db,
- GS: Fb,
- jA: Xb,
- Mf: Mb,
- y$: Gb,
- z$: Kb,
- TR: qa,
- Vta: Jb,
- AAa: !1,
- Xp: Vb && !Nb,
- T1: Vb ? Pb : 'd',
- p2: Vb ? Lb : !1,
- bL: ec,
- qp: Vb && Lb,
- rFa: Vb && (!Nb || Lb),
- wq: Wb && !!ca.WebSocket && !jb,
- cGa: $b,
- kva: Db || $b ? 'c' : 'd',
- }
- var fc = config
- config = void 0
- var gc = {
- overlay: ['style'],
- 'AMap.IndoorMap': ['AMap.CustomLayer', 'cvector'],
- 'AMap.IndoorMap3D': ['Map3D'],
- 'AMap.MarkerList': ['AMap.TplUtils'],
- Map3D: ['vectorlayer', 'wgl', 'AMap.CustomLayer', 'rbush'],
- 'AMap.Heatmap': ['AMap.CustomLayer'],
- 'AMap.DistrictLayer': ['MVT'],
- vectorForeign: ['gridmap', 'MVT'],
- 'AMap.GltfLoader': ['AMap.CustomLayer', 'Map3D'],
- 'AMap.LabelsLayer': ['rbush', 'promise'],
- }
- window.AMap
- ? ((window.AMap.version = '1630999129934'),
- (window.AMap.uL = {
- vM: function (a) {
- a(fc)
- },
- }))
- : (window.AMap = {
- version: '1630999129934',
- uL: {
- vM: function (a) {
- a(fc)
- },
- },
- })
- fc.Dk = '1630999129934'
- fc.Ru = gc
- for (
- var hc = document.head || document.getElementsByTagName('head')[0],
- ic =
- '.vml{behavior:url(#default#VML);display:inline-block;position:absolute}.amap-custom{top:0;left:0;position:absolute}.amap-container img{max-width:none!important;max-height:none!important}.amap-container{touch-action:none;position:relative;overflow:hidden;background:#fcf9f2 url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAfQAAAH0AgMAAAC2uDcZAAAADFBMVEX////////////////1pQ5zAAAABHRSTlMAgP/AWuZC2AAAAVhJREFUeAFiYGAQYGDEQjAB2rcDC4BiGIqiU7abdKlO2QkeIClyPsDHweMKtOPHIJ1Op6/w7Y4fdqfT6VpndzqdrnV2p9PpWmd3Oj3qWndSoKp+2J1Op7vr7E6n07XO7nQ6XevsTqfTtc7udPo4/f787E6n0911dqfT6VpndzqdrnV2p9PpWmd3Ot27Ce8m6HS6u85dR6fTtU7r6HS61mkdnU7XOrvT6XTvJuxOp9PddXan0+laZ3c6na51dDpd67SOTqd7N+HdBJ1Od9e56+h0utZpHZ1O1zq70+l0rbM7nU73bsLudDrdXWd3Ol3rtI5Op2ud1tHpdK3TOjqd7t2EdxN0Ot1dZ3c6na51dqfT6VpndzqdrnV2p9Pp3k3Q6XR3nbuOTqdrndbR6XSt0zo6na51Wken072bsDudTnfX2Z1Op2ud3el0utbZnU7XOq2j0+t0uncTD1gO4zoT5doZAAAAAElFTkSuQmCC);-ms-touch-action:none}.amap-drags,.amap-layers{width:100%;height:100%;position:absolute;overflow:hidden}.amap-layers canvas{-webkit-touch-callout:none;-webkit-user-select:none;-khtml-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.amap-layer img{pointer-events:none}.amap-e,.amap-maps{width:100%;height:100%}.amap-maps,.amap-e,.amap-layers,.amap-tile,.amap-tile-container{position:absolute;left:0;top:0;overflow:hidden}.amap-context{position:absolute;left:0;top:0}.amap-overlays,.amap-markers,.amap-marker{position:absolute;left:0;top:0}.amap-layers{z-index:0}.amap-overlays{z-index:110;cursor:default}.amap-markers{z-index:120}.amap-controls{z-index:150}.amap-copyright{position:absolute;display:block!important;left:77px;height:16px;bottom:0;padding-bottom:3px;font-size:11px;font-family:Arial,sans-serif;z-index:160}.amap-logo{position:absolute;bottom:1px;left:1px;z-index:160;height:20px}.amap-logo img{width:73px!important;height:20px!important;border:0;vertical-align:baseline!important}.amap-icon{position:relative;z-index:1}.amap-icon img{position:absolute;z-index:-1}.amap-marker-label{position:absolute;z-index:2;border:1px solid blue;background-color:white;white-space:nowrap;cursor:default;padding:3px;font-size:12px;line-height:14px}.amap-info{position:absolute;left:0;z-index:140;width:320px}.amap-menu{position:absolute;z-index:140;_width:100px}.amap-info-close{position:absolute;right:5px;_right:12px;+right:11px;top:5px;_top:2px;+top:2px;color:#c3c3c3;text-decoration:none;font:bold 16px/14px Tahoma,Verdana,sans-serif;width:14px;height:14px}.amap-info-outer,.amap-menu-outer{box-shadow:0 1px 2px rgba(0,0,0,0.1);background:none repeat scroll 0 0 white;border-radius:2px;padding:1px;text-align:left}.amap-menu-outer:hover{box-shadow:0 1px 2px rgba(0,0,0,0.3)}.amap-info-contentContainer:hover .amap-info-outer{box-shadow:0 1px 2px rgba(0,0,0,0.3)}.amap-info-content{position:relative;background:#fff;padding:10px 18px 10px 10px;line-height:1.4;overflow:auto}.amap-marker-content{position:relative}.amap-info{_width:320px}.amap-menu{_width:100px}.amap-info-sharp-old{overflow:hidden;position:absolute;background-image:url(http://webapi.amap.com/images/arrows.png)}.bottom-center .amap-info-sharp-old{height:12px;margin:0 auto;width:20px;background-position:center 12px;top:100%;margin-top:-9px;left:50%;margin-left:-10px}.bottom-left .amap-info-sharp-old{height:12px;width:13px;background-position:-16px -46px;top:100%;margin-top:-9px}.bottom-right .amap-info-sharp-old{height:12px;width:13px;top:-1px;background-position:-56px -46px;left:100%;margin-left:-13px;top:100%;margin-top:-9px}.middle-left .amap-info-sharp-old{height:20px;width:12px;background-position:left;top:50%;margin-top:-10px;margin-left:-11px}.center .amap-info-sharp-old{display:none}.middle-right .amap-info-sharp-old{height:20px;margin-right:0;width:12px;background-position:right;left:100%;margin-left:-9px;top:50%;margin-top:-10px}.top-center .amap-info-sharp-old{height:12px;margin:0 auto;width:20px;background-position:top;top:0;margin-top:-3px;left:50%;margin-left:-10px}.top-left .amap-info-sharp-old{height:12px;width:13px;background-position:-16px -3px;top:0;margin-top:-3px}.top-right .amap-info-sharp-old{height:12px;width:13px;background-position:-56px -3px;left:100%;margin-left:-13px;top:0;margin-top:-3px}.amap-info-sharp{position:absolute}.bottom-center .amap-info-sharp{bottom:0;left:50%;margin-left:-8px;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid #fff}.bottom-center .amap-info-sharp:after{position:absolute;content:"";margin-left:-8px;margin-top:-7px;border-left:8px solid transparent;border-right:8px solid transparent;border-top:8px solid rgba(0,0,0,0.3);filter:blur(2px);z-index:-1}.amap-info-contentContainer:hover.bottom-center .amap-info-sharp:after{border-top:8px solid rgba(0,0,0,0.5)}.bottom-left .amap-info-sharp{border-color:transparent #fff;border-width:0 0 10px 10px;border-style:solid}.bottom-left .amap-info-sharp:after{position:absolute;content:"";margin-left:-10px;border-color:transparent rgba(0,0,0,0.3);border-width:0 0 10px 10px;border-style:solid;filter:blur(1px);z-index:-1}.amap-info-contentContainer:hover.bottom-left .amap-info-sharp:after{border-color:transparent rgba(0,0,0,0.5)}.bottom-left .amap-info-content{border-radius:2px 2px 2px 0}.bottom-right .amap-info-sharp{right:0;border-top:10px solid #fff;border-left:10px solid transparent}.bottom-right .amap-info-sharp:after{position:absolute;margin-top:-9px;margin-left:-10px;content:"";border-top:10px solid rgba(0,0,0,0.3);border-left:10px solid transparent;filter:blur(1px);z-index:-1}.amap-info-contentContainer:hover.bottom-right .amap-info-sharp:after{border-top:10px solid rgba(0,0,0,0.5)}.bottom-right .amap-info-content{border-radius:2px 2px 0 2px}.top-center .amap-info-sharp{top:0;left:50%;margin-left:-8px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid #fff}.top-center .amap-info-sharp:after{position:absolute;content:"";margin-top:0;margin-left:-8px;border-left:8px solid transparent;border-right:8px solid transparent;border-bottom:8px solid rgba(0,0,0,0.3);filter:blur(1px);z-index:-1}.top-left .amap-info-sharp{left:0;top:0;border-bottom:10px solid #fff;border-right:10px solid transparent}.top-left .amap-info-sharp:after{position:absolute;content:"";margin-top:0;margin-left:0;border-bottom:10px solid rgba(0,0,0,0.3);border-right:10px solid transparent;filter:blur(1px);z-index:-1}.top-right .amap-info-sharp{right:0;top:0;border-bottom:10px solid #fff;border-left:10px solid transparent}.top-right .amap-info-sharp:after{position:absolute;content:"";margin-top:0;margin-left:-10px;border-bottom:10px solid rgba(0,0,0,0.3);border-left:10px solid transparent;filter:blur(1px);z-index:-1}.middle-right .amap-info-sharp{right:0;top:50%;margin-top:-8px;border-top:8px solid transparent;border-left:8px solid #fff;border-bottom:8px solid transparent}.middle-right .amap-info-sharp:after{position:absolute;content:"";margin-top:-8px;margin-left:-8px;border-top:8px solid transparent;border-left:8px solid rgba(0,0,0,0.3);border-bottom:8px solid transparent;filter:blur(1px);z-index:-1}.amap-info-contentContainer:hover.middle-right .amap-info-sharp:after{border-left:8px solid rgba(0,0,0,0.5)}.middle-left .amap-info-sharp{left:0;top:50%;margin-top:-8px;border-top:8px solid transparent;border-right:8px solid #fff;border-bottom:8px solid transparent}.middle-left .amap-info-sharp:after{position:absolute;content:"";margin-top:-8px;margin-left:0;border-top:8px solid transparent;border-right:8px solid rgba(0,0,0,0.3);border-bottom:8px solid transparent;filter:blur(1px);z-index:-1}.amap-info-contentContainer:hover.middle-left .amap-info-sharp:after{border-right:8px solid rgba(0,0,0,0.5)}.amap-info-contentContainer.top-left,.amap-info-contentContainer.top-center,.amap-info-contentContainer.top-right{padding-top:8px}.amap-info-contentContainer.bottom-left,.amap-info-contentContainer.bottom-center,.amap-info-contentContainer.bottom-right{padding-bottom:8px}.amap-info-contentContainer.middle-right{padding-right:8px}.amap-info-contentContainer.middle-left{padding-left:8px}.amap-menu-outer{margin:0;padding:0;list-style-type:none}ul.amap-menu-outer li{cursor:pointer;height:35px;line-height:35px;word-break:break-all;padding:0 10px;font-size:12px;white-space:nowrap}ul.amap-menu-outer li a{text-decoration:none;font-size:13px;margin:0 5px;color:#000;padding:5px 5px}ul.amap-menu-outer li:hover{background-color:#f3f3ee}.amap-overlay-text-container{display:block;width:auto;word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;background:#fff;padding:2px 3px;border:1px solid #ccc;border-radius:3px}.amap-overlay-text-container.amap-overlay-text-empty{display:none}.amap-info-content-ie8{border:1px solid #9c9c9c}'.replace(
- /url\((['"]?)(?:\.\.\/)+/g,
- 'url($1' + fc[2].split(',')[0] + '/'
- ),
- jc = null,
- kc = 0,
- lc = hc.childNodes.length;
- kc < lc;
- kc++
- )
- if (1 === hc.childNodes[kc].nodeType) {
- jc = hc.childNodes[kc]
- break
- }
- if (ic)
- if (hc) {
- var mc = document.createElement('style')
- mc.setAttribute('type', 'text/css')
- mc.setAttribute('class', 'AMap.style')
- mc.styleSheet ? (mc.styleSheet.cssText = ic) : (mc.innerHTML = ic)
- jc ? hc.insertBefore(mc, jc) : hc.appendChild(mc)
- } else document.write("<style type='text/css'>" + ic + '</style>')
- var g = g || { Ca: { Je: 0, kr: [], Fj: {} } },
- z = { o: {}, control: {}, B: {} }
- g.ODa = (function (a) {
- var b = Function
- return function () {
- return new b('return ' + a)()
- }
- })()
- g.CLASS_NAME = 'AMap'
- g.c = g.BuryPoint = {}
- g.c.add = g.BuryPoint.add = function (a, b, c) {
- a.w5 || a.C || !(a = a.CLASS_NAME) || ((a = a.replace('AMap.', '')), g.zA.lp(a, b, c))
- }
- var nc = { lang: 1, baseRender: 1, overlayRender: 1, viewMode: 1 }
- g.c.ya = g.BuryPoint.addOptions = function (a, b) {
- if (!a.dva)
- if (b && (b.innerLayer || b.innerOverlay)) a.w5 = !0
- else {
- a.dva = !0
- var c = a.CLASS_NAME
- if (c) {
- c = c.replace('AMap.', '')
- g.zA.lp(c)
- b = b || {}
- for (var d in b) b.hasOwnProperty(d) && ('Map' === c && d in nc ? g.zA.lp(c, d, b[d]) : g.zA.lp(c, d))
- }
- }
- }
- g.da = function () {}
- g.da.extend = g.da.extend = function (a) {
- function b() {}
- function c() {
- var a = this.initialize || this.A
- a && a.apply(this, arguments)
- if (!d && this.Mi) {
- a = document.createElement('style')
- a.setAttribute('type', 'text/css')
- this.CLASS_NAME && a.setAttribute('class', this.CLASS_NAME)
- this.Mi = this.Mi.replace(/url\((['"]?)(?:\.\.\/)*/g, 'url($1' + g.r.Gb + '/')
- a.styleSheet ? (a.styleSheet.cssText = this.Mi) : (a.innerHTML = this.Mi)
- for (var b = document.head || document.getElementsByTagName('head')[0], c = null, e = 0, f = b.childNodes.length; e < f; e++)
- if (1 === b.childNodes[e].nodeType) {
- c = b.childNodes[e]
- break
- }
- c ? b.insertBefore(a, c) : b.appendChild(a)
- }
- d = !0
- }
- var d = !1
- b.prototype = this.prototype
- var e = new b()
- e.constructor = c
- c.prototype = e
- c.prototype.Ch = c.prototype['super'] = function (a) {
- return a.callee.ma.apply(this, a)
- }
- for (var f in this) this.hasOwnProperty(f) && 'prototype' !== f && (c[f] = this[f])
- a.t9 && (g.extend(c, a.t9), (a.t9 = null))
- a.ka && (g.extend.apply(null, [e].concat(a.ka)), (a.ka = null))
- a.w && e.w && (a.w = g.extend({}, e.w, a.w))
- var h = e.constructor.wsa,
- k = {}
- if (void 0 !== h) for (f in h) h.hasOwnProperty(f) && (k[h[f]] = f)
- for (f in a)
- if (Object.prototype.hasOwnProperty.call(a, f)) {
- var l = f,
- m = f
- h && k[f] && (m = k[f])
- 'function' === typeof a[l] && 'function' === typeof e[m] && (a[l].ma = e[m])
- }
- g.extend(e, a)
- a.toString && (e.toString = a.toString)
- c.bd = this.prototype
- return c
- }
- g.da.Hb = g.da.include = function (a) {
- g.extend(this.prototype, a)
- }
- g.extend = function (a) {
- var b = Array.prototype.slice.call(arguments, 1),
- c,
- d,
- e,
- f
- d = 0
- for (e = b.length; d < e; d += 1)
- if (((f = b[d] || {}), Object.assign)) Object.assign(a, f)
- else for (c in f) Object.prototype.hasOwnProperty.call(f, c) && (a[c] = f[c])
- return a
- }
- g.da.Xb = function (a) {
- for (var b in a)
- if (a.hasOwnProperty(b)) {
- var c = a[b]
- if ('string' === typeof c) this.prototype[b] && (this.prototype[c] = this.prototype[b])
- else for (var d = 0, e = c.length; d < e; d++) this.prototype[b] && (this.prototype[c[d]] = this.prototype[b])
- }
- }
- g.zA = {
- Fj: {},
- getKey: function (a, b) {
- a = a || ''
- return void 0 !== b && a ? a + '@' + b : a
- },
- lp: function (a, b, c) {
- this.Fj[a] || (this.Fj[a] = {})
- b = this.getKey(b, c)
- void 0 == this.Fj[a][b] && (this.Fj[a][b] = 0)
- },
- send: function () {
- var a = [],
- b
- for (b in this.Fj)
- if (this.Fj.hasOwnProperty(b)) {
- var c = this.Fj[b],
- d = [],
- e
- for (e in c) c.hasOwnProperty(e) && 0 == c[e] && (d.push(e), (c[e] = 1))
- d.length && a.push(b + '~' + d.join(','))
- }
- a.length &&
- ((a = ['type=nfl', 'k=' + g.r.key, 'm=' + (g.l.ba ? 1 : 0), 'pf=' + g.l.Dz, 'v=' + g.r.ln, 'branch=JSAPI', 'log=' + a.join('!')]),
- (a = g.r.tc + '://webapi.amap.com/count?' + a.join('&')),
- new g.jb.zb(a))
- },
- }
- setInterval(function () {
- g.zA.send()
- }, 1e4)
- g.va = {
- h: function (a, b, c, d, e) {
- if (this.ve(a, b, c || this)) return this
- var f = (this.mf = this.mf || {})
- f[a] = f[a] || []
- e ? f[a].unshift({ xb: b, bf: c || this, Cj: d }) : f[a].push({ xb: b, bf: c || this, Cj: d })
- return this
- },
- ve: function (a, b, c) {
- var d = this.mf
- if (b && c) {
- if (d && a in d && d[a]) for (var e = 0; e < d[a].length; e += 1) if (d[a][e].xb === b && d[a][e].bf === c) return !0
- return !1
- }
- return d && a in d && d[a] && 0 < d[a].length
- },
- G: function (a, b, c) {
- if (!this.ve(a)) return this
- var d = this.mf
- if (d && d[a])
- for (var e = 0; e < d[a].length; e += 1)
- if (!((d[a][e].xb !== b && 'mv' !== b) || (c && d[a][e].bf !== c))) {
- d[a].splice(e, 1)
- d[a].length || (d[a] = null)
- break
- }
- return this
- },
- cK: function (a, b) {
- if (!this.ve(a)) return this
- var c = this.mf
- if (c && c[a])
- for (var d = 0; d < c[a].length; d += 1)
- if (!b || c[a][d].bf === b) {
- c[a].splice(d, 1)
- c[a].length || (c[a] = null)
- break
- }
- return this
- },
- q: function (a, b) {
- if (!this.ve(a)) return this
- var c = { type: a }
- void 0 !== b &&
- (b instanceof Array
- ? ((c = b.slice(0)), (c.type = a))
- : 'string' === typeof b || 'number' === typeof b || 'boolean' === typeof b
- ? (c.value = b)
- : g.a.EJ(b)
- ? (c.value = b)
- : (c = g.extend(c, b)))
- for (var d = [].concat(this.mf[a]), e = 0; e < d.length; e += 1) d[e].xb && (d[e].xb.call(d[e].bf || this, c), d[e] && d[e].Cj && this.mf[a] && this.mf[a].splice(e, 1))
- return this
- },
- ti: function (a) {
- a ? this.mf && this.mf[a] && (this.mf[a] = null) : (this.mf = null)
- return this
- },
- }
- g.va.on || (g.va.on = g.va.h)
- g.va.off || (g.va.off = g.va.G)
- g.va.emit || (g.va.emit = g.va.q)
- g.Ze = {
- set: function (a, b, c) {
- var d = this.Hl
- if (d && d[a]) {
- var d = d[a],
- e = 'set' + this.I4(a)
- if (d[e]) {
- var f = !1
- !0 == d.C ? (f = !0) : (d.C = !0)
- d[e](b, c)
- f || (d.C = !1)
- c || this.BK(a, b)
- } else d.set(a, b, c)
- } else ((this.Ce = this.Ce || {})[a] = b), c || this.BK(a, b)
- },
- I4: (function () {
- var a = {}
- return function (b) {
- a[b] || (a[b] = b.charAt(0).toUpperCase() + b.substr(1))
- return a[b]
- }
- })(),
- get: function (a, b, c) {
- var d,
- e = this.Hl
- d = 'get' + this.I4(a)
- if (e && e[a]) return (c = e[a]), c[d] ? ((a = !1), !0 == c.C ? (a = !0) : (c.C = !0), (b = c[d](b)), a || (c.C = !1), b) : c.get(a, b)
- if (!c && this[d]) return (a = !1), !0 == this.C ? (a = !0) : (this.C = !0), (b = this[d](b)), a || (this.C = !1), b
- if (this.Ce && this.Ce.hasOwnProperty(a)) return this.Ce[a]
- },
- X: function (a, b, c) {
- this.Hl || (this.Hl = {})
- this.Hl[a] !== b &&
- (b.h(
- a,
- function (b) {
- this.BK(a, b)
- },
- this
- ),
- (this.Hl[a] = b),
- c || this.BK(a))
- },
- af: function (a, b, c) {
- for (var d = 0; d < a.length; d += 1) this.X(a[d], b, !c)
- },
- xl: function (a) {
- this.Hl && this.Hl[a] && (this.Hl[a].G(a, 'mv', this), (this.Hl[a] = void 0))
- },
- yl: function () {
- if (this.Hl) for (var a in this.Hl) this.Hl.hasOwnProperty(a) && this.xl(a)
- },
- BK: function (a, b) {
- var c = a + 'Changed'
- if (this[c]) this[c](b)
- this.q(a, b)
- },
- vFa: function (a, b, c) {
- var d = new (g.da.extend({ ka: [g.va, g.Ze] }))()
- d.bQ = function () {
- for (var b = !0, e = 0; e < a.length; e += 1) d.get(a[e]) || (b = !1)
- b && (d.yl(), c())
- }
- for (var e = 0; e < a.length; e += 1) d.X(a[e], b)
- },
- jf: function (a, b) {
- var c, d
- for (c in a) a.hasOwnProperty(c) && ((d = a[c]), this.set(c, d, b))
- },
- }
- g.r = {
- localStorage: !0,
- QH: 500,
- Ae: !0,
- De: { dark: '#202020', blue_night: '#090d20', test: '#033447', mapv: '#000001', techblue: '#000b11', insight: '#19212a', default: '#fcf9f2' },
- dK: { normal: 'normal', dark: 'dark', light: 'light', fresh: 'fresh', test: 'blue', blue_night: 'blue', mapv: 'darkblue', insight: 'grey' },
- key: 'e661b00bdf2c44cccf71ef6070ef41b8',
- tc: 'http',
- Rd: [115.423412, 39.442759, 117.514625, 41.060816, 116.405285, 39.904989],
- Zd: 'http://restapi.amap.com',
- Gb: 'http://webapi.amap.com',
- oK: 'http://gaode.com',
- Iv: 'http://m.amap.com',
- OD: 'http://webrd0{1,2,3,4}.is.autonavi.com/appmaptile?lang=[lang]&size=1&scale=1&style=8&x=[x]&y=[y]&z=[z]',
- SJ: 'http://wprd0{1,2,3,4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x=[x]&y=[y]&z=[z]&scl=1<ype=3',
- xU: 'http://webst0{1,2,3,4}.is.autonavi.com/appmaptile?style=6&x=[x]&y=[y]&z=[z]',
- OK: 'http://webst0{1,2,3,4}.is.autonavi.com/appmaptile?x=[x]&y=[y]&z=[z]&lang=zh_cn&size=1&scale=1&style=8',
- PK: 'http://wprd0{1,2,3,4}.is.autonavi.com/appmaptile?x=[x]&y=[y]&z=[z]&lang=zh_cn&size=1&scl=1&style=8<ype=11',
- TE: 'http://wprd0{1,2,3,4}.is.autonavi.com/appmaptile?lang=[lang]&size=1&style=7&x=[x]&y=[y]&z=[z]',
- wL: 'http://vector.amap.com',
- vL: 'vdata.amap.com',
- eAa: 'ws',
- SI: 'http://a.amap.com/jsapi/static/image/',
- Vn: 0,
- }
- function oc(a) {
- g.da.Ru = a.Ru
- g.l = a.l
- g.Qva = a[7]
- a.l = null
- g.r.Gb = a[2].split(',')[0]
- g.r.Dk = a.Dk
- g.r.MJ = a.MJ
- var b = (g.r.tc = g.r.Gb.split(':')[0])
- 'https' === b &&
- ((g.r.eAa = 'wss'),
- (g.r.Zd = g.r.Zd.replace('http', 'https')),
- (g.r.OD = g.r.OD.replace('http', 'https')),
- (g.r.SJ = g.r.SJ.replace('http', 'https')),
- (g.r.xU = g.r.xU.replace('http', 'https')),
- (g.r.OK = g.r.OK.replace('http', 'https')),
- (g.r.PK = g.r.PK.replace('http', 'https')),
- (g.r.TE = g.r.TE.replace('http', 'https')),
- (g.r.wL = g.r.wL.replace('http', 'https')),
- (g.r.SI = g.r.SI.replace('http', 'https')))
- var c = window.location.href
- 0 !== c.indexOf('http') && window.parent && window.parent !== window && (c = window.parent.location.href)
- ;-1 != c.indexOf('?') && (c = c.substr(0, c.indexOf('?')))
- g.r.cqa = c
- c = encodeURIComponent(c)
- g.r.Up = c
- g.r.Hi = g.r.Gb + '/theme/v1.3/markers/' + (g.l.Jc ? 'b' : 'n')
- var d = document.createElement('style')
- d.type = 'text/css'
- g.r.Boa = 'url(' + b + '://webapi.amap.com/theme/v1.3/openhand.cur),default'
- var e = '.amap-container{cursor:' + g.r.Boa + ';}.amap-drag{cursor:url(' + b + '://webapi.amap.com/theme/v1.3/closedhand.cur),default;}'
- d.styleSheet
- ? ((b = function () {
- try {
- d.styleSheet.cssText = e
- } catch (a) {}
- }),
- d.styleSheet.disabled ? setTimeout(b, 10) : b())
- : d.appendChild(document.createTextNode(e))
- ;(document.head || document.getElementsByTagName('head')[0]).appendChild(d)
- g.r.mode = Number(a[3])
- g.r.Rd = a[1]
- g.r.key = a[0]
- g.r.ln = a[4]
- g.r.Mc = a[5]
- g.r.Nla = a[6]
- g.r.RQ = a[13]
- pc()
- }
- function pc() {
- try {
- if (window.localStorage)
- for (var a = window.localStorage.length; 0 <= a; a -= 1) {
- var b = window.localStorage.key(a)
- if (b && '_AMap_' === b.slice(0, 6)) {
- var c = window.localStorage.getItem(b),
- c = JSON.parse(c || {})
- '_AMap_anole' === b
- ? c.version !== g.l.lf && window.localStorage.removeItem(b)
- : '_AMap_data.tileKeys' === b
- ? (c.vdataVer === g.l.lf && c.apiVer === g.r.Dk) || window.localStorage.removeItem(b)
- : c.version !== g.r.Dk && window.localStorage.removeItem(b)
- }
- }
- } catch (d) {}
- }
- window.AMap && window.AMap.uL && window.AMap.uL.vM && window.AMap.uL.vM(oc)
- g.Lm = { Pu: Math.PI / 180, iwa: 180 / Math.PI, PQ: 6378137 }
- ;(function () {
- function a(a) {
- return 'undefined' === typeof a ? '' : a
- }
- g.$h = {
- era: function (b) {
- b.name = a(b.name)
- var c = [b.y, b.x, b.name]
- if (g.l.ba) {
- var d = [g.r.Iv + '/callAPP?', 'src=jsapi_q']
- d.push('&ios=' + encodeURIComponent('viewMap?sourceApplication=jsapi_q&dev=0&poiname=' + b.name + '&lat=' + b.y + '&lon=' + b.x))
- d.push('&android=' + encodeURIComponent('androidamap?action=shorturl&q=' + c.join(',') + '&sourceApplication=jsapi_q'))
- d.push('&wp=' + encodeURIComponent('viewMap?sourceApplication=jsapi_q&dev=0&poiname=' + b.name + '&lat=' + b.y + '&lon=' + b.x))
- d.push('&mo=' + encodeURIComponent(g.r.Iv + '?q=' + c.join(',') + '&callapp=0&sourceApplication=jsapi_q'))
- return d.join('')
- }
- return g.r.oK + '?q=' + c.join(',') + '&src=jsapi_q'
- },
- u4: function (b) {
- b.name = a(b.name)
- b.address = a(b.address)
- b.x = a(b.x)
- b.y = a(b.y)
- var c = [b.id, b.y, b.x, b.name, b.address]
- if (g.l.ba) {
- var d = [g.r.Iv + '/callAPP?', 'src=jsapi_p']
- d.push('&ios=' + encodeURIComponent('multiPointShow?sourceApplication=jsapi_p&dev=0&q=' + [b.y, b.x, b.name, b.address, b.id].join() + '&title=' + b.name))
- d.push('&android=' + encodeURIComponent('androidamap?action=shorturl&p=' + c.join(',') + '&sourceApplication=jsapi_p'))
- d.push('&wp=' + encodeURIComponent('multiPointShow?sourceApplication=jsapi_p&dev=0&q=' + [b.y, b.x, b.name, b.address, b.id].join() + '&title=' + b.name))
- return d.join('')
- }
- return g.r.oK + '?p=' + c.join(',') + '&src=jsapi_p'
- },
- s4: function (b) {
- if (g.l.ba) {
- var c = [g.r.Iv + '/callAPP?', 'src=jsapi_detail']
- c.push('&ios=' + encodeURIComponent('viewPOIDetail?sourceApplication=jsapi_detail&poiid=' + b.id))
- b.name = a(b.name)
- b.x = a(b.x)
- b.y = a(b.y)
- c.push(
- '&android=' +
- encodeURIComponent(
- 'androidamap?action=openFeature&featureName=PoiDetail&poiid=' + b.id + '&poiname=' + b.name + '&x=' + b.x + '&y=' + b.y + '&sourceApplication=jsapi_detail'
- )
- )
- c.push('&wp=' + encodeURIComponent('viewPOIDetail?sourceApplication=jsapi_detail&poiid=' + b.id))
- c.push('&mo=' + encodeURIComponent(g.r.Iv + '/detail/index/poiid=' + b.id + '&sourceApplication=jsapi_detail'))
- return c.join('')
- }
- return g.r.oK + '/detail/' + b.id + '?src=jsapi_detail'
- },
- KR: function (b) {
- b.sname = a(b.sname)
- '' === b.sname && (b.sname = '\u8d77\u70b9')
- b.dname = a(b.dname)
- '' === b.dname && (b.dname = '\u7ec8\u70b9')
- b.mcount = a(b.mcount)
- b.my = a(b.my)
- b.mx = a(b.mx)
- b.mname = a(b.mname)
- var c = [b.sy, b.sx, b.sname, b.dy, b.dx, b.dname, b.m, b.t, b.mcount, b.my, b.mx, b.mname]
- if (g.l.ba) {
- var d = [g.r.Iv + '/callAPP?', 'src=jsapi_r_' + b.t]
- d.push(
- '&ios=' +
- encodeURIComponent(
- 'path?sourceApplication=jsapi_r_' +
- b.t +
- '&dev=0&slat=' +
- b.sy +
- '&slon=' +
- b.sx +
- '&sname=' +
- b.sname +
- '&dlat=' +
- b.dy +
- '&dlon=' +
- b.dx +
- '&dname=' +
- b.dname +
- '&m=' +
- b.m +
- '&t=' +
- b.t +
- '&vian=0&vialons=&vialats=&vianames='
- )
- )
- var e = b.t
- 0 === b.t ? (e = 2) : 2 === b.t && (e = 4)
- d.push(
- '&android=' +
- encodeURIComponent(
- 'androidamap://route?sourceApplication=jsapi_r_' +
- b.t +
- '&slat=' +
- b.sy +
- '&slon=' +
- b.sx +
- '&sname=' +
- b.sname +
- '&dlat=' +
- b.dy +
- '&dlon=' +
- b.dx +
- '&dname=' +
- b.dname +
- '&dev=0&' +
- b.m +
- '&t=' +
- e
- )
- )
- d.push(
- '&wp=' +
- encodeURIComponent(
- 'path?sourceApplication=jsapi_r_' +
- b.t +
- '&dev=0&slat=' +
- b.sy +
- '&slon=' +
- b.sx +
- '&sname=' +
- b.sname +
- '&dlat=' +
- b.dy +
- '&dlon=' +
- b.dx +
- '&dname=' +
- b.dname +
- '&m=' +
- b.m +
- '&t=' +
- b.t +
- '&vian=0&vialons=&vialats=&vianames='
- )
- )
- d.push('&mo=' + encodeURIComponent(g.r.Iv + '/?r=' + c.join(',') + '&callapp=0&sourceApplication=jsapi_r_' + b.t))
- return d.join('')
- }
- return g.r.oK + '?r=' + c.join(',') + 'src=jsapi_r_' + b.t
- },
- mt: function (a) {
- g.l.ba ? (window.location.href = a) : window.open(a)
- },
- }
- })()
- 'function' !== typeof Object.keys &&
- (Object.keys = function (a) {
- var b = [],
- c
- for (c in a) a.hasOwnProperty(c) && b.push(c)
- return b
- })
- g.a = {
- CLASS_NAME: 'AMap.Util',
- cL: [],
- Fa: 268435456,
- bp: [215440491, 106744817],
- Bw: (function () {
- var a = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('')
- return function (b, c) {
- var d = [],
- e
- c = c || a.length
- if (b) for (e = 0; e < b; e++) d[e] = a[0 | (Math.random() * c)]
- else {
- var f
- d[8] = d[13] = d[18] = d[23] = '-'
- d[14] = '4'
- for (e = 0; 36 > e; e++) d[e] || ((f = 0 | (16 * Math.random())), (d[e] = a[19 === e ? (f & 3) | 8 : f]))
- }
- return d.join('')
- }
- })(),
- iR: {
- start: function (a) {
- a.startTime = new Date()
- a.kt = []
- var b = new Date().getTime()
- a.id = requestAnimationFrame(function d() {
- var e = new Date().getTime()
- a.kt.push(e - b)
- b = e
- a.id = requestAnimationFrame(d)
- })
- },
- cancel: function (a) {
- a.id && cancelAnimationFrame(a.id)
- },
- stop: function (a) {
- a.goa = new Date() - a.startTime
- this.cancel(a)
- a.iR = Math.round(1e3 / (a.goa / (a.kt.length + 1)))
- },
- },
- F4: function (a, b, c) {
- var d = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : !1
- if (a === b) return b
- switch (3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : 'linear') {
- case 'ease':
- c = g.Kw.EI(0.25, 0.1, 0.25, 1)(c)
- break
- case 'ease-in':
- c = g.Kw.EI(0.42, 0, 1, 1)(c)
- break
- case 'ease-out':
- c = g.Kw.EI(0, 0, 0.58, 1)(c)
- break
- case 'ease-in-out':
- c = g.Kw.EI(0.42, 0, 0.58, 1)(c)
- }
- var e = a + (b - a) * c
- d && (e >>= 0)
- return e
- },
- createObjectURL: function (a) {
- var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 'text/javascript; charset=utf-8',
- c = null
- try {
- c = (window.URL || window.webkitURL).createObjectURL(new Blob([a], { type: b }))
- } catch (d) {
- c = null
- }
- return c
- },
- revokeObjectURL: function (a) {
- ;(window.URL || window.webkitURL).revokeObjectURL(a)
- },
- LCa: function (a) {
- for (var b = {}, c = 0, d = a.length; c < d; c++) b[a[c]] = c
- return b
- },
- mD: function (a) {
- var b = {}
- if (g.a.jk(a, 'object')) for (var c in a) a.hasOwnProperty(c) && (b[a[c]] = c)
- return b
- },
- Of: function (a, b) {
- for (var c = 0, d = b.length; c < d; c += 1) a.push(b[c])
- },
- create:
- 'function' === typeof Object.create
- ? Object.create
- : function (a, b) {
- function c() {}
- c.prototype = a
- var d = new c(),
- e
- for (e in b) b.hasOwnProperty(e) && (d[e] = b[e])
- return d
- },
- cb: function (a) {
- if ('object' === typeof a && null !== a) {
- if (a.V6 || this.jk(a, 'Float32Array') || this.jk(a, 'Uint16Array')) return a
- var b = this.isArray(a) ? [] : {},
- c
- for (c in a) a.hasOwnProperty(c) && (b[c] = g.a.cb(a[c]))
- return b
- }
- return a
- },
- J5: function (a) {
- return (a | 0) === a
- },
- Exa:
- 'function' === typeof Object.setPrototypeOf
- ? Object.setPrototypeOf
- : function (a, b) {
- for (var c in b) a[c] = b[c]
- },
- Ph: function (a) {
- return 'function' === typeof a
- },
- gma: function (a) {
- var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : 'webgl'
- if (!a) return a
- for (var c = [], d = 0, e = a.length; d < e; d += 2) {
- var f = parseInt(a.substr(d, 2), 16)
- if ('webgl' === b || ('rgba' === b && 0 === d)) f = this.wb(f / 255, 3)
- c.push(f)
- }
- c.push(c.shift())
- return c
- },
- Rs: function () {},
- keys:
- 'function' === typeof Object.keys
- ? Object.keys
- : function (a) {
- var b = [],
- c
- for (c in a) a.hasOwnProperty(c) && b.push(c)
- return b
- },
- map: function (a, b) {
- var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null,
- d = []
- if (a && a.length)
- g.a.Tb(a, function () {
- for (var e = arguments.length, f = Array(e), h = 0; h < e; h++) f[h] = arguments[h]
- d[f[1]] = b.apply(c || a, f)
- })
- else return a
- return d
- },
- forEach: function (a, b) {
- if (a && a.length) {
- var c = a.length
- if (0 < c && (b(a[0], 0), 1 < c)) {
- b(a[1], 1)
- for (var d = 2; d < c; d++) b(a[d], d)
- }
- }
- },
- Tb: function (a, b) {
- var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null
- if (a && a.length) for (var d = 0, e = a.length; d < e && !1 !== b.call(c, a[d], d, a); d++);
- },
- find: function (a, b) {
- for (var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null, d = 0, e = a.length; d < e; d++)
- if ('function' === typeof b) {
- if (b.call(c, a[d], d, a)) return a[d]
- } else if (a[d] === b) return a[d]
- return null
- },
- EJ: function (a) {
- return 'object' === typeof HTMLElement ? a instanceof HTMLElement : a && 'object' === typeof a && 1 === a.nodeType && 'string' === typeof a.nodeName
- },
- xw: function (a, b) {
- var c = 'ASDFGHJKLQWERTYUIO!sdfghjkleiu3~yr5-P&mq9`%zCN*b=8@^xpVM',
- d,
- e
- 'v5' < (b || 'v5') ? ((d = c.length), (e = 512)) : ((d = 27), (c = c.substr(0, 27)), (e = 333))
- var f, h, k, l, m
- h = []
- k = NaN
- l = 0
- for (m = a.length; l < m; l++) (f = a[l]), (f = c.indexOf(f)), isNaN(k) ? (k = f * d) : (h.push(k + f - e), (k = NaN))
- return h
- },
- nxa: function (a, b) {
- for (var c = 1, c = 512 < b.length ? Math.round(Math.pow(b.length, 0.5)) : b.length, d = Math.ceil(b.length / c), e = 0; e < d; e += 1) {
- var f = c * e,
- h = f + c
- h > b.length && (h = b.length)
- for (; f < h; f += 1) a(b[f])
- }
- },
- jDa: function (a) {
- if (/^rgba\(/.test(a)) return this.Xv(a)
- var b = (a = this.lI(a))
- '#' === a[0] &&
- ((a = a.substring(1)),
- 3 === a.length &&
- (a = a.replace(/./g, function (a) {
- return a + a
- })),
- (b = this.Rr(8 === a.length ? a : 'ff' + a)))
- return this.Xv(b)
- },
- lI: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : '',
- a = a.toLowerCase(),
- b = {
- aliceblue: '#f0f8ff',
- antiquewhite: '#faebd7',
- aqua: '#00ffff',
- aquamarine: '#7fffd4',
- azure: '#f0ffff',
- beige: '#f5f5dc',
- bisque: '#ffe4c4',
- black: '#000000',
- blanchedalmond: '#ffebcd',
- blue: '#0000ff',
- blueviolet: '#8a2be2',
- brown: '#a52a2a',
- burlywood: '#deb887',
- cadetblue: '#5f9ea0',
- chartreuse: '#7fff00',
- chocolate: '#d2691e',
- coral: '#ff7f50',
- cornflowerblue: '#6495ed',
- cornsilk: '#fff8dc',
- crimson: '#dc143c',
- cyan: '#00ffff',
- darkblue: '#00008b',
- darkcyan: '#008b8b',
- darkgoldenrod: '#b8860b',
- darkgray: '#a9a9a9',
- darkgreen: '#006400',
- darkkhaki: '#bdb76b',
- darkmagenta: '#8b008b',
- darkolivegreen: '#556b2f',
- darkorange: '#ff8c00',
- darkorchid: '#9932cc',
- darkred: '#8b0000',
- darksalmon: '#e9967a',
- darkseagreen: '#8fbc8f',
- darkslateblue: '#483d8b',
- darkslategray: '#2f4f4f',
- darkturquoise: '#00ced1',
- darkviolet: '#9400d3',
- deeppink: '#ff1493',
- deepskyblue: '#00bfff',
- dimgray: '#696969',
- dodgerblue: '#1e90ff',
- firebrick: '#b22222',
- floralwhite: '#fffaf0',
- forestgreen: '#228b22',
- fuchsia: '#ff00ff',
- gainsboro: '#dcdcdc',
- ghostwhite: '#f8f8ff',
- gold: '#ffd700',
- goldenrod: '#daa520',
- gray: '#808080',
- green: '#008000',
- greenyellow: '#adff2f',
- honeydew: '#f0fff0',
- hotpink: '#ff69b4',
- indianred: '#cd5c5c',
- indigo: '#4b0082',
- ivory: '#fffff0',
- khaki: '#f0e68c',
- lavender: '#e6e6fa',
- lavenderblush: '#fff0f5',
- lawngreen: '#7cfc00',
- lemonchiffon: '#fffacd',
- lightblue: '#add8e6',
- lightcoral: '#f08080',
- lightcyan: '#e0ffff',
- lightgoldenrodyellow: '#fafad2',
- lightgrey: '#d3d3d3',
- lightgreen: '#90ee90',
- lightpink: '#ffb6c1',
- lightsalmon: '#ffa07a',
- lightseagreen: '#20b2aa',
- lightskyblue: '#87cefa',
- lightslategray: '#778899',
- lightsteelblue: '#b0c4de',
- lightyellow: '#ffffe0',
- lime: '#00ff00',
- limegreen: '#32cd32',
- linen: '#faf0e6',
- magenta: '#ff00ff',
- maroon: '#800000',
- mediumaquamarine: '#66cdaa',
- mediumblue: '#0000cd',
- mediumorchid: '#ba55d3',
- mediumpurple: '#9370d8',
- mediumseagreen: '#3cb371',
- mediumslateblue: '#7b68ee',
- mediumspringgreen: '#00fa9a',
- mediumturquoise: '#48d1cc',
- mediumvioletred: '#c71585',
- midnightblue: '#191970',
- mintcream: '#f5fffa',
- mistyrose: '#ffe4e1',
- moccasin: '#ffe4b5',
- navajowhite: '#ffdead',
- navy: '#000080',
- oldlace: '#fdf5e6',
- olive: '#808000',
- olivedrab: '#6b8e23',
- orange: '#ffa500',
- orangered: '#ff4500',
- orchid: '#da70d6',
- palegoldenrod: '#eee8aa',
- palegreen: '#98fb98',
- paleturquoise: '#afeeee',
- palevioletred: '#d87093',
- papayawhip: '#ffefd5',
- peachpuff: '#ffdab9',
- peru: '#cd853f',
- pink: '#ffc0cb',
- plum: '#dda0dd',
- powderblue: '#b0e0e6',
- purple: '#800080',
- rebeccapurple: '#663399',
- red: '#ff0000',
- rosybrown: '#bc8f8f',
- royalblue: '#4169e1',
- saddlebrown: '#8b4513',
- salmon: '#fa8072',
- sandybrown: '#f4a460',
- seagreen: '#2e8b57',
- seashell: '#fff5ee',
- sienna: '#a0522d',
- silver: '#c0c0c0',
- skyblue: '#87ceeb',
- slateblue: '#6a5acd',
- slategray: '#708090',
- snow: '#fffafa',
- springgreen: '#00ff7f',
- steelblue: '#4682b4',
- tan: '#d2b48c',
- teal: '#008080',
- thistle: '#d8bfd8',
- tomato: '#ff6347',
- turquoise: '#40e0d0',
- violet: '#ee82ee',
- wheat: '#f5deb3',
- white: '#ffffff',
- whitesmoke: '#f5f5f5',
- yellow: '#ffff00',
- yellowgreen: '#9acd32',
- }
- return 'string' === typeof a ? (b[a.toLowerCase()] ? b[a.toLowerCase()] : a) : a
- },
- FI: function (a, b, c) {
- var d, e
- d = Math.floor(c / 2)
- e = c - d
- d = ((1 << d) - 1) << e
- e = (1 << e) - 1
- return [c, (a & d) | (b & e), (b & d) | (a & e)]
- },
- GI: function (a) {
- return a ? encodeURIComponent(a) : ''
- },
- Zc: function (a, b, c, d) {
- c = a[b].i[c]
- if ('undefined' === typeof c) return null
- a = a[b].s
- if ('number' === typeof c) return a[c]
- for (; 'undefined' === typeof c[d.toString()] && !((d -= 1), 3 > d); );
- d = c[d.toString()]
- return 'number' === typeof d ? a[d] : null
- },
- Xv: function (a) {
- a = a.split(',')
- a[0] = parseFloat(a[0].split('rgba(')[1]) / 255
- a[1] = parseFloat(a[1]) / 255
- a[2] = parseFloat(a[2]) / 255
- a[3] = parseFloat(a[3])
- return a
- },
- axa: function (a) {
- a = a.split(',')
- a[0] = parseFloat(a[0].split('rgb(')[1]) / 255
- a[1] = parseFloat(a[1]) / 255
- a[2] = parseFloat(a[2]) / 255
- return a
- },
- sU: function (a) {
- return 'rgba(' + 255 * a[0] + ',' + 255 * a[1] + ',' + 255 * a[2] + ',' + a[3] + ')'
- },
- Ona: function (a) {
- return this.sU(this.Zl(a))
- },
- Zl: function (a) {
- if (a instanceof Array) return 3 == a.length && a.push(1), a
- a = this.lI(a)
- if (0 == a.indexOf('#')) {
- if (4 === a.length)
- return (
- (a = a.substr(1).replace(/./g, function (a) {
- return a + a
- })),
- this.op(a)
- )
- if (7 == a.length) return this.op(a.substr(1))
- if (9 == a.length) return (a = a.substr(1)), this.Xk(a.substr(6) + a.substr(0, 6))
- } else {
- if (0 == a.indexOf('rgb(')) return (a = this.axa(a)), a.push(1), a
- if (0 == a.indexOf('rgba(')) return this.Xv(a)
- }
- },
- B8: function (a) {
- return g.a.Rr('ff' + a)
- },
- Rr: function (a) {
- for (var b = [], c = 0, d = a.length; c < d; c += 2) b.push(parseInt(a.substr(c, 2), 16))
- b.push((b.shift() / 255).toFixed(2))
- return 'rgba(' + b.join(',') + ')'
- },
- op: function (a) {
- return g.a.Xk('ff' + a)
- },
- Xk: function (a) {
- for (var b = [], c = 0, d = a.length; c < d; c += 2) b.push(parseInt(a.substr(c, 2), 16) / 255)
- b.push(b.shift())
- return b
- },
- uh: function (a) {
- for (var b in a) if (a.hasOwnProperty(b)) return !1
- return !0
- },
- Fo: function (a, b) {
- 0 <= b && a.splice(b, 1)
- return a
- },
- aya: function (a, b) {
- return a.startsWith ? a.startsWith(b) : a.substr(0, b.length) === b
- },
- Ay: function (a, b) {
- var c = g.a.indexOf(a, b)
- return g.a.Fo(a, c)
- },
- filter: function (a, b, c) {
- var d = []
- g.a.Tb(a, function (a, f) {
- b.call(c, a, f) && d.push(a)
- })
- return d
- },
- indexOf: function (a, b) {
- if (!a || !a.length) return -1
- if (a.indexOf) return a.indexOf(b)
- for (var c = 0; c < a.length; c += 1) if (a[c] === b) return c
- return -1
- },
- cD: function (a, b) {
- return a.endsWith ? a.endsWith(b) : a.length < b.length ? !1 : a.substr(a.length - b.length) == b ? !0 : !1
- },
- bind: (function () {
- var a = !1
- Function.prototype.bind && (a = !0)
- return function (b, c) {
- var d = 2 < arguments.length ? Array.prototype.slice.call(arguments, 2) : null
- return a
- ? d
- ? (d.unshift(c), b.bind.apply(b, d))
- : b.bind(c)
- : function () {
- return b.apply(c, d || arguments)
- }
- }
- })(),
- ub: function (a, b) {
- b = b || {}
- a.w = g.extend({}, a.w, b)
- return a.w
- },
- Fna: function (a, b, c) {
- return 'function' == typeof b ? this.KP(a, !0, this.Ama(b, c, 1)) : this.KP(a, !0)
- },
- KP: function (a, b, c, d, e, f, h) {
- var k
- c && (k = e ? c(a, d, e) : c(a))
- if (void 0 !== k) return k
- if (!this.O5(a)) return a
- if ((d = this.isArray(a))) {
- if (((k = this.nsa(a)), !b)) return this.ima(a, k)
- } else {
- var l = Object.prototype.toString.call(a),
- m = '[object Function]' == l
- if ('[object Object]' == l || '[object Arguments]' == l || (m && !e)) {
- if (((k = this.osa(m ? {} : a)), !b)) return this.rma(k, a)
- } else return e ? a : {}
- }
- f || (f = [])
- h || (h = [])
- for (e = f.length; e--; ) if (f[e] == a) return h[e]
- f.push(a)
- h.push(k)
- ;(d ? this.jma : this.wma)(a, function (d, e) {
- k[e] = g.a.KP(d, b, c, e, a, f, h)
- })
- return k
- },
- rma: function (a, b) {
- return null == b ? a : this.uma(b, Object.keys(b), a)
- },
- O5: function (a) {
- var b = typeof a
- return !!a && ('object' == b || 'function' == b)
- },
- oFa: function (a) {
- return !!a && 'object' == typeof a
- },
- mFa: function (a) {
- return 'number' == typeof a && -1 < a && 0 == a % 1 && 9007199254740991 >= a
- },
- nsa: function (a) {
- var b = a.length,
- c = new a.constructor(b)
- b && 'string' == typeof a[0] && Object.hasOwnProperty.call(a, 'index') && ((c.index = a.index), (c.input = a.input))
- return c
- },
- ima: function (a, b) {
- var c = -1,
- d = a.length
- for (b || (b = Array(d)); ++c < d; ) b[c] = a[c]
- return b
- },
- osa: function (a) {
- a = a.constructor
- ;('function' == typeof a && a instanceof a) || (a = Object)
- return new a()
- },
- Ama: function (a, b, c) {
- if ('function' != typeof a) return this.rv
- if (void 0 === b) return a
- switch (c) {
- case 1:
- return function (c) {
- return a.call(b, c)
- }
- case 3:
- return function (c, e, f) {
- return a.call(b, c, e, f)
- }
- case 4:
- return function (c, e, f, h) {
- return a.call(b, c, e, f, h)
- }
- case 5:
- return function (c, e, f, h, k) {
- return a.call(b, c, e, f, h, k)
- }
- }
- return function () {
- return a.apply(b, arguments)
- }
- },
- jma: function (a, b) {
- for (var c = -1, d = a.length; ++c < d && !1 !== b(a[c], c, a); );
- return a
- },
- rv: function (a) {
- return a
- },
- hoa: function (a) {
- return function (b, c, d) {
- var e = g.a.Bya(b)
- d = d(b)
- for (var f = d.length, h = a ? f : -1; a ? h-- : ++h < f; ) {
- var k = d[h]
- if (!1 === c(e[k], k, e)) break
- }
- return b
- }
- },
- wma: function (a, b) {
- return g.a.hoa()(a, b, Object.keys)
- },
- Bya: function (a) {
- return g.a.O5(a) ? a : Object(a)
- },
- uma: function (a, b, c) {
- c || (c = {})
- for (var d = -1, e = b.length; ++d < e; ) {
- var f = b[d]
- c[f] = a[f]
- }
- return c
- },
- x3: function () {
- return !1
- },
- join: function (a, b) {
- if (a.join) return a.join(b)
- var c = [],
- d
- for (d in a) a.hasOwnProperty(d) && c.push(d + '=' + (a[d] || ''))
- return c.join(b)
- },
- f4: function (a, b) {
- return (a || '') + Math.round(Math.random() * Math.pow(10, b || 6))
- },
- yb: (function () {
- var a = 0
- return function (b) {
- b._amap_id || ((a += 1), (b._amap_id = a))
- return b._amap_id
- }
- })(),
- wpa: 'data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=',
- dg: Date.now
- ? function () {
- return Date.now()
- }
- : function () {
- return new Date().getTime()
- },
- LD: function (a, b, c, d) {
- var e
- if (d) {
- var f = 0,
- h,
- k = this.dg
- e = function () {
- h = k()
- if (h - f < b) return !1
- f = h
- a.apply(c, arguments)
- }
- } else {
- var l, m, n
- n = function () {
- l = !1
- m && (e.apply(c, m), (m = !1))
- }
- e = function () {
- l ? (m = arguments) : ((l = !0), a.apply(c, arguments), setTimeout(n, b))
- }
- }
- return e
- },
- wb: function (a, b) {
- if (a === a << 0) return a
- var c = Math.pow(10, b || 0)
- return Math.round(parseFloat(a) * c) / c
- },
- isArray: Array.isArray
- ? Array.isArray
- : function (a) {
- return this.jk(a, 'array')
- },
- jk: function (a, b) {
- return Object.prototype.toString.call(a).split(' ')[1].slice(0, -1).toLowerCase() === b.toLowerCase()
- },
- ka:
- 'function' === typeof Array.prototype.ka
- ? function (a, b) {
- return a.ka(b)
- }
- : function (a, b) {
- return -1 !== this.indexOf(a, b)
- },
- x9: function (a) {
- var b = 0
- if (0 === a.length) return b
- for (var c, d = 0, e = a.length; d < e; d += 1) (c = a.charCodeAt(d)), (b = (b << 5) - b + c), (b &= b)
- return b
- },
- wDa: function (a, b) {
- b = b ? Math.ceil(parseInt(b.substr(6)) / 24) : 1
- for (var c = '', d = 0, e = a.length; d < e; d++) c += String.fromCharCode((a.charCodeAt(d) - 256 - b + 65535) % 65535)
- return c
- },
- Eoa: function (a, b) {
- var c = (a + '').slice(-2),
- d = (b + '').slice(-2)
- a = a.slice(0, -2)
- b = b.slice(0, -2)
- var e = parseInt((d + c).slice(1)),
- f = Math.ceil(e / 250) % 2 ? 1 : -1,
- d = parseInt('1' + d) / 3e3
- a -= (parseInt('1' + c) / 3e3) * f
- b -= d * (1 < e / 500 ? 1 : -1)
- return new g.U(parseFloat(a).toFixed(5), parseFloat(b).toFixed(5))
- },
- a7: function (a) {
- return 'undefined' !== typeof JSON && JSON.stringify ? g.a.x9(JSON.stringify(a)) : null
- },
- EHa: function (a, b) {
- if (b || !a.hasOwnProperty('_amap_hash')) {
- var c = g.a.a7(a)
- c && (a._amap_hash = c)
- }
- return a._amap_hash
- },
- iepngFix: function (a) {
- function b() {
- for (var a; c.length; ) (a = c.shift()), window.DD_belatedPNG.fixPng(a)
- d.ES = !0
- }
- this.M7 || ((this.M7 = []), (this.ES = !1))
- var c = this.M7,
- d = this
- if ('img' === a.tagName.toLowerCase()) c.push(a)
- else {
- a = a.getElementsByTagName('*')
- for (var e = 0; e < a.length; e += 1) c.push(a[e])
- }
- window.DD_belatedPNG && this.ES
- ? setTimeout(function () {
- b()
- }, 100)
- : this.ES || g.tb.load('AMap.FixPng', b)
- },
- Ka: function (a) {
- if (g.a.isArray(a))
- if (g.a.isArray(a[0])) for (var b = 0; b < a.length; b += 1) a[b] = g.a.Ka(a[b])
- else if (((b = typeof a[0]), 'string' === b || 'number' === b)) return new g.U(a[0], a[1])
- return a
- },
- gAa: function (a) {
- for (var b = [], c = 0, d = a.length; c < d; c += 1) b[c] = [a[c].x, a[c].y]
- return b
- },
- Lq: function (a) {
- return g.a.isArray(a) ? new g.xd(a[0], a[1]) : a
- },
- DP: function (a) {
- var b = a.type,
- c = a.UU,
- d = a.error
- a = new g.jb.XMLHttpRequest(a.url, { Ed: void 0 === b ? 'GET' : b, O2: a.data, pU: 'text/plain' })
- a.h(
- 'complete',
- function (a) {
- a = JSON.parse(a.data)
- c && c(a)
- },
- this
- )
- a.h(
- 'error',
- function () {
- var a = { errmsg: 'REQUEST_FAILED' }
- d && d(a)
- },
- this
- )
- },
- }
- ;(function () {
- function a(a) {
- window.clearTimeout(a)
- }
- function b(a) {
- var b,
- c,
- d = ['webkit', 'moz', 'o', 'ms']
- for (b = 0; b < d.length && !c; b += 1) c = window[d[b] + a]
- return c
- }
- function c(a) {
- var b = +new Date(),
- c = Math.max(0, (g.l.Xl ? 50 : 20) - (b - d))
- d = b + c
- return window.setTimeout(a, c)
- }
- var d = 0,
- e = window.requestAnimationFrame || b('RequestAnimationFrame') || c,
- f = window.cancelAnimationFrame || b('CancelAnimationFrame') || b('CancelRequestAnimationFrame') || a
- g.a.Wc = function (a, b, c, d) {
- if (c) b ? g.a.bind(a, b).call(b, d) : a()
- else
- return e(function () {
- b ? g.a.bind(a, b).call(b, d) : a()
- })
- }
- g.a.ri = function (a) {
- a && f.call(window, a)
- }
- })()
- g.a.qU = window.requestIdleCallback
- ? function (a, b) {
- return window.requestIdleCallback(a, b)
- }
- : function (a) {
- var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {},
- c = g.a.dg()
- return setTimeout(function () {
- a({
- didTimeout: !1,
- timeRemaining: function () {
- return Math.max(0, 70 - (g.a.dg() - c))
- },
- })
- }, b.timeout || 0)
- }
- g.a.$P = window.cancelIdleCallback
- ? function (a) {
- return window.cancelIdleCallback(a)
- }
- : function (a) {
- clearTimeout(a)
- }
- ;(function (a) {
- var b = 1,
- c = {}
- a.a.Cxa = function (a, b) {
- if (c[a]) {
- var f = c[a]
- f.GE = 1
- f.result = b
- if (f.nn) {
- for (var h = f.nn, k = 0, l = h.length; k < l; k++) h[k].call(null, b)
- f.nn = null
- }
- }
- }
- a.a.Bna = function (a) {
- c[a] = null
- }
- a.a.Qza = function (a, b) {
- if (c[a]) {
- var f = c[a]
- 0 < f.GE ? b(null, f.result) : (f.nn || (f.nn = []), f.nn.push(b))
- } else b(null, a)
- }
- a.a.ER = function (d, e) {
- var f = navigator.geolocation
- if (!a.l.ED || 'https:' === document.location.protocol) return d(null, f)
- var h
- e && e.Rza && ((h = 'f' + b++), (c[h] = { GE: 0 }))
- var k = null,
- l = !1
- e &&
- e.timeout &&
- (k = setTimeout(function () {
- k = void 0
- d({ code: 3, info: 'TIME_OUT', message: 'Get geolocation time out.' })
- l = !0
- }, e.timeout))
- f.getCurrentPosition(
- function () {
- l || (clearTimeout(k), (k = void 0), d(null, f))
- },
- function (b) {
- l ||
- (clearTimeout(k),
- (k = void 0),
- 2 === b.code && 0 < b.message.indexOf('permission')
- ? a.tb.load('AMap.GeoRemoteLoc', function () {
- d(null, a.qaa, h)
- })
- : d(null, f))
- },
- { timeout: 1e3 }
- )
- return h
- }
- })(g)
- ;(function (a) {
- var b = a.da.extend({ ka: [a.va], A: function () {} })
- a.Lj = new b()
- })(g)
- ;(function (a) {
- var b = a.da.extend({
- ka: [a.va],
- A: function () {
- this.mga()
- },
- mga: function () {
- a.Lj && a.Lj.h('vecTileParsed.buildings', this.Tfa, this)
- },
- H5: function (a) {
- return a.map.FZ
- },
- Rqa: function (a) {
- return this.H5(a) ? a.map.PN : null
- },
- zxa: function (a, b) {
- if (b) {
- var e = b.map
- e && (e.PN ? e.PN.toString() : '') !== (a ? a.toString() : '') && ((e.PN = a || []), e.set('display', 0))
- }
- },
- W8: function (a, b) {
- if (b) {
- var e = b.map
- e && e.FZ !== a && ((e.FZ = a), e.set('display', 0))
- }
- },
- PBa: function () {},
- BZ: function (a, b) {
- if (a) for (var e = 0, f = a.length; e < f; e++) a[e] && 0 > b.indexOf(a[e]) && b.push(a[e])
- },
- B3: function (b) {
- if (!b) return null
- b = b.map.la
- for (var d = 0, e = b.length; d < e; d++)
- if (a.o.ei && b[d] instanceof a.o.ei && b[d].ga && b[d].ga.length && (-1 !== b[d].ga.indexOf('building') || -1 !== b[d].ga.indexOf('poilabel')) && b[d].Ra) {
- var f = b[d].S.get('tiles', null, !0)
- if (f && f.length) return b[d]
- }
- return null
- },
- oqa: function (a) {
- if ((a = this.B3(a))) {
- if ((a = a.S.get('tiles', null, !0))) a = a[0]
- else return null
- if (!a || !a.length) return null
- for (var b = [], e = 0, f = a.length; e < f; e++) {
- var h = a[e]
- h.pe && h.pe.tf && this.BZ(h.pe.tf, b)
- }
- return b
- }
- },
- Tfa: function (a) {
- if (a.rp && a.rp.pe) {
- var b = a.rp.pe.tf
- if (b) {
- var e = []
- this.BZ(b, e)
- this.q('vecTileParsed.builds.found', { m2: e, rp: a.rp })
- }
- }
- },
- })
- a.Mj = new b()
- })(g)
- ;(function (a) {
- function b() {
- return {
- checkup: function () {
- var a = Array.prototype.slice.call(arguments, 0)
- a.pop()(null, a)
- },
- }
- }
- function c(a) {
- return {
- injectCode: function (b, c) {
- var d = null,
- e = null
- try {
- d = new Function('self', b)(a)
- } catch (f) {
- console.error('error', e), (e = f.toString())
- }
- c(e, d)
- },
- }
- }
- function d(a) {
- function b(c, d) {
- function e(a, b, c) {
- a = { $z: Date.now(), Oz: h, error: a, result: b, Hq: !1, cl: !1 }
- if (c) for (var f in c) c.hasOwnProperty(f) && (a[f] = c[f])
- d(a)
- }
- var f = c.gS,
- h = c.Oz,
- l = c.lQ,
- m = c.BC,
- n = c.hma || [],
- p = a._wkHandlers[f]
- p ? (p[l] ? (m ? p[l].apply(p, n.concat(e)) : e(null, p[l].apply(p, n))) : e('Unknown cmd: ' + l)) : e('Can not find handler for: ' + f)
- }
- var c = [],
- d = null,
- e = null
- for (d in this._wkHandlers) -1 !== d.indexOf('_def_') && (e = this._wkHandlers.YFa = d)
- 'function' === typeof this._wkHandlers[e].A && this._wkHandlers[e].A.call(this._wkHandlers[e])
- a.yu = function (a) {
- c.push.apply(c, a)
- }
- a.addEventListener(
- 'message',
- function (d) {
- function e(b) {
- if (t) {
- t.push(b)
- var d = !!b.Hq
- d || n++
- b = n >= h || b.cl
- if (d || b) {
- d = 1 < t.length ? { Vwa: t } : t[0]
- d.$z = Date.now()
- d.mHa = p
- if (c.length) {
- try {
- a.postMessage(d, c)
- } catch (f) {
- a.postMessage(d), console.error(f)
- }
- c.length = 0
- } else a.postMessage(d)
- t.length = 0
- b && (e = t = null)
- }
- } else console.error('Seemed callback already sent!!', b, b.result.lc)
- }
- var f = d.data
- d = f.Twa || [f]
- for (var h = d.length, n = 0, p = Date.now() - f.$z, t = [], f = 0; f < h; f++) b(d[f], e)
- },
- !1
- )
- }
- function e(d, h) {
- this.w = a.extend({ batchSend: !0, lazy: !1, libPolyfills: null }, h)
- this.Qp = []
- this.WA = this.w.clientId || 'w' + f++
- this.w.onReady && this.lT(this.w.onReady)
- this.mG = this.Wea()
- if ('function' === typeof d) {
- var m = {}
- m[this.mG] = d
- d = m
- }
- d[e.SR] = c
- d[this.JY()] = b
- this.CG = d
- this.PB(null)
- this.w.lazy || this.ky()
- a.Hra || !1 === this.w.hostWorker || (a.Hra = this)
- this.lo && this.lo.A && this.lo.A.call(this.lo)
- }
- var f = 1,
- h = 1
- a.extend(e, {
- SR: '_g_',
- Nxa: function (a) {
- if (!a.cca) {
- var b = []
- a.addEventListener(
- 'message',
- function (a) {
- a = a.data
- a = a.Vwa || [a]
- for (var c = 0, d = a.length; c < d; c++) {
- var e = a[c],
- f
- a: {
- f = e.Oz
- for (var h = !e.cl, k = 0, v = b.length; k < v; k++) {
- var w = b[k]
- if (f === w.Oz) {
- h || b.splice(k, 1)
- f = w
- break a
- }
- }
- f = void 0
- }
- f && f.BC(e.error, e.result, !0)
- }
- },
- !1
- )
- a.Rba = b
- a.cca = !0
- }
- },
- })
- a.extend(e.prototype, {
- Wea: function () {
- return '_def_' + this.WA
- },
- JY: function () {
- return '_cln_' + this.WA
- },
- jka: function () {
- var a = Array.prototype.slice.call(arguments, 0)
- this.z0 = a
- if (this.Qx) {
- for (var b = 0, c = this.Qx.length; b < c; b++) this.Qx[b].apply(null, a)
- this.Qx.length = 0
- }
- },
- yu: function (a) {
- this.aka && this.Qp.push.apply(this.Qp, a)
- },
- lT: function (a) {
- this.z0 ? a.apply(null, this.z0) : (this.Qx || (this.Qx = []), this.Qx.push(a))
- },
- ky: function (b) {
- var c = this
- if (!c.GX) {
- c.GX = !0
- var d = function (d, e) {
- d && a.l.GS && console.warn(d)
- c.jka.call(c, d, e)
- b && b(d, e)
- }
- a.l.GS
- ? this.Xja(function (a, b) {
- b
- ? this.tga(b, function (a, c) {
- a ? d(a) : (this.PB(c), (this.zP = c), (this.Qp.length = 0), (this.lo = null), d(null, { yma: b, bAa: c }))
- })
- : d('Worker start failed!')
- })
- : d('Worker not supported!')
- }
- },
- wf: function (b, c) {
- var d = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : a.a.Rs,
- f = this
- b = b || f.mG
- var h = {}
- if (a.a.jk(c, 'object')) {
- var q = 'return {',
- r
- for (r in c)
- if (c.hasOwnProperty(r))
- var s = c[r],
- q =
- 'function' === typeof s
- ? q + ('\n\t' + r + ': ' + s.toString() + ',')
- : 'object' === typeof s
- ? q + ('\n\t' + r + ': ' + JSON.stringify(s) + ',')
- : q + ('\n\t' + r + ': "' + s + '",')
- c = new Function(q + '\n}')
- }
- f.lX(b, c, h)
- f.PB(null, h)
- f.lT(function (a) {
- a
- ? d(a)
- : f.zP
- ? ((a = f.QY(c, f.BN(f.WA, b), !0)),
- f.zP.sendMessage(e.SR + ':injectCode', a, function (a, b) {
- a || f.PB(f.zP, h)
- d(a, b)
- }))
- : d('Worker msger missing!!')
- })
- },
- BN: function (a, b) {
- if (!a || !b) throw Error('clientId or ns missing!!')
- return a + '_' + b
- },
- tfa: function (a, b, c) {
- function d() {
- var b = Array.prototype.slice.call(arguments, 0)
- c.sendMessage.apply(c, [a].concat(b))
- }
- var e = this
- if (!c)
- return function () {
- var a = b.apply(e.lo, arguments)
- e.GX || ('untilCall' === e.w.lazy && e.ky())
- return a
- }
- d._proxy2Worker = !0
- return d
- },
- Vca: function (a) {
- var b = {},
- c
- for (c in a) a.hasOwnProperty(c) && this.lX(c, a[c], b)
- return b
- },
- lX: function (a, b, c) {
- b = b.call(null, !1)
- for (var d in b) b.hasOwnProperty(d) && ((c[a + ':' + d] = b[d]), a === this.mG && (c[d] = b[d]))
- },
- PB: function (a, b) {
- if (!b) this.lo || (this.lo = this.Vca(this.CG)), (b = this.lo)
- else if (this.lo) for (var c in b) b.hasOwnProperty(c) && (this.lo[c] = b[c])
- for (c in b)
- if (b.hasOwnProperty(c)) {
- var d = b[c]
- 'function' === typeof d && (this[c] = this.tfa(c, d, a))
- }
- this.aka = !!a
- },
- QY: function (a, b) {
- var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : !1,
- d = a.toString(),
- e,
- d = d.replace(/^function([^\(]*)\(/, function () {
- e = '_prep_h' + h++
- return 'function ' + e + '('
- })
- return e
- ? '\n\t\t\t\t' +
- d +
- "\n\t\t\t\tif (self._wkHandlers['" +
- b +
- "'] && " +
- !c +
- ") {\n\t\t\t\t\tthrow new Error('" +
- b +
- " already exists!')\n\t\t\t\t} else {\n\t\t\t\t\tif (" +
- c +
- " && self._wkHandlers['" +
- b +
- "']) {\n\t\t\t\t\t\tvar handlerFunObj = " +
- e +
- ".call(null, self) || {}\n\n\t\t\t\t\t\tif (typeof Object.assign === 'function') {\n\t\t\t\t\t\t\tObject.assign(self._wkHandlers['" +
- b +
- "'], handlerFunObj)\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tfor (var key in handlerFunObj) {\n\t\t\t\t\t\t\t\tif (handlerFunObj.hasOwnProperty(key)) {\n\t\t\t\t\t\t\t\t\tself._wkHandlers['" +
- b +
- "'][key] = handlerFunObj[key]\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tself._wkHandlers['" +
- b +
- "'] = " +
- e +
- '.call(null, self) || {}\t\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t' +
- e +
- ' = null;\n\t\t\t'
- : (console.error('No function match!!'), !1)
- },
- Xja: function (a) {
- var b = this.WA,
- c = [],
- d
- for (d in this.CG)
- if (this.CG.hasOwnProperty(d)) {
- var f = this.QY(this.CG[d], this.BN(b, d))
- f && c.push(f)
- }
- b = this.w.libPolyfills || []
- d = 0
- for (f = b.length; d < f; d++) b[d] = '(' + b[d].toString() + ')(self);'
- var h = b.join(';\n') + ';\n' + c.join(';\n'),
- c = this.w.hostWorker,
- r = this
- c && c !== r
- ? c.lT(function (b, c) {
- b
- ? a.call(r, b)
- : c.bAa.sendMessage(e.SR + ':injectCode', h, function (b) {
- b ? a.call(r, b) : a.call(r, null, c.yma)
- })
- })
- : a.call(r, null, r.nla(h))
- },
- nla: function (b) {
- b = ['self._wkHandlers={};', b, '(' + d.toString() + ')(self)'].join('')
- var c
- try {
- var e = a.a.createObjectURL(b)
- c = new Worker(e)
- setTimeout(function () {
- a.a.revokeObjectURL(e)
- e = null
- }, 5e3)
- } catch (f) {
- return
- }
- return c
- },
- Oda: function (b) {
- var c = 1,
- d = b.Rba,
- e = this,
- f = !!e.w.batchSend
- return function (h) {
- var r = Array.prototype.slice.call(arguments, 1),
- s = 'function' === typeof r[r.length - 1] ? r.pop() : null,
- u = e.WA,
- v = h.split(':'),
- w = e.mG
- 1 < v.length && ((h = v[1]), (w = v[0]))
- r = { $z: a.a.dg(), gS: e.BN(u, w), BC: !!s, Oz: u + '_' + c++, lQ: h, hma: r }
- s && d.push({ lQ: r.lQ, gS: r.gS, $z: r.$z, Oz: r.Oz, BC: s })
- f ? e.xca(b, r) : e.Ox(b, r)
- }
- },
- Ox: function (a, b) {
- if (this.Qp.length) {
- try {
- a.postMessage(b, this.Qp)
- } catch (c) {
- a.postMessage(b), console.error(c)
- }
- this.Qp.length = 0
- } else a.postMessage(b)
- },
- xca: function (b, c) {
- b.vO || (b.vO = [])
- b.vO.push(c)
- if (!b.q0) {
- var d = this
- b.q0 = setTimeout(function () {
- b.q0 = null
- var c = b.vO
- c.length && (d.Ox(b, 1 === c.length ? c[0] : { $z: a.a.dg(), Twa: c }), (c.length = 0))
- }, 0)
- }
- },
- ela: function (a) {
- var b = this
- a.addEventListener(
- 'error',
- function (a) {
- console.error(a)
- b.PB(null)
- },
- !1
- )
- e.Nxa(a)
- },
- tga: function (a, b) {
- var c = this
- c.ela(a)
- var d = this.Oda(a)
- if (e.tda) b.call(c, null, { sendMessage: d })
- else {
- e.tda = !0
- var f = [
- c.JY() + ':checkup',
- Math.random().toFixed(5) + '',
- Math.round(1e3 * Math.random()),
- !1,
- function (a, e) {
- var h = !0
- if (a || !e || e.length !== f.length - 2) h = !1
- else
- for (var k = 0, v = e.length; k < v; k++)
- if (e[k] !== f[k + 1]) {
- h = !1
- break
- }
- h ? b.call(c, null, { sendMessage: d }) : (console.error(a), b.call(c, 'Self checkup failed!!'))
- },
- ]
- d.apply(c, f)
- }
- },
- })
- a.IA = e
- })(g)
- ;(function () {
- if (!g.TL) {
- g.TL = { oba: {}, BD: {} }
- var a = g.TL,
- b = g.TL.oba,
- c = g.a,
- d = g.r
- b.start = function (b) {
- a.BD[b.id] = {
- K: b.K,
- time: { u5: c.dg() },
- Xma: function () {
- return c.dg() - this.time.u5
- },
- }
- }
- b.end = function (b) {
- var d = a.BD[b.id],
- e = d.time,
- d = c.bind(d.Xma, d),
- l = b.index,
- m = b.key
- 'function' !== typeof b.Mc && (b.Mc = function () {})
- if (void 0 === e[m]) void 0 === l ? (e[m] = d()) : ((e[m] = []), (e[m][l] = d()))
- else if (void 0 !== l && void 0 === e[m][l]) e[m][l] = d()
- else return b.Mc(Error('Duplicate Invoke'))
- b.Mc(null)
- }
- b.push = function (b) {
- var c = a.BD[b.id].time,
- d = b.key,
- e = b.Jg
- 'function' !== typeof b.Mc && (b.Mc = function () {})
- if (void 0 === c[d]) c[d] = e
- else return b.Mc(Error('Duplicate Invoke'))
- b.Mc(null)
- }
- b.send = function (b) {
- var c = d.tc + '://webapi.amap.com/count?',
- k = g.extend(e({ K: a.BD[b.id].K }), b.params || {}),
- l = g.a
- b.params && b.params.rs && !b.params.type && ((b = a.BD[b.id].time), delete b.u5, (k = g.extend(k, b)))
- b = []
- for (var m in k) l.isArray(k[m]) ? b.push([m, k[m].join('-')].join('=')) : b.push([m, k[m]].join('='))
- b.push('jl=' + (d.MJ ? 1 : 0))
- if (l.jk(window.performance, 'performance') && l.jk(window.performance.getEntriesByType, 'function')) {
- var n = 0,
- p = ['webapi.amap.com', 'jsapi-test.amap.test', 'localhost'],
- q = ['/maps', '/css']
- l.Tb(window.performance.getEntriesByType('resource'), function (a) {
- var b = void 0,
- c = void 0
- a.name.match(/:\/\/([^:?#/]+)/) && (b = RegExp.$1)
- a.name.match(/[^\/](\/[^/?#:]+)/) && (c = RegExp.$1)
- b && c && l.ka(p, b) && l.ka(q, c) && (n += parseInt(a.responseEnd - a.startTime))
- })
- 0 !== n && b.push('sd=' + n)
- }
- new g.jb.zb(c + b.join('&'))
- }
- var e = function (a) {
- var b = g.l
- a = g.f.S3(a.K)
- return {
- type: 'q',
- resolution: a.width + '*' + a.height,
- k: d.key,
- u: d.Up,
- iw: b.Mf ? 1 : 0,
- cw: b.p2 ? 1 : 0,
- gc: b.TR,
- m: b.ba ? 1 : 0,
- cv: b.Xp ? 1 : 0,
- pf: b.Dz,
- dpr: window.devicePixelRatio,
- screenwidth: screen.width,
- scale: b.yL || 0,
- detect: b.ja ? 1 : 0,
- v: d.ln,
- }
- }
- }
- })()
- ;(function () {
- if (!g.HL) {
- var a = g.a.mD({ r: 'Conf', extend: 'extend', l: 'Browser', xw: 'uncodeCoords' })
- g.HL = function () {
- var b = new g.IA(
- function () {
- return {
- A: function () {
- this.px = { ok: 0, mE: 0 }
- this.Rk = {}
- this.qo = []
- this.Pp = {}
- this.Vj = {}
- this.Rt = 0
- this.d_ = 500
- },
- xh: function (a, b) {
- var e = a.Md,
- f = a.Ie,
- h = 'building' === a.ga[0]
- ;((f && e !== this.px.mE && this.px.mE) || (!f && !h && e !== this.px.ok && this.px.ok)) && this.Lla(!!f)
- f ? (this.px.mE = e) : h || (this.px.ok = e)
- this.qta(a, b)
- },
- Lla: function (a) {
- if (a) this.gX()
- else if (!a && Object.keys(this.Rk).length) for (var b in this.Rk) this.Rk.hasOwnProperty(b) && ((a = this.Rk[b]), a.Mt || a.abort())
- },
- Kya: function () {
- this.Rt > this.d_ && this.bU(Object.keys(this.Vj).slice(0, Math.floor(this.d_ / 2)))
- },
- bU: function (a) {
- for (var b = 0, e = a.length; b < e; b++) delete this.Vj[a[b]]
- this.Rt -= a.length
- },
- NC: function (a) {
- var b = a.ga
- a = a.Ie
- var e = new XMLHttpRequest()
- e.Nq = ''
- e.yE = [new Date().getTime() + '_' + Math.random(), a ? 1 : 0, b.join('|')].join('-')
- return e
- },
- Z4: function (a, b, e) {
- var f = this,
- h = a.Ib,
- k = a.Ie,
- l = [],
- m = h.filter(function (a) {
- var b = f.Vj[a.key]
- if (b) {
- if (b.WZ) return !0
- l.push(a.key)
- }
- return !1
- }),
- n = !1
- if (m.length && ((n = m.length === h.length) || 'function' !== typeof b || b(a, m), !k)) {
- var p = []
- m.forEach(function (a) {
- a = a.key
- p.push.apply(p, f.Vj[a])
- delete f.Vj[a]
- })
- this.Rt -= m.length
- this.Us(this.extend({}, a, { dF: p, Md: a.Md, Cn: n }), e)
- }
- !k && l.length && this.bU(l)
- this.Kya()
- return n
- },
- qta: function (a, b) {
- function e(e, f) {
- var m = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : !1
- if (p.Rk[q.yE] || p.iga(q)) {
- var n = e.split('|')
- f && (n[0] = f + n[0])
- var t = n,
- x = ''
- n[n.length - 1] && ((x = n[n.length - 1]), (t = n.splice(0, n.length - 1)))
- if (k)
- for (var n = 0, y = t.length; n < y; n++) {
- if (t[n]) {
- var E = JSON.parse(t[n])
- if (E.length) {
- var C = E[0].split('-').slice(0, -1).join('/')
- p.Vj[C] ? p.Vj[C].push(E) : ((p.Vj[C] = [E]), p.Rt++)
- m && (p.Vj[C].WZ = !0)
- }
- }
- }
- else p.Us(p.extend({}, a, { dF: t, Md: h, Cn: m, yS: !0 }), b)
- return x
- }
- r || (p.Ll(l, b), (r = !0))
- }
- var f = this,
- h = a.Md,
- k = a.Ie,
- l = a.Ib,
- m = a.url
- if (
- !this.Z4(
- a,
- function (a, b) {
- var c = a.Ib,
- d = a.url,
- e = d.match(/&t=([^&]+)/)[1].split(';')
- b.reverse().forEach(function (a) {
- a = c.indexOf(a)
- ;-1 !== a && e.splice(a, 1)
- })
- a.url = d.replace(/&t=[^&]+/, '&t=' + e.join(';'))
- },
- b
- )
- ) {
- if (this.bC() && (this.gX(), k)) {
- this.Ll(l, b)
- return
- }
- var n = 0,
- p = this,
- q = this.NC(a)
- k ? this.qo.push(q) : ((this.Rk[q.yE] = q), (q.Ib = l), (q.Mc = b))
- var r = !1
- q.onreadystatechange = function () {
- if (4 === q.readyState && 0 === q.status) q.Mt || ((q.Mt = !0), f.Ll(l, b), (q.onreadystatechange = null), k ? f.E0(q) : delete f.Rk[q.yE]), (q = null)
- else if (!q.Mt)
- if (3 === q.readyState) {
- var h = q.responseText.substring(n)
- q.Nq = e(h, q.Nq)
- n = q.responseText.length
- } else
- 4 === q.readyState && ((h = q.responseText.substring(n)), a.Ci && (h += '|'), e(h, q.Nq, !0), (q.Nq = ''), k ? f.E0(q) : delete f.Rk[q.yE], (q = null))
- }
- q.onerror = function () {}
- q.open('GET', m, !0)
- q.send()
- k &&
- (q.T9 = l.map(function (a) {
- return a.key
- }))
- }
- },
- $D: function (a) {
- function b(d, p, r) {
- var s = [r, d, p].join('/')
- d = e.filter(function (a) {
- return a.key === s
- })[0]
- 18 < k && !n && (s += '/' + k)
- if (d && 'loaded' !== d.status && -1 !== m.indexOf(t))
- if ('limg' === t)
- (p = h[1]),
- (d.qd = p),
- 'string' === typeof p.b && (p.b = w.aB(p.b)),
- (r = ''),
- (r = 'object' === typeof p.u ? p.u.url : p.u) && (p.u = { url: r, Bk: 'limg-' + d.key + '-' + f })
- else {
- p = { Hg: d.ta, Oi: s, Oa: h, Ed: t, iy: a.Du, FD: 'building' === t, Bi: 'poilabel' === t || 'roadlabel' === t || ('building' === t && q) }
- if ('poilabel' === t || 'roadlabel' === t) p.qd = d.qd
- t === m[m.length - 1] && (d.status = 'loaded')
- l.push(p)
- }
- }
- var e = a.Ib,
- f = a.LS,
- h = a.PC,
- k = a.Md,
- l = a.Oc,
- m = a.ga,
- n = a.Mf,
- p = a.WR,
- q = a.Ae,
- r = h[0].split('-'),
- s = parseInt(r[1]),
- u = parseInt(r[2]),
- v = parseInt(r[0]),
- w = this,
- t = r[3],
- r = Math.pow(2, v)
- 10 > v && (s <= p && b(s + r, u, v), s >= r - p && b(s - r, u, v))
- b(s, u, v)
- },
- E0: function (a) {
- for (var b = this.qo.length - 1; 0 <= b; b--) this.qo[b] === a && this.qo.splice(b, 1)
- },
- iga: function (a) {
- for (var b = 0, e = this.qo.length; b < e; b++) if (this.qo[b] === a) return !0
- return !1
- },
- bC: function () {
- return Object.keys(this.Rk).length ? !0 : !1
- },
- gX: function () {
- if (this.qo.length) {
- for (var a = this.qo.length - 1; 0 <= a; a--) {
- var b = this.qo[a]
- b.Mt || b.abort()
- b.T9 && this.bU(b.T9)
- }
- this.qo.length = 0
- }
- },
- Ll: function (a, b) {
- b(null, { Ib: a, P5: !0, disabled: this.disabled }, { cl: !0 })
- },
- }
- },
- { batchSend: !1 }
- )
- b.wf(
- null,
- new Function(
- '\n return {\n ' +
- a.Conf +
- ': ' +
- JSON.stringify(g.r) +
- ',\n ' +
- a.extend +
- ': ' +
- g.extend.toString() +
- ',\n ' +
- a.Browser +
- ': ' +
- JSON.stringify(g.l) +
- ',\n ' +
- a.uncodeCoords +
- ': ' +
- g.a.xw.toString() +
- '\n }'
- )
- )
- return b
- }
- }
- })()
- g.f = {
- CLASS_NAME: 'DomUtil',
- get: function (a) {
- return 'string' === typeof a ? document.getElementById(a) : a
- },
- HD: function (a, b, c) {
- return a.parentNode == b ? !0 : a.parentNode && a.parentNode !== document.body && !g.f.zn(a.parentNode, c) ? g.f.HD(a.parentNode, b) : !1
- },
- Lo: function (a) {
- if (!a) return [0, 0]
- var b = a.offsetWidth,
- c = a.offsetHeight
- ;(b && c) || !a.childNodes[0] || ((b = b || a.childNodes[0].offsetWidth), (c = c || a.childNodes[0].offsetHeight))
- window.opera && ((b = Math.max(b, a.childNodes[0].scrollWidth)), (c = Math.max(c, a.childNodes[0].scrollHeight)))
- return [b, c]
- },
- JFa: function (a, b) {
- var c = document.head || document.getElementsByTagName('head')[0]
- if (c) {
- var d = document.createElement('link')
- d.setAttribute('rel', 'stylesheet')
- d.setAttribute('type', 'text/css')
- d.setAttribute('href', a)
- b ? c.appendChild(d) : c.insertBefore(d, c.firstChild)
- } else document.write("<link rel='stylesheet' href='" + a + "'/>")
- },
- Zc: function (a, b) {
- var c = a.style[b]
- !c && a.currentStyle && (c = a.currentStyle[b])
- ;(c && 'auto' !== c) || !document.defaultView || (c = (c = document.defaultView.getComputedStyle(a, null)) ? c[b] : null)
- ;(c && 'auto' !== c) || 'height' !== b || (c = a.clientHeight + 'px')
- ;(c && 'auto' !== c) || 'width' !== b || (c = a.clientWidth + 'px')
- return 'auto' === c ? null : c
- },
- lJ: function (a) {
- if (a)
- return new g.xd(
- a.clientWidth || document.body.clientWidth,
- a.clientHeight || (g.l.Es ? ('CSS1Compat' === document.compatMode ? document.documentElement.clientHeight : document.body.clientHeight) : document.body.clientHeight),
- !0
- )
- },
- S3: function (a) {
- return new g.xd(a.clientWidth, a.clientHeight)
- },
- RR: function (a) {
- var b = 0,
- c = 0,
- d = a,
- e = document.body,
- f = document.documentElement,
- h,
- k = g.l.sv
- do {
- b += d.offsetTop || 0
- c += d.offsetLeft || 0
- b += parseInt(g.f.Zc(d, 'borderTopWidth'), 10) || 0
- c += parseInt(g.f.Zc(d, 'borderLeftWidth'), 10) || 0
- h = g.f.Zc(d, 'position')
- if (d.offsetParent === e && 'absolute' === h) break
- if ('fixed' === h) {
- b += e.scrollTop || f.scrollTop || 0
- c += e.scrollLeft || f.scrollLeft || 0
- break
- }
- d = d.offsetParent
- } while (d)
- d = a
- do {
- if (d === e) break
- b -= d.scrollTop || 0
- c -= d.scrollLeft || 0
- g.f.Xoa() || (!g.l.B$ && !k) || ((c += d.scrollWidth - d.clientWidth), k && 'hidden' !== g.f.Zc(d, 'overflow-y') && 'hidden' !== g.f.Zc(d, 'overflow') && (c += 17))
- d = d.parentNode
- } while (d)
- return new g.H(c, b)
- },
- Xoa: function () {
- g.f.hea || ((g.f.hea = !0), (g.f.gea = 'ltr' === g.f.Zc(document.body, 'direction')))
- return g.f.gea
- },
- create: function (a, b, c, d) {
- a = document.createElement(a)
- c && (a.className = c)
- b && (d && 'before' === d ? b.insertBefore(a, b.firstChild) : b.appendChild(a))
- return a
- },
- b3: function () {
- document.selection && document.selection.empty && document.selection.empty()
- this.dja || ((this.dja = document.onselectstart), (document.onselectstart = g.a.x3))
- },
- o3: function () {},
- Dya: function (a, b, c) {
- c ? this.Wa(a, b) : this.eb(a, b)
- },
- zn: function (a, b) {
- if (a && b) return 0 < a.className.length && RegExp('(^|\\s)' + b + '(\\s|$)').test(a.className)
- },
- Wa: function (a, b) {
- a && b && (a.classList && a.classList.add ? a.classList.add(b) : g.f.zn(a, b) || (a.className += (a.className ? ' ' : '') + b))
- },
- sxa: function (a, b) {
- a && (a.className = b || '')
- },
- eb: function (a, b) {
- function c(a, c) {
- return c === b ? '' : a
- }
- a && b && (a.classList && a.classList.remove ? a.classList.remove(b) : (a.className = a.className.replace(/(\S+)\s*/g, c).replace(/(^\s+|\s+$)/, '')))
- },
- p4: function (a, b) {
- return 1 === b
- ? ''
- : 'opacity' in a.style
- ? 'opacity:' + b
- : 8 <= document.documentMode
- ? "-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(opacity=" + Math.ceil(100 * b) + ")'"
- : 'filter:alpha(opacity=' + Math.ceil(100 * b) + ')'
- },
- Xq: function (a, b) {
- if (a.style)
- if ('opacity' in a.style) a.style.opacity = b
- else if ('filter' in a.style) {
- var c = Math.round(100 * b)
- a.style.filter = ''
- 100 !== c && (a.style.filter = ' progid:DXImageTransform.Microsoft.Alpha(opacity=' + c + ')')
- }
- },
- YU: function (a) {
- for (var b = document.documentElement.style, c = 0; c < a.length; c += 1) if (a[c] in b) return a[c]
- return !1
- },
- G4: function (a) {
- var b = g.l.CL
- return 'translate' + (b ? '3d' : '') + '(' + a.x + 'px,' + a.y + 'px' + ((b ? ',0' : '') + ')')
- },
- HEa: function (a, b) {
- return g.f.G4(b.add(b.Nd(-1 * a))) + (' scale(' + a + ') ')
- },
- a9: function (a, b, c) {
- a.aj = b
- !c && g.l.RH
- ? ((b = g.f.G4(b)),
- (c = a.style[g.f.pg].split('rotate')),
- 1 < c.length ? ((c[0] = b), (a.style[g.f.pg] = c.join('rotate'))) : (a.style[g.f.pg] = b),
- g.l.G6 && (a.style.WebkitBackfaceVisibility = 'hidden'))
- : ((a.style.left = b.x + 'px'), (a.style.top = b.y + 'px'))
- },
- Ud: function (a) {
- a.aj || (a.aj = a.style.left ? new g.H(parseInt(a.style.left), parseInt(a.style.top)) : new g.H(0, 0))
- return a.aj
- },
- vHa: function (a, b) {
- a = a instanceof Array ? a : [a]
- for (var c = 0; c < a.length; c += 1) a[c].style.cssText = b
- },
- T8: function (a, b) {
- ';' !== b[b.length - 1] && (b += ';')
- return b.toLowerCase() !== a.style.cssText.replace(/ /g, '').toLowerCase() ? ((a.style.cssText = b), !0) : !1
- },
- $a: function (a, b) {
- a = a instanceof Array ? a : [a]
- for (var c = 0; c < a.length; c += 1) for (var d in b) b.hasOwnProperty(d) && (a[c].style[d] = b[d])
- return this
- },
- Iz: function (a) {
- for (; a.childNodes.length; ) a.removeChild(a.childNodes[0])
- },
- remove: function (a) {
- a && a.parentNode && a.parentNode.removeChild(a)
- },
- rotate: function (a, b, c) {
- var d = g.f.pg
- c = c || { x: a.clientWidth / 2, y: a.clientHeight / 2 }
- d
- ? ((a.style[d] = '' + (' rotate(' + b + 'deg)')), (a.style[g.f.ot[d] + '-origin'] = c.x + 'px ' + c.y + 'px'))
- : ((d = Math.cos((b * Math.PI) / 180)),
- (b = Math.sin((b * Math.PI) / 180)),
- (a.style.filter = 'progid:DXImageTransform.Microsoft.Matrix()'),
- 0 < a.filters.length && ((a = a.filters.item(0)), (a.Dx = -c.x * d + c.y * b + c.x), (a.Dy = -c.x * b - c.y * d + c.y), (a.M11 = a.M22 = d), (a.M12 = -(a.M21 = b))))
- },
- C4: function (a, b, c) {
- var d = g.f.pg
- c = c || { x: a.clientWidth / 2, y: a.clientHeight / 2 }
- return d ? g.f.ot[d] + ':' + ('' + (' rotate(' + b + 'deg)')) + ';' + (g.f.ot[d] + '-origin:' + c.x + 'px ' + c.y + 'px') : ''
- },
- xm: function (a, b, c) {
- a.width = b
- a.height = c
- },
- getElementsByClassName: function (a, b, c) {
- b = b || '*'
- c = c || document
- if (c.getElementsByClassName) return c.getElementsByClassName(a)
- b = c.getElementsByTagName(b)
- a = RegExp('(^|\\s)' + a + '(\\s|$)')
- c = []
- for (var d = 0, e; d < b.length; d++) (e = b[d]), a.test(e.className) && c.push(e)
- return c
- },
- fillText: function (a, b) {
- if (a) return void 0 !== a.textContent ? (a.textContent = b) : void 0 !== a.innerText ? (a.innerText = b) : (a.innerHTML = b), a
- },
- }
- ;(function () {
- var a = g.f.YU(['userSelect', 'WebkitUserSelect', 'OUserSelect', 'MozUserSelect', 'msUserSelect']),
- b
- g.extend(g.f, {
- b3: function () {
- g.F.h(window, 'selectstart', g.F.preventDefault)
- if (a) {
- var c = document.documentElement.style
- 'none' !== c[a] && ((b = c[a]), (c[a] = 'none'))
- }
- },
- o3: function () {
- g.F.G(window, 'selectstart', g.F.preventDefault)
- a && 'none' !== b && ((document.documentElement.style[a] = b), (b = 'none'))
- },
- Poa: function () {
- g.F.h(window, 'dragstart', g.F.preventDefault)
- },
- ypa: function () {
- g.F.G(window, 'dragstart', g.F.preventDefault)
- },
- })
- })()
- g.f.pg = g.f.YU(['WebkitTransform', 'OTransform', 'MozTransform', 'msTransform', 'transform'])
- g.f.ot = { transform: 'transform', WebkitTransform: '-webkit-transform', OTransform: '-o-transform', MozTransform: '-moz-transform', msTransform: '-ms-transform' }
- g.f.JF = g.f.YU(['webkitTransition', 'transition', 'OTransition', 'MozTransition', 'msTransition'])
- g.f.bBa = 'webkitTransition' === g.f.JF || 'OTransition' === g.f.JF ? g.f.JF + 'End' : 'transitionend'
- g.F = {
- h: function (a, b, c, d) {
- function e(b) {
- b = b || window.event
- b.target = b.target || b.srcElement
- return c.call(d || a, b, k)
- }
- var f = g.a.yb(a) + '_' + g.a.yb(c) + '_' + g.a.yb(d || a),
- h = b + f
- if (a[h]) return this
- var k = b
- g.l.bR && 'mousewheel' === b && (b = 'DOMMouseScroll')
- if (g.l.Es && ('mouseover' === b || 'mouseout' === b)) {
- var l = e
- b = 'mouseover' === b ? 'mouseenter' : 'mouseleave'
- e = function (a) {
- l(a)
- }
- }
- if (g.l.P7 && 0 === b.indexOf('touch')) return (a[h] = e), this.Tla(a, b, e, f)
- g.l.Tf && 'dblclick' === b && this.Rla && this.Rla(a, e, f)
- 'addEventListener' in a ? a.addEventListener(b, e, !1) : 'attachEvent' in a ? a.attachEvent('on' + b, e) : (a['on' + b] = e)
- a[h] = e
- return this
- },
- Cj: function (a, b, c, d) {
- var e = this
- this.h(
- a,
- b,
- function h(k) {
- e.G(a, b, h, d)
- return c.call(d || a, k || window.event, b)
- },
- d
- )
- },
- G: function (a, b, c, d) {
- c = g.a.yb(a) + '_' + g.a.yb(c) + '_' + g.a.yb(d || a)
- d = b + c
- var e = a[d]
- g.l.bR && 'mousewheel' === b && (b = 'DOMMouseScroll')
- !g.l.Es || ('mouseover' !== b && 'mouseout' !== b) || (b = 'mouseover' === b ? 'mouseenter' : 'mouseleave')
- g.l.P7 && -1 < b.indexOf('touch')
- ? this.zwa(a, b, c)
- : g.l.Tf && 'dblclick' === b && this.vwa
- ? this.vwa(a, c)
- : 'removeEventListener' in a
- ? a.removeEventListener(b, e, !1)
- : 'detachEvent' in a && -1 === b.indexOf('touch')
- ? e && a.detachEvent('on' + b, e)
- : (a['on' + b] = null)
- a[d] = void 0
- return this
- },
- BHa: function (a, b) {
- var c = document.createEvent('MouseEvents')
- c.initMouseEvent(a, !0, !0, window, 1, b.screenX, b.screenY, b.clientX, b.clientY, !1, !1, !1, !1, 0, null)
- b.target.dispatchEvent(c)
- },
- Yla: function (a) {
- a.$e = 'info'
- g.l.Ue && g.F.stopPropagation(a)
- },
- stopPropagation: function (a) {
- a.stopPropagation ? a.stopPropagation() : (a.cancelBubble = !0)
- return this
- },
- bya: function (a) {
- var b = g.F.Yla
- g.l.Tf && (g.F.h(a, 'touchstart', b, this), g.F.h(a, 'touchmove', b, this), g.F.h(a, 'touchend', b, this))
- g.l.ba || (g.F.h(a, 'mousedown', b, this), g.F.h(a, 'mouseup', b, this), g.F.h(a, 'mousemove', b, this), g.F.h(a, 'mousewheel', b, this))
- g.l.FT && (g.F.h(a, 'pointerdown', b, this), g.F.h(a, 'pointerup', b, this), g.F.h(a, 'pointermove', b, this))
- g.l.I6 && (g.F.h(a, 'MSPointerDown', b, this), g.F.h(a, 'MSPointerUp', b, this), g.F.h(a, 'MSPointerMove', b, this))
- },
- preventDefault: function (a) {
- a.preventDefault ? a.preventDefault() : (a.returnValue = !1)
- return this
- },
- stop: function (a) {
- return g.F.preventDefault(a).stopPropagation(a)
- },
- rxa: function (a) {
- return a && a.getBoundingClientRect ? ((a.rM = a.getBoundingClientRect()), (a.SW = [a.clientLeft, a.clientTop]), !0) : !1
- },
- sza: function (a) {
- a.rM && ((a.rM = null), (a.SW = null))
- },
- Npa: function (a, b) {
- var c = b.rM || b.getBoundingClientRect(),
- d = b.SW || [b.clientLeft, b.clientTop]
- return new g.H(a.clientX - c.left - d[0], a.clientY - c.top - d[1])
- },
- km: function (a, b) {
- if (b && b.getBoundingClientRect) return this.Npa(a, b)
- var c = document.body,
- d = document.documentElement,
- c = new g.H(g.l.Tf ? a.pageX : a.clientX + (c.scrollLeft || d.scrollLeft), g.l.Tf ? a.pageY : a.clientY + (c.scrollTop || d.scrollTop))
- return b ? c.ab(g.f.RR(b)) : c
- },
- M5: function (a) {
- return 1 === a.which || 0 === a.button || 1 === a.button
- },
- }
- g.extend(g.F, {
- uO: [],
- h_: !1,
- Tla: function (a, b, c, d) {
- switch (b) {
- case 'touchstart':
- return this.Wla(a, b, c, d)
- case 'touchend':
- return this.Ula(a, b, c, d)
- case 'touchmove':
- return this.Vla(a, b, c, d)
- }
- },
- No: function (a) {
- if (g.l.FT) return a
- switch (a) {
- case 'pointerdown':
- return 'MSPointerDown'
- case 'pointerup':
- return 'MSPointerUp'
- case 'pointercancel':
- return 'MSPointerCancel'
- case 'pointermove':
- return 'MSPointerMove'
- }
- },
- Wla: function (a, b, c, d) {
- function e(a) {
- for (var b = !1, d = 0; d < f.length; d += 1)
- if (f[d].pointerId === a.pointerId) {
- b = !0
- break
- }
- b || f.push(a)
- a.touches = f.slice()
- a.changedTouches = [a]
- c(a)
- }
- var f = this.uO
- a['_amap_touchstart' + d] = e
- a.addEventListener(this.No('pointerdown'), e, !1)
- this.h_ ||
- ((a = function (a) {
- for (var b = 0; b < f.length; b += 1)
- if (f[b].pointerId === a.pointerId) {
- f.splice(b, 1)
- break
- }
- }),
- document.documentElement.addEventListener(this.No('pointerup'), a, !1),
- document.documentElement.addEventListener(this.No('pointercancel'), a, !1),
- (this.h_ = !0))
- return this
- },
- Vla: function (a, b, c, d) {
- function e(a) {
- if (a.pointerType !== a.MSPOINTER_TYPE_MOUSE || 0 !== a.buttons) {
- for (var b = 0; b < f.length; b += 1)
- if (f[b].pointerId === a.pointerId) {
- f[b] = a
- break
- }
- a.touches = f.slice()
- a.changedTouches = [a]
- c(a)
- }
- }
- var f = this.uO
- a['_amap_touchmove' + d] = e
- a.addEventListener(this.No('pointermove'), e, !1)
- return this
- },
- Ula: function (a, b, c, d) {
- function e(a) {
- for (var b = 0; b < f.length; b += 1)
- if (f[b].pointerId === a.pointerId) {
- f.splice(b, 1)
- break
- }
- a.touches = f.slice()
- a.changedTouches = [a]
- c(a)
- }
- var f = this.uO
- a['_amap_touchend' + d] = e
- a.addEventListener(this.No('pointerup'), e, !1)
- a.addEventListener(this.No('pointercancel'), e, !1)
- return this
- },
- zwa: function (a, b, c) {
- c = a['_amap_' + b + c]
- switch (b) {
- case 'touchstart':
- a.removeEventListener(this.No('pointerdown'), c, !1)
- break
- case 'touchmove':
- a.removeEventListener(this.No('pointermove'), c, !1)
- break
- case 'touchend':
- a.removeEventListener(this.No('pointerup'), c, !1), a.removeEventListener(this.No('pointercancel'), c, !1)
- }
- return this
- },
- })
- ;(function () {
- function a(a) {
- var b = a.target || a.srcElement
- b.cX && f(b.cX)
- b.cX = e(function () {
- var c = b.Bp
- if (c && c.Ap) for (var d = 0; d < c.Ap.length; d += 1) c.Ap[d].call(c, a)
- })
- }
- function b() {
- var b = this.contentDocument.defaultView
- b.Bp = this.aca
- b.addEventListener('resize', a)
- a.call(b, { target: b })
- }
- var c = document.attachEvent,
- d = navigator.userAgent.match(/(Trident|Edge)/),
- e = g.a.Wc,
- f = g.a.ri
- g.extend(g.F, {
- Xla: function (e, f) {
- if (!e.Ap)
- if (((e.Ap = []), c)) (e.Bp = e), e.attachEvent('onresize', a)
- else {
- 'static' === window.getComputedStyle(e).position && (e.style.position = 'relative')
- var l = (e.Bp = document.createElement('object'))
- l.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;')
- l.aca = e
- l.onload = b
- l.type = 'text/html'
- d && e.appendChild(l)
- l.data = 'about:blank'
- d || e.appendChild(l)
- }
- e.Ap.push(f)
- },
- RGa: function (b, d) {
- b.Ap.splice(b.Ap.indexOf(d), 1)
- b.Ap.length || (c ? b.detachEvent('onresize', a) : (b.Bp.contentDocument.defaultView.removeEventListener('resize', a), (b.Bp = !b.removeChild(b.Bp))))
- },
- Cna: function (a) {
- a.Ap = null
- if (a.Bp) {
- var b = a.Bp
- b.parentNode === a && b.parentNode.removeChild(b)
- a.Bp = null
- }
- },
- })
- })()
- g.tb = {
- kua: g.r.Gb + '/maps',
- Ru: g.da.Ru,
- XS: 0,
- Cz: [],
- Mu: {},
- Fg: function (a, b) {
- function c() {
- d += 1
- d === e.length && b && b()
- }
- a.length || b()
- for (var d = 0, e = [], f = 0; f < a.length; f += 1) {
- var h = this.Ru[a[f]]
- if (h) for (var k = 0; k < h.length; k += 1) e.push(h[k])
- e.push(a[f])
- }
- for (f = 0; f < e.length; f += 1) this.YQ(e[f], c)
- },
- ID: function (a) {
- for (var b = 0; b < a.length; b += 1) if (1 !== this.QC(a[b]).status) return !1
- return !0
- },
- YQ: function (a, b) {
- var c = this.QC(a)
- if (1 === c.status) b && b()
- else {
- b && c.ly.push(b)
- try {
- if (g.l.Gv && window.localStorage) {
- var d = window.localStorage['_AMap_' + a]
- d && ((d = JSON.parse(d)), d.version === g.r.Dk ? (window._jsload_(a, d.script, !0), d.css && window._cssload_(a, d.css, !0)) : window.localStorage.removeItem('_AMap_' + a))
- }
- } catch (e) {}
- if (0 === c.status) {
- this.cwa(a)
- var f = this
- f.XS ||
- ((f.XS = 1),
- window.setTimeout(function () {
- f.XS = 0
- var a = f.kua + '/modules?v=' + g.r.ln + '&key=' + g.r.key + '&m=' + f.Cz.join(',') + '&vrs=' + g.r.Dk
- g.tb.Pt(f.Cz.join(','))
- f.Cz = []
- c.TK = f.Bta(a)
- }, 1))
- c.status = -1
- }
- }
- },
- Pt: function (a) {
- a = g.r.Zd + '/v3/log/init?' + ['s=rsv3&product=JsModule&key=' + g.r.key, 'm=' + a].join('&')
- new g.jb.zb(a, { callback: 'callback' })
- },
- load: function (a, b) {
- var c = this.Ru[a]
- if (c) {
- for (var d = [], e = 0; e < c.length; e += 1) d.push(c[e])
- d.push(a)
- for (
- var f = 0,
- c = function () {
- f += 1
- f === d.length && b && b()
- },
- e = 0;
- e < d.length;
- e += 1
- )
- this.YQ(d[e], c)
- } else this.YQ(a, b)
- },
- cwa: function (a) {
- for (var b = 0; b < this.Cz.length; b += 1) if (this.Cz[b] === a) return
- this.Cz.push(a)
- },
- Nn: function (a, b) {
- var c = this.QC(a)
- try {
- eval(b)
- } catch (d) {
- return
- }
- c.status = 1
- for (var e = 0, f = c.ly.length; e < f; e += 1) c.ly[e]()
- c.ly = []
- },
- pd: function (a, b) {
- var c = this
- c.timeout = setTimeout(function () {
- 1 !== c.Mu[a].status ? (c.remove(a), c.load(a, b)) : clearTimeout(c.timeout)
- }, 5e3)
- },
- QC: function (a) {
- this.Mu[a] || ((this.Mu[a] = {}), (this.Mu[a].status = 0), (this.Mu[a].ly = []))
- return this.Mu[a]
- },
- remove: function (a) {
- this.Mu[a] = null
- },
- Bta: function (a) {
- g.r.mode && (a += '&mode=' + g.r.mode)
- var b = document.createElement('script')
- b.charset = 'utf-8'
- a && 0 === a.indexOf(g.r.Gb) && (b.crossOrigin = 'Anonymous')
- b.src = a
- document.body.appendChild(b)
- return b
- },
- }
- window._jsload_ = function (a, b, c) {
- var d = g.tb.QC(a)
- d.TK && 0 <= g.a.indexOf(document.body.childNodes, d.TK) && document.body.removeChild(d.TK)
- d.TK = null
- try {
- if (!c && window.localStorage && b && '' !== b && g.l.Gv) {
- var e = window.localStorage['_AMap_' + a],
- e = e || '{}',
- e = JSON.parse(e)
- e.version !== g.r.Dk || e.script
- ? window.localStorage.setItem('_AMap_' + a, JSON.stringify({ version: g.r.Dk, script: b }))
- : window.localStorage.setItem('_AMap_' + a, JSON.stringify({ version: g.r.Dk, script: b, css: e.css }))
- }
- } catch (f) {}
- g.tb.Nn(a, b)
- }
- window._cssload_ = function (a, b, c) {
- try {
- !c && window.localStorage && b && '' !== b && g.l.Gv && window.localStorage.setItem('_AMap_' + a, JSON.stringify({ css: b, version: g.r.Dk }))
- } catch (d) {}
- var e = document.createElement('style')
- e.type = 'text/css'
- ;-1 === g.r.Gb.indexOf('webapi.amap.com') && (b = b.replace(/webapi.amap.com/gi, g.r.Gb.split('://')[1]))
- 'https' === g.r.tc && (b = b.replace(/http:/gi, 'https:'))
- e.styleSheet
- ? ((a = function () {
- try {
- e.styleSheet.cssText = b
- } catch (a) {}
- }),
- e.styleSheet.disabled ? setTimeout(a, 10) : a())
- : e.appendChild(document.createTextNode(b))
- a = document.head || document.getElementsByTagName('head')[0]
- 2 > a.childNodes.length ? a.appendChild(e) : a.insertBefore(e, a.childNodes[1])
- }
- ;(function (a) {
- var b = g.l
- if (!g.indexedDB && b.Ni) {
- var c = a.indexedDB || a.webkitIndexedDB || a.msIndexedDB || a.mozIndexedDB,
- d = a.IDBKeyRange || a.oIa || a.WFa || a.VFa
- if (c) {
- var e = g.a,
- f = null
- a = 'amap-jsapi' + (a.CAa ? '-debug' : '')
- var h = g.extend({}, g.va),
- k
- try {
- ;(k = c.open(a)),
- (k.onsuccess = function () {
- f = this.result
- h.q('dbReady', { status: 'success' })
- }),
- (k.onerror = function () {
- h.q('dbReady', { status: 'error' })
- }),
- (k.onblocked = function () {
- h.q('dbReady', { status: 'blocked' })
- }),
- (k.onupgradeneeded = function (a) {
- a.currentTarget.result.createObjectStore('tile', { keyPath: 'tileKey' })
- })
- } catch (l) {
- b.Ni = !1
- } finally {
- if (!b.Ni) return
- }
- var b = function (a) {
- return function () {
- try {
- return a.apply(this, arguments)
- } catch (b) {
- var c = arguments[arguments.length - 1]
- 'function' === typeof c &&
- setTimeout(function () {
- c({ code: 4, HI: b })
- }, 1)
- }
- }
- },
- m = b(function (a, b) {
- return null === f
- ? (setTimeout(function () {
- b && b({ code: 3 })
- }, 1),
- null)
- : f.transaction('tile', a).objectStore('tile')
- })
- g.indexedDB = {
- kC: function (a, b) {
- f
- ? 'function' === typeof a && a()
- : h.h('dbReady', function (c) {
- 'success' === c.status ? 'function' === typeof a && a() : 'function' === typeof b && b({ code: 3, status: status })
- })
- },
- count: b(function (a) {
- var b = this,
- c = arguments
- this.kC(function () {
- b.Pt.apply(b, c)
- }, a)
- }),
- Pt: b(function (a) {
- var b = m('readonly', a).count()
- b.onsuccess = function () {
- a(null, b.result)
- }
- b.onerror = function () {
- a({ code: 7 })
- }
- }),
- get: b(function (a, b, c) {
- var d = this,
- e = setTimeout(function () {
- e && ((e = null), c && c({ code: 7 }))
- }, b.timeout || 1e3)
- this.kC(function () {
- d.Jea.call(d, a, function (a, b) {
- e && (clearTimeout(e), (e = null), c(a, b))
- })
- }, c)
- }),
- Jea: b(function (a, b) {
- var c = m('readonly', b)
- if (e.isArray(a)) {
- var d, f
- ;(function () {
- function e(b) {
- var f = c.get(a[b])
- f.onsuccess = function (a) {
- a.target.result && (d[b] = a.target.result)
- h()
- }
- f.onerror = h
- }
- function h() {
- f++
- f === a.length && b(null, d)
- }
- d = []
- for (var k = (f = 0), l = a.length; k < l; k++) e(k)
- })()
- } else {
- var h = c.get(a)
- h.onsuccess = function (a) {
- b && b(null, a.target.result)
- }
- h.onerror = function () {
- b && b({ code: 1 })
- }
- }
- }),
- add: b(function (a, b) {
- var c = this,
- d = arguments
- this.kC(function () {
- c.eca.apply(c, d)
- }, b)
- }),
- eca: b(function (a, b) {
- function c() {
- 0 === --f && b(null)
- }
- e.isArray(a) || (a = [a])
- var d = a.length,
- f = d,
- h = 0,
- k = Math.ceil(d / 5),
- l = setInterval(function () {
- if (h++ < k) {
- var e = 5 * h
- e > d && (e = d)
- for (var f = m('readwrite', b), s = 5 * (h - 1); s < e; s++) {
- var E = f.put(a[s])
- E.onsuccess = E.onerror = c
- }
- } else clearInterval(l)
- }, 32)
- }),
- remove: b(function (a, b) {
- var c = this,
- d = arguments
- this.kC(function () {
- c.qka.apply(c, d)
- }, b)
- }),
- qka: b(function (a, b) {
- var c = m('readwrite', b)
- e.isArray(a) || (a = [a])
- a = a.sort()
- c.openCursor(d.bound(a[0], a[a.length - 1])).onsuccess = function (c) {
- if ((c = c.target.result)) {
- if (e.ka(c.value.tileKey, a)) c['delete']()
- for (var d = -1, f = 0, h = a.length; f < h; f++)
- if (a[f] > c.value.tileKey) {
- d = f
- break
- }
- c['continue'](a[d])
- } else b && b(null)
- }
- }),
- clear: b(function (a) {
- var b = this,
- c = arguments
- this.kC(function () {
- b.bG.apply(b, c)
- }, a)
- }),
- bG: b(function (a) {
- var b = m('readwrite', a).clear()
- b.onsuccess = function () {
- a && a(null)
- }
- b.onerror = function () {
- a && a({ code: 2 })
- }
- }),
- }
- } else b.Ni = !1
- }
- })(window)
- ;(function () {
- function a(a) {
- u.data.keys = u.data.keys
- .filter(function (b) {
- return !r.ka(a, b)
- })
- .concat(a)
- }
- function b(a) {
- var b = g.r.Dk + '|' + a.Oi.replace(/\//g, ',') + '|' + (a.Mf ? 'w' : 'v') + '|',
- c
- c = a.ja
- var d = a.Ae
- c = [c ? 1 : 0, q.ba ? 1 : 0, d ? 1 : 0].join()
- return b + c + '|' + m(a.url)
- }
- function c() {
- u.data.keys.length >= u.VL && d()
- }
- function d() {
- var a = u.data.keys.length,
- b = Math.floor(a / 2)
- a > u.VL && (b = Math.floor(a - u.VL / 2))
- a = u.data.keys.slice(0, b)
- u.data.keys = u.data.keys.slice(b + 1)
- s.remove(a, function (a) {
- a && 3 === a.code && (q.Ni = !1)
- })
- }
- function e() {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : r.Rs
- k()
- w.setItem(u.key, u.data, !0)
- f(a)
- }
- function f(a) {
- q.Ni &&
- s &&
- s.clear(function (b) {
- b && 3 === b.code && (q.Ni = !1)
- a()
- })
- }
- function h() {
- k()
- var a = w.getItem(u.key, !0)
- a && (a.vdataVer === u.data.vdataVer && a.apiVer === u.data.apiVer ? (u.data = a) : e())
- }
- function k() {
- u.data = { vdataVer: q.lf, apiVer: g.r.Dk, keys: [], config: {}, fsTiles: {} }
- u.pt = {}
- }
- function l(a) {
- a && ((u.data.vdataVer = a), (q.lf = a))
- }
- function m(a) {
- var b = 'limg'
- ;/flds=([^&]+)/.test(a) && (b = RegExp.$1)
- return b
- }
- function n(a) {
- if ('object' === typeof a && null !== a) {
- var b = []
- if (r.isArray(a))
- if (Object.keys(a).length == a.length)
- b = a.map(function (a) {
- return n(a)
- })
- else {
- b.push('__arrayObject')
- var c = {},
- d
- for (d in a) (0 > parseInt(d) || isNaN(parseInt(d))) && a.hasOwnProperty(d) && (c[d] = n(a[d]))
- b.push(c)
- b.push(
- a.map(function (a) {
- return n(a)
- })
- )
- }
- else if (r.jk(a, 'Float32Array')) b.push('__Float32Array'), b.push(Array.prototype.slice.call(a))
- else if (r.jk(a, 'Uint16Array')) b.push('__Uint16Array'), b.push(Array.prototype.slice.call(a))
- else for (d in ((b = {}), a)) a.hasOwnProperty(d) && (b[d] = n(a[d]))
- return b
- }
- return a
- }
- function p(a) {
- if ('object' === typeof a && null !== a) {
- var b = {}
- if (r.isArray(a))
- if ('__Float32Array' === a[0]) b = new Float32Array(a[1])
- else if ('__Uint16Array' === a[0]) b = new Uint16Array(a[1])
- else if ('__arrayObject' === a[0]) {
- b = p(a[2])
- a = a[1]
- for (var c in a) a.hasOwnProperty(c) && (b[c] = a[c])
- } else
- b = a.map(function (a) {
- return p(a)
- })
- else for (c in a) a.hasOwnProperty(c) && (b[c] = p(a[c]))
- return b
- }
- return a
- }
- var q = g.l,
- r = g.a
- if (!g.Nj && q.Ni) {
- var s = g.indexedDB,
- u = { VL: 1e3, key: '_AMap_data.tileKeys' },
- v = [],
- w = {
- getItem: function (a, b) {
- var c = localStorage.getItem(a)
- if (c && b) {
- var d
- try {
- d = JSON.parse(c)
- } catch (e) {
- d = null
- }
- c = d
- }
- return c
- },
- setItem: function (a, b, c) {
- var d = b
- c && ((d = JSON.stringify(b)), 1.5 < d.length / 1024 / 1024 && Object.keys(b.gqa).length && ((b.gqa = {}), (d = JSON.stringify(b))))
- try {
- localStorage.setItem(a, d)
- } catch (f) {
- e()
- }
- },
- }
- g.Nj = {
- clear: e,
- get: function (c, d) {
- function f(a) {
- var b = { iS: l, F6: G, SFa: w, Tg: u.data.config }
- a &&
- B.length &&
- (/\|limg/.test(B[0])
- ? (b.l6 = a
- .map(function (a) {
- return JSON.parse(a.data)
- })
- .filter(function (a) {
- return a && a.key
- }))
- : (b.Oc = h(a)))
- d && d(null, b)
- w.length && ((l = []), (G = []))
- }
- function h(a) {
- var b = []
- m(c.url)
- .split(',')
- .forEach(function (c) {
- a.forEach(function (a) {
- if ((a = JSON.parse(a.data[c]))) {
- var d = a.Hg
- a.Hg = new g.pr(d.z, d.x, d.y)
- a.Hg.T = d.T
- b.push(a)
- }
- })
- })
- return b
- }
- var k = 'FS' === c.type
- if (!q.Gv || !(k || (q.Ni && 0 !== u.data.keys.length))) return d({ code: 1 })
- var l = [],
- w = [],
- B = [],
- G = [],
- H = []
- c.vya.forEach(function (a) {
- var d = !1,
- e = b({ Oi: a.key, url: c.url, Mf: c.Mf, ja: c.o.ja, Ae: c.Ae })
- k && (v.push(e), u.data.fsTiles[e] && (l.push(a), B.push(e), H.push({ data: p(u.data.fsTiles[e]), tileKey: e }), (d = !0)))
- d || (q.Ni && r.ka(u.data.keys, e) ? (B.push(e), w.push(a)) : G.push(a))
- })
- if ((k && 0 === w.length) || 0 === B.length) return f(H)
- k &&
- H.length &&
- H.forEach(function (a) {
- a = r.indexOf(B, a.tileKey)
- B.splice(a, 1)
- })
- s.get(B, { timeout: c.timeout || 1e3 }, function (b, c) {
- if (b || c.length !== B.length) b && 3 === b.code ? (q.Ni = !1) : e(), (G = w), (w = []), f(null)
- else {
- if (k)
- for (var d = c.length - 1; 0 <= d; d--) {
- var h = c[d]
- h && h.data ? (u.data.fsTiles[h.tileKey] = n(h.data)) : G.push(w.splice(d, 1)[0])
- }
- l = w
- w = []
- f(c)
- a(B)
- }
- })
- ;(G.length || w.length) && f(H)
- },
- yw: function (a) {
- a.Ib.forEach(function (c) {
- c = b({ Oi: c.key, url: a.url, Mf: a.Mf, ja: a.o.ja, Ae: a.Ae })
- u.pt[c] && delete u.pt[c]
- })
- },
- set: function (a, c) {
- a.lf && a.lf !== u.data.vdataVer && (l(a.lf), e(), c && c({ code: 2 }))
- !a.qd && a.Oc
- ? a.Oc.forEach(function (c) {
- var d = b({ Oi: c.Oi, url: a.url, Mf: a.Mf, ja: a.o.ja, Ae: a.Ae })
- if (q.Ni || r.ka(v, d)) {
- var e = u.pt[d] || {}
- e[c.Ed] = c.Oa
- u.pt[d] = e
- }
- })
- : a.data &&
- a.data.forEach(function (c) {
- var d = b({ Oi: c.key, url: a.url, Mf: a.Mf, ja: a.o.ja, Ae: a.Ae })
- if (q.Ni || r.ka(v, d)) u.pt[d] = c.data
- })
- u.data.config = { 'x-vd-v': a['x-vd-v'], tv: a.tv, bgc: a.bgc }
- },
- flush: (function () {
- var a = !0
- return function () {
- var b = this
- if (a) {
- if (Object.keys(u.data.fsTiles).length) for (var c in u.data.fsTiles) u.data.fsTiles.hasOwnProperty(c) && !r.ka(v, c) && delete u.data.fsTiles[c]
- q.Ni
- ? s.count(function (a, c) {
- a ||
- (c !== u.data.keys.length
- ? (u.data.keys.length && (u.data.keys = []),
- f(function () {
- b.rG(!0)
- }))
- : b.rG(!0))
- })
- : b.rG(!0)
- a = !1
- } else b.rG()
- }
- })(),
- rG: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : !1,
- b = {},
- d = [],
- f = Object.keys(u.pt),
- h = []
- f.length
- ? (f.forEach(function (a) {
- var c = u.pt[a]
- a
- .split('|')
- .pop()
- .split(',')
- .every(function (a) {
- return 'limg' === a ? !0 : c && void 0 !== c[a]
- })
- ? (r.ka(u.data.keys, a) || (h.push(a), d.push({ tileKey: a, data: c })), r.ka(v, a) && void 0 === u.data.fsTiles[a] && (u.data.fsTiles[a] = c))
- : (b[a] = c)
- }),
- d.length &&
- (q.Ni
- ? s.add(d, function (a) {
- a ? (3 !== a.code ? e() : (q.Ni = !1)) : ((u.data.keys = u.data.keys.concat(h)), w.setItem(u.key, u.data, !0), c())
- })
- : w.setItem(u.key, u.data, !0)),
- (u.pt = b))
- : (a && w.setItem(u.key, u.data, !0), c())
- },
- }
- h()
- }
- })()
- g.U = g.da.extend({
- A: function (a, b, c) {
- var d = parseFloat(b),
- e = parseFloat(a)
- if (isNaN(a) || isNaN(b)) throw 'Invalid Object: LngLat(' + e + ', ' + d + ')'
- !0 !== c && ((d = Math.max(Math.min(d, 90), -90)), (e = ((e + 180) % 360) + (-180 > e || 180 === e ? 180 : -180)))
- this.Q = d
- this.R = e
- this.lng = Math.round(1e6 * e) / 1e6
- this.lat = Math.round(1e6 * d) / 1e6
- },
- AR: function () {
- return g.a.wb(this.R, 6)
- },
- xR: function () {
- return g.a.wb(this.Q, 6)
- },
- add: function (a, b) {
- return new g.U(this.R + a.R, this.Q + a.Q, b)
- },
- ab: function (a, b) {
- return new g.U(this.R - a.R, this.Q - a.Q, b)
- },
- ld: function (a, b) {
- return new g.U(this.R / a, this.Q / a, b)
- },
- Nd: function (a, b) {
- return new g.U(this.R * a, this.Q * a, b)
- },
- Ge: function (a) {
- return g.Ft.distance(this, a)
- },
- offset: function (a, b) {
- if (isNaN(a) || isNaN(b)) return !1
- var c = 2 * Math.asin(Math.sin(Math.round(a) / 12756274) / Math.cos((this.Q * Math.PI) / 180)),
- c = this.R + (180 * c) / Math.PI,
- d = 2 * Math.asin(Math.round(b) / 12756274)
- return new g.U(c, this.Q + (180 * d) / Math.PI)
- },
- gb: function (a) {
- a = g.a.Ka(a)
- return a instanceof g.U ? 1e-9 >= Math.max(Math.abs(this.Q - a.Q), Math.abs(this.R - a.R)) : !1
- },
- toString: function () {
- return g.a.wb(this.R, 6) + ',' + g.a.wb(this.Q, 6)
- },
- wl: function () {
- return [this.R, this.Q]
- },
- cb: function () {
- var a = this.controlPoints,
- b = new g.U(this.R, this.Q)
- a && (b.controlPoints = [].concat(a))
- return b
- },
- })
- g.U.Nqa = function (a, b, c) {
- c = c + 1 || Math.round(Math.abs(a.R - b.R))
- if (!c || 0.001 > Math.abs(a.R - b.R)) return []
- var d = [],
- e = Math.PI,
- f = g.Lm.Pu,
- h = g.Lm.iwa,
- k = Math.asin,
- l = Math.sqrt,
- m = Math.sin,
- n = Math.pow,
- p = Math.cos,
- q = Math.atan2,
- r = a.Q * f
- a = a.R * f
- var s = b.Q * f
- b = b.R * f
- for (var k = 2 * k(l(n(m((r - s) / 2), 2) + p(r) * p(s) * n(m((a - b) / 2), 2))), u, v, w, t, f = 1; f < c; f += 1)
- (u = (1 / c) * f),
- (v = m((1 - u) * k) / m(k)),
- (w = m(u * k) / m(k)),
- (u = v * p(r) * p(a) + w * p(s) * p(b)),
- (t = v * p(r) * m(a) + w * p(s) * m(b)),
- (v = v * m(r) + w * m(s)),
- (v = q(v, l(n(u, 2) + n(t, 2)))),
- (u = q(t, u)),
- b > a ? (u < a && (u += 2 * e), u > b && (u -= 2 * e)) : (u > a && (u -= 2 * e), u < b && (u += 2 * e)),
- d.push(new g.U(u * h, v * h, !0))
- return d
- }
- g.U.Xb({ AR: 'getLng', xR: 'getLat', add: 'add', ab: 'subtract', ld: 'divideBy', Nd: 'multiplyBy', Ge: 'distance', offset: 'offset', gb: 'equals', toString: 'toString' })
- g.oe = g.da.extend({
- A: function () {
- this.CLASS_NAME = 'AMap.Bounds'
- var a = null,
- b = null
- if (1 === arguments.length && arguments[0] instanceof Array) (a = new g.U(arguments[0][0], arguments[0][1], !0)), (b = new g.U(arguments[0][2], arguments[0][3], !0))
- else if (2 === arguments.length) (a = g.a.Ka(arguments[0])), (b = g.a.Ka(arguments[1]))
- else if (4 === arguments.length) (a = new g.U(arguments[0], arguments[1])), (b = new g.U(arguments[2], arguments[3]))
- else if (0 === arguments.length) (a = new g.U(-180, -90)), (b = new g.U(180, 90))
- else throw 'Invalid Object: Bounds(' + arguments.join(',') + ')'
- this.wc = a
- this.nc = b
- },
- iv: function () {
- return this.wc
- },
- Py: function () {
- return this.nc
- },
- dk: function () {
- return new g.U(this.wc.R, this.nc.Q, !0)
- },
- Oo: function () {
- return new g.U(this.nc.R, this.wc.Q, !0)
- },
- contains: function (a) {
- var b = this.wc,
- c = this.nc,
- d
- if (a instanceof g.tp) return this.dV().contains(a)
- a instanceof g.oe ? ((d = a.wc), (a = a.nc)) : (d = a = g.a.Ka(a))
- var e = d.R,
- f = b.R,
- h = a.R,
- k = c.R
- f > k && ((k += 360), 0 > e && (e += 360), 0 > h && (h += 360))
- return d.Q >= b.Q && a.Q <= c.Q && e >= f && h <= k
- },
- Zg: function (a) {
- var b = this.wc,
- c = this.nc,
- d = a.wc
- a = a.nc
- var e = a.R >= b.R && d.R <= c.R
- return a.Q >= b.Q && d.Q <= c.Q && e
- },
- xi: function () {
- return new g.U(this.wc.R > this.nc.R ? ((this.wc.R + this.nc.R + 360) / 2) % 360 : (this.wc.R + this.nc.R) / 2, (this.wc.Q + this.nc.Q) / 2)
- },
- extend: function (a) {
- this.wc.R = Math.min(this.wc.R, a.R)
- this.wc.Q = Math.min(this.wc.Q, a.Q)
- this.nc.R = Math.max(this.nc.R, a.R)
- this.nc.Q = Math.max(this.nc.Q, a.Q)
- return this
- },
- rza: function (a) {
- return this.extend(a.wc).extend(a.nc)
- },
- toString: function () {
- return this.wc.toString() + ';' + this.nc.toString()
- },
- cb: function () {
- return new g.oe(this.wc.cb(), this.nc.cb())
- },
- gb: function (a) {
- return a instanceof g.oe ? this.wc.gb(a.wc) && this.nc.gb(a.nc) : !1
- },
- vj: function () {
- return Math.abs(this.nc.R - this.wc.R)
- },
- tj: function () {
- return Math.abs(this.wc.Q - this.nc.Q)
- },
- dV: function (a) {
- var b = [this.iv(), this.Oo(), this.Py(), this.dk()]
- a && b.push(this.iv())
- return new g.tp(b)
- },
- zya: function (a) {
- return new g.Wf(a.kc(this.dk(), 20), a.kc(this.Oo(), 20))
- },
- sR: function (a, b) {
- return this.dV(b).sR(a)
- },
- pR: function (a) {
- return this.zya(a).xi()
- },
- })
- g.oe.Xb({ iv: 'getSouthWest', Py: 'getNorthEast', dk: 'getNorthWest', Oo: 'getSouthEast', contains: 'contains', Zg: 'intersects', xi: 'getCenter', extend: 'extend' })
- g.H = g.da.extend({
- A: function (a, b, c) {
- if (isNaN(a) || isNaN(b)) throw 'Invalid Object: Pixel(' + a + ', ' + b + ')'
- this.x = c ? Math.round(a) : Number(a)
- this.y = c ? Math.round(b) : Number(b)
- },
- vf: function () {
- return this.x
- },
- ue: function () {
- return this.y
- },
- add: function (a, b) {
- return new g.H(this.x + a.x, this.y + a.y, b)
- },
- ab: function (a, b) {
- return new g.H(this.x - a.x, this.y - a.y, b)
- },
- ld: function (a, b) {
- return new g.H(this.x / a, this.y / a, b)
- },
- Nd: function (a, b) {
- return new g.H(this.x * a, this.y * a, b)
- },
- Ge: function (a) {
- var b = a.x - this.x
- a = a.y - this.y
- return Math.sqrt(b * b + a * a)
- },
- floor: function () {
- return new g.H(Math.floor(this.x), Math.floor(this.y))
- },
- round: function () {
- return new g.H(this.x, this.y, !0)
- },
- gb: function (a) {
- return a instanceof g.H && this.x === a.x && this.y === a.y
- },
- cb: function (a) {
- return new g.H(this.x, this.y, a)
- },
- toString: function () {
- return this.x + ',' + this.y
- },
- wl: function () {
- return [this.x, this.y]
- },
- length: function () {
- return Math.sqrt(this.x * this.x + this.y * this.y)
- },
- direction: function () {
- var a = this.x,
- b = this.y
- if (0 === a && 0 === b) return null
- if (0 === a) return 0 < b ? 90 : 270
- var c = (180 * Math.atan(b / a)) / Math.PI
- return 0 > a && 0 < b ? c + 180 : 0 > a && 0 > b ? c + 180 : 0 < a && 0 > b ? c + 360 : c
- },
- Lu: function (a) {
- var b = this.length(),
- c = a.length()
- return b && c ? (180 * Math.acos((this.x * a.x + this.y * a.y) / c / b)) / Math.PI : null
- },
- uoa: function (a) {
- var b = this.length(),
- c = a.length()
- return b && c ? (this.x * a.x + this.y * a.y) / c / b : null
- },
- toFixed: function (a) {
- this.x = g.a.wb(this.x, a)
- this.y = g.a.wb(this.y, a)
- return this
- },
- })
- g.H.Xb({ vf: 'getX', ue: 'getY', add: 'add', ab: 'subtract', ld: 'divideBy', Nd: 'multiplyBy', Ge: 'distance', gb: 'equals', toString: 'toString' })
- g.xd = g.da.extend({
- A: function (a, b, c) {
- if (isNaN(a) || isNaN(b)) throw 'Invalid Object: Size(' + a + ', ' + b + ')'
- this.width = c ? Math.round(a) : Number(a)
- this.height = c ? Math.round(b) : Number(b)
- },
- cb: function () {
- return new g.xd(this.width, this.height)
- },
- vj: function () {
- return this.width
- },
- tj: function () {
- return this.height
- },
- PE: function () {
- return new g.H(this.vj(), this.tj())
- },
- contains: function (a) {
- return Math.abs(a.x) <= Math.abs(this.width) && Math.abs(a.y) <= Math.abs(this.height)
- },
- gb: function (a) {
- return a instanceof g.xd && this.width === a.width && this.height === a.height
- },
- toString: function () {
- return this.vj() + ',' + this.tj()
- },
- })
- g.xd.Xb({ vj: 'getWidth', tj: 'getHeight', toString: 'toString' })
- g.tp = g.da.extend({
- A: function (a) {
- this.CLASS_NAME = 'AMap.ArrayBounds'
- a = g.a.Ka(a)
- this.path = []
- for (var b = 0; b < a.length; b += 1) this.path.push([a[b].R, a[b].Q])
- this.bounds = this.Rd = a
- },
- contains: function (a, b) {
- if (a instanceof g.tp) return g.Ft.isRingInRing(a.path, this.path)
- a instanceof g.H ? (a = [a.x, a.y]) : a instanceof g.U && (a = [a.R, a.Q])
- return g.wd.Sd(a, this.path, b)
- },
- toBounds: function () {
- for (var a = new g.oe(180, 90, -180, -90), b = this.Rd.length - 1; 0 <= b; b -= 1) a.extend(this.Rd[b])
- return a
- },
- sR: function (a) {
- for (var b = [], c = 0; c < this.path.length; c += 1) b[c] = a.kc(this.path[c], 20)
- return b
- },
- pR: function (a) {
- return this.toBounds().pR(a)
- },
- xi: function () {
- return this.toBounds().xi()
- },
- toString: function () {
- return this.path.join(';')
- },
- })
- g.tp.Xb({ contains: 'contains', xi: 'getCenter' })
- g.daa = g.tp.extend({
- A: function (a) {
- this.CLASS_NAME = 'AMap.CoordsBounds'
- this.path = a
- if (a[0] instanceof g.H) {
- this.path = []
- for (var b = 0; b < a.length; b += 1) this.path.push([a[b].x, a[b].y])
- }
- this.bounds = this.Rd = a
- },
- toString: function () {
- return this.path.join(';')
- },
- })
- g.Wf = g.da.extend({
- A: function () {
- if (2 === arguments.length) (this.hc = arguments[0]), (this.Vd = arguments[1])
- else if ((1 === arguments.length && arguments[0] instanceof Array) || 4 === arguments.length) {
- var a = arguments[0] instanceof Array ? arguments[0] : arguments
- this.hc = new g.H(a[0], a[1])
- this.Vd = new g.H(a[2], a[3])
- } else throw 'Invalid Object: PixelBounds(' + arguments.join(',') + ')'
- },
- xi: function (a) {
- return new g.H((this.hc.x + this.Vd.x) / 2, (this.hc.y + this.Vd.y) / 2, a)
- },
- contains: function (a) {
- var b
- a instanceof g.Wf ? ((b = a.hc), (a = a.Vd)) : (b = a)
- return b.x > this.hc.x && a.x < this.Vd.x && b.y > this.hc.y && a.y < this.Vd.y
- },
- vj: function () {
- return this.Vd.x - this.hc.x
- },
- tj: function () {
- return this.Vd.y - this.hc.y
- },
- Zg: function (a, b) {
- b || 0 === b || (b = 20)
- var c = this.hc,
- d = this.Vd,
- e = a.hc,
- f = a.Vd,
- h = f.y >= c.y - b && e.y <= d.y + b
- return f.x >= c.x - b && e.x <= d.x + b && h
- },
- toString: function () {
- return this.hc + ';' + this.Vd
- },
- cb: function () {
- return new g.Wf(this.hc.cb(), this.Vd.cb())
- },
- })
- g.I = {}
- g.I.QP = function (a) {
- for (var b = [Infinity, Infinity, -Infinity, -Infinity], c = 0, d = a.length; c < d; c += 1) g.I.II(b, a[c])
- return b
- }
- g.I.a2 = function (a, b, c) {
- var d = Math.min.apply(null, a)
- a = Math.max.apply(null, a)
- var e = Math.min.apply(null, b)
- b = Math.max.apply(null, b)
- return g.I.qoa(d, a, e, b, c)
- }
- g.I.buffer = function (a, b) {
- a[0] -= b
- a[1] -= b
- a[2] += b
- a[3] += b
- }
- g.I.cb = function (a) {
- return a.slice()
- }
- g.I.Sd = function (a, b) {
- return a[0] <= b[0] && b[0] <= a[2] && a[1] <= b[1] && b[1] <= a[3]
- }
- g.I.N2 = function (a, b) {
- return a[0] <= b[0] && b[2] <= a[2] && a[1] <= b[1] && b[3] <= a[3]
- }
- g.I.oDa = function () {
- return [Infinity, Infinity, -Infinity, -Infinity]
- }
- g.I.qoa = function (a, b, c, d, e) {
- return 'undefined' !== typeof e ? ((e[0] = a), (e[2] = b), (e[1] = c), (e[3] = d), e) : [a, c, b, d]
- }
- g.I.empty = function (a) {
- a[0] = a[1] = Infinity
- a[2] = a[3] = -Infinity
- return a
- }
- g.I.gb = function (a, b) {
- return a[0] === b[0] && a[2] === b[2] && a[1] === b[1] && a[3] === b[3]
- }
- g.I.extend = function (a, b) {
- b[0] < a[0] && (a[0] = b[0])
- b[2] > a[2] && (a[2] = b[2])
- b[1] < a[1] && (a[1] = b[1])
- b[3] > a[3] && (a[3] = b[3])
- }
- g.I.II = function (a, b) {
- b[0] < a[0] && (a[0] = b[0])
- b[0] > a[2] && (a[2] = b[0])
- b[1] < a[1] && (a[1] = b[1])
- b[1] > a[3] && (a[3] = b[1])
- }
- g.I.hEa = function (a) {
- return [a[0], a[1]]
- }
- g.I.iEa = function (a) {
- return [a[2], a[1]]
- }
- g.I.xi = function (a) {
- return [(a[0] + a[2]) / 2, (a[1] + a[3]) / 2]
- }
- g.I.uEa = function (a, b, c, d, e) {
- var f = (b * d[0]) / 2
- d = (b * d[1]) / 2
- b = Math.cos(c)
- c = Math.sin(c)
- f = [-f, -f, f, f]
- d = [-d, d, -d, d]
- var h, k, l
- for (h = 0; 4 > h; h += 1) (k = f[h]), (l = d[h]), (f[h] = a[0] + k * b - l * c), (d[h] = a[1] + k * c + l * b)
- return g.I.a2(f, d, e)
- }
- g.I.tj = function (a) {
- return a[3] - a[1]
- }
- g.I.IEa = function (a) {
- return [a[2] - a[0], a[3] - a[1]]
- }
- g.I.NEa = function (a) {
- return [a[0], a[3]]
- }
- g.I.OEa = function (a) {
- return [a[2], a[3]]
- }
- g.I.vj = function (a) {
- return a[2] - a[0]
- }
- g.I.Zg = function (a, b) {
- return a[0] <= b[2] && a[2] >= b[0] && a[1] <= b[3] && a[3] >= b[1]
- }
- g.I.uh = function (a) {
- return a[2] < a[0] || a[3] < a[1]
- }
- g.I.normalize = function (a, b) {
- return [(b[0] - a[0]) / (a[2] - a[0]), (b[1] - a[1]) / (a[3] - a[1])]
- }
- g.I.pHa = function (a, b) {
- var c = ((a[2] - a[0]) / 2) * (b - 1),
- d = ((a[3] - a[1]) / 2) * (b - 1)
- a[0] -= c
- a[2] += c
- a[1] -= d
- a[3] += d
- }
- g.I.touches = function (a, b) {
- return g.I.Zg(a, b) && (a[0] === b[2] || a[2] === b[0] || a[1] === b[3] || a[3] === b[1])
- }
- g.I.transform = function (a, b, c) {
- a = [a[0], a[1], a[0], a[3], a[2], a[1], a[2], a[3]]
- b(a, a, 2)
- return g.I.a2([a[0], a[2], a[4], a[6]], [a[1], a[3], a[5], a[7]], c)
- }
- g.oe.Hb({
- A: (function () {
- var a = g.oe.prototype.A
- return function () {
- a.apply(this, arguments)
- this.southwest = this.wc
- this.northeast = this.nc
- }
- })(),
- extend: (function () {
- var a = g.oe.prototype.extend
- return function () {
- a.apply(this, arguments)
- this.wc.lng = this.wc.R
- this.wc.lat = this.wc.Q
- this.nc.lng = this.nc.R
- this.nc.lat = this.nc.Q
- return this
- }
- })(),
- })
- g.KF = g.da.extend({
- A: function (a, b, c, d) {
- this.eX = a
- this.uX = b
- this.IX = c
- this.eY = d
- },
- transform: function (a, b) {
- return this.s1(a.cb(), b)
- },
- s1: function (a, b) {
- b = b || 1
- a.x = b * (this.eX * a.x + this.uX)
- a.y = b * (this.IX * a.y + this.eY)
- return a
- },
- tza: function (a, b) {
- b = b || 1
- return new g.H((a.x / b - this.uX) / this.eX, (a.y / b - this.eY) / this.IX)
- },
- })
- g.zp = g.da.extend({
- A: function (a) {
- this.UL = a.MAX_LATITUDE || 85.0511287798
- a.project && a.unproject && ((this.kc = a.project), (this.Wh = a.unproject))
- },
- })
- g.zp.pW = {
- kc: function (a) {
- return new g.H(a.R, a.Q)
- },
- Wh: function (a, b) {
- return new g.U(a.x, a.y, b)
- },
- }
- g.zp.pba = new g.zp({
- MAX_LATITUDE: 85.0511287798,
- project: function (a) {
- var b = Math.PI / 180,
- c = this.UL,
- c = Math.max(Math.min(c, a.Q), -c)
- a = a.R * b
- b = Math.log(Math.tan(Math.PI / 4 + (c * b) / 2))
- return new g.H(a, b, !1)
- },
- unproject: function (a, b) {
- var c = 180 / Math.PI
- return new g.U(a.x * c, (2 * Math.atan(Math.exp(a.y)) - Math.PI / 2) * c, b)
- },
- })
- g.zp.tW = {
- UL: 85.0840591556,
- gM: 6356752.3142,
- fM: 6378137,
- kc: function (a) {
- var b = Math.PI / 180,
- c = this.UL,
- d = Math.max(Math.min(c, a.Q), -c),
- e = this.fM,
- c = this.gM
- a = a.R * b * e
- b *= d
- e = c / e
- e = Math.sqrt(1 - e * e)
- d = e * Math.sin(b)
- d = Math.pow((1 - d) / (1 + d), 0.5 * e)
- b = Math.tan(0.5 * (0.5 * Math.PI - b)) / d
- b = -c * Math.log(b)
- return new g.H(a, b)
- },
- Wh: function (a, b) {
- for (
- var c = 180 / Math.PI, d = this.fM, e = this.gM, f = (a.x * c) / d, d = e / d, d = Math.sqrt(1 - d * d), e = Math.exp(-a.y / e), h = Math.PI / 2 - 2 * Math.atan(e), k = 15, l = 0.1;
- 1e-7 < Math.abs(l) && ((k -= 1), 0 < k);
- )
- (l = d * Math.sin(h)), (l = Math.PI / 2 - 2 * Math.atan(e * Math.pow((1 - l) / (1 + l), 0.5 * d)) - h), (h += l)
- return new g.U(f, h * c, b)
- },
- }
- g.Zh = {}
- g.Zh.pF = {
- MD: function (a, b) {
- var c = this.Pf.kc(a),
- d = this.scale(b)
- return this.UE.s1(c, d)
- },
- lE: function (a, b, c) {
- b = this.scale(b)
- a = this.UE.tza(a, b)
- return this.Pf.Wh(a, c)
- },
- kc: function (a) {
- return this.Pf.kc(a)
- },
- scale: function (a) {
- return 256 << a
- },
- nq: function (a) {
- return (12756274 * Math.PI) / (256 * Math.pow(2, a))
- },
- }
- g.Zh.IL = g.extend({}, g.Zh.pF, {
- code: 'EPSG:3857',
- Pf: g.zp.pba,
- UE: new g.KF(0.5 / Math.PI, 0.5, -0.5 / Math.PI, 0.5),
- kc: function (a) {
- return this.Pf.kc(a).Nd(6378137)
- },
- })
- g.Zh.$V = g.extend({}, g.Zh.pF, {
- code: 'EPSG:3395',
- Pf: g.zp.tW,
- UE: (function () {
- var a = g.zp.tW
- return new g.KF(0.5 / (Math.PI * a.fM), 0.5, -0.5 / (Math.PI * a.gM), 0.5)
- })(),
- })
- g.Zh.aW = g.extend({}, g.Zh.pF, { code: 'EPSG:4326', Pf: g.zp.pW, UE: new g.KF(1 / 360, 0.5, -1 / 360, 0.25) })
- g.Zh.YAa = g.extend({}, g.Zh.pF, { Pf: g.zp.pW, UE: new g.KF(1, 0, 1, 0) })
- g.RJ = {
- kc: function (a, b) {
- a = g.a.Ka(a)
- return this.mj.MD(a, b || this.get('zoom'))
- },
- Wh: function (a, b, c) {
- return this.mj.lE(a, b || this.get('zoom'), c)
- },
- ota: function (a, b) {
- return this.kc(a, b)
- },
- eEa: function (a, b) {
- return this.Wh(a, b)
- },
- $p: function (a, b, c) {
- g.c.add(this, 'containerToLngLat')
- var d = this.get('size').PE().ld(2)
- if (a.gb(d) && !c) return this.get('center')
- a = this.yg(a, b, c)
- return this.Od(a)
- },
- Ls: function (a, b) {
- g.c.add(this, 'lngLatToContainer')
- var c = 0
- b && (c = 'string' === typeof b ? Math.round(parseFloat(b) / 0.14929107086948487) : b)
- var d = this.Bb(a)
- return this.Xd(d, null, c)
- },
- Bb: function (a) {
- a = g.a.Ka(a)
- return this.kc(a, 20)
- },
- Od: function (a) {
- return a ? this.Wh(a, 20) : a
- },
- LJ: function (a) {
- a = g.a.Ka(a)
- return this.kc(a, 20).ab(g.a.dc)
- },
- m6: function (a, b) {
- b || (a = g.a.Ka(a))
- var c = [],
- d = !1
- void 0 === a[0].length && (d = !0)
- for (var c = [], e = 0, f = a.length; e < f; e += 1)
- if (d) {
- var h = this.kc(a[e], 20).ab(g.a.dc)
- c[e] = [h.x, h.y]
- } else c[e] = this.m6(a[e], !0)
- return c
- },
- kqa: function (a) {
- return this.Wh(a.add(g.a.dc), 20)
- },
- fEa: function (a) {
- return this.Xd(a.add(g.a.dc))
- },
- nEa: function (a) {
- return a ? this.kc(this.get('center'), a) : this.get('centerPixel')
- },
- GBa: function (a) {
- return new g.H(a.x + 2.0037508342789244e7, 2.0037508342789244e7 - a.y).ld(0.14929107086948487)
- },
- t7: function (a) {
- return new g.H(0.14929107086948487 * a.x - 2.0037508342789244e7, 2.0037508342789244e7 - 0.14929107086948487 * a.y)
- },
- }
- z.NF = g.da.extend({
- ka: [g.va, g.Ze],
- w: { center: new g.U(116.397128, 39.916527), zoom: 13, rotation: 0, crs: 'EPSG3857' },
- A: function (a) {
- this.CLASS_NAME = 'AMap.View2D'
- g.c.ya(this, a)
- a = a || {}
- a.center && (a.center = g.a.Ka(a.center))
- this.w = a
- },
- })
- z.Rb = g.da.extend({
- ka: [g.va, g.Ze, g.RJ],
- w: {
- features: 'all',
- showLabel: !0,
- dragEnable: !0,
- showIndoorMap: g.l.ba ? !1 : !0,
- lang: 'zh_cn',
- keyboardEnable: !0,
- doubleClickZoom: !0,
- scrollWheel: !0,
- zoomEnable: !0,
- jogEnable: !0,
- continuousZoomEnable: !0,
- resizeEnable: !1,
- animateEnable: !0,
- rotateEnable: !1,
- labelzIndex: 99,
- showFog: !0,
- touchZoom: !0,
- zooms: [3, g.l.ba ? (g.l.Jc ? 19 : 20) : 18],
- defaultCursor: '',
- limitBounds: null,
- logoUrl: g.r.Gb + '/theme/v1.3/logo@1x.png',
- logoUrlRetina: g.r.Gb + '/theme/v1.3/logo@2x.png',
- copyright: '\x3c!--v1.4.16--\x3e © ' + new Date().getFullYear() + ' AutoNavi ',
- isHotspot: !g.l.ba,
- baseRender: g.l.T1,
- overlayRender: g.l.kva,
- mapStyle: 'amap://styles/normal',
- showBuildingBlock: g.l.Mf,
- crs: 'EPSG3857',
- rotation: 0,
- pitch: 0,
- yaw: 0,
- scale: 1,
- center: new g.U(116.397128, 39.916527),
- zoom: 13,
- detectRetina: !0,
- pitchEnable: !1,
- buildingAnimation: !1,
- maxPitch: 83,
- turboMode: !0,
- preloadMode: !1,
- workerMode: !0,
- },
- poiOnAMAP: function (a) {
- g.c.add(this, 'poiOnAMAP')
- var b = {},
- c = g.a.Ka(a.location)
- b.id = a.id
- c && ((b.y = c.Q), (b.x = c.R))
- b.name = a.name
- b.address = a.address
- g.$h.mt(g.$h.u4(b))
- },
- detailOnAMAP: function (a) {
- g.c.add(this, 'detailOnAMAP')
- var b = {},
- c = g.a.Ka(a.location)
- b.id = a.id
- c && ((b.y = c.Q), (b.x = c.R))
- b.name = a.name
- g.$h.mt(g.$h.s4(b))
- },
- setLabelzIndex: function (a) {
- g.c.add(this, 'setLabelzIndex')
- return this.set('labelzIndex', a)
- },
- getLabelzIndex: function () {
- return this.get('labelzIndex', null, !0)
- },
- setVectorMapForeign: function (a) {
- if (g.l.Xp) {
- var b = this.Z6(a)
- a = b[0]
- var c = b[1]
- this.set('name_field', c, !0)
- this.set('vectorMapForeign', a, !0)
- var d = this,
- b = []
- a && (b.push('gridmap'), b.push('MVT', 'vectorForeign'), b.push('labelcanvas'))
- g.tb.Fg(b, function () {
- d.q6(function () {
- d.map &&
- ((d.map.Fi = !0),
- d.map.EG && d.map.EG(),
- d.map.Re && d.map.Re instanceof g.Rb.CF && d.map.Re.he && d.map.Re.he.S && (d.map.Re.he.S.dI(), (d.map.Re.he.S.K6 = c), d.map.Re.he.S.reload()),
- d.set('display'))
- })
- })
- }
- },
- setMapStyle: function (a) {
- g.c.add(this, 'setMapStyle')
- a = a || 'normal'
- ;-1 === a.indexOf('amap://styles/') ? (g.r.dK[a] ? this.set('styleUrl', 'amap://styles/' + g.r.dK[a]) : this.set('styleUrl', '')) : this.set('styleUrl', a)
- this.ZS()
- },
- getMapStyle: function () {
- return this.get('styleUrl') || this.get('mapStyle', null, !0)
- },
- getFeatures: function () {
- return this.get('features', null, !0)
- },
- setFeatures: function (a) {
- g.c.add(this, 'setFeatures')
- this.set('features', a)
- },
- setLang: function (a) {
- g.c.add(this, 'setLang', a)
- ;('en' !== a && 'zh_cn' !== a && 'zh_en' !== a) || a === this.get('lang', null, !0) || (this.set('lang', a), this.hk && this.hk.z8(this))
- },
- getLang: function () {
- return this.get('lang', null, !0)
- },
- setCity: function (a, b) {
- g.c.add(this, 'setCity')
- var c = this
- new g.jb.zb(g.r.Zd + '/v3/config/district?subdistrict=0&extensions=all&key=' + g.r.key + '&s=rsv3&output=json&keywords=' + a, { callback: 'callback' }).h(
- 'complete',
- function (d) {
- var e = d.districts
- if (e && e.length) {
- d = e[0]
- ;/[^\w]+/.test(a) &&
- (e = g.a.find(e, function (b) {
- return b.name === a
- })) &&
- e !== d &&
- (d = e)
- try {
- var f = d.center.split(','),
- h
- switch (d.level) {
- case 'city':
- h = 10
- break
- case 'province':
- h = 7
- break
- case 'district':
- h = 12
- break
- case 'country':
- h = 4
- break
- default:
- h = 12
- }
- ;-1 !== d.name.indexOf('\u5e02') && (h = 10)
- c.C = !0
- c.setZoomAndCenter(h, new g.U(f[0], f[1]), !0)
- c.C = !1
- b && b.call(c, f, h)
- } catch (k) {}
- }
- },
- this
- )
- },
- getScreenShot: function (a, b) {
- g.c.add(this, 'getScreenShot')
- return this.map && g.l.il ? this.map.E4(a, b) : ''
- },
- getCity: function (a, b) {
- g.c.add(this, 'getCity')
- var c = g.r.Zd + '/v3/geocode/regeo?&extensions=&&key=' + g.r.key + '&s=rsv3&output=json&location=' + (b || this.get('center', null, !0))
- new g.jb.zb(c, { callback: 'callback', gy: !0, Ed: 'REGEO' }).h(
- 'complete',
- function (b) {
- b = b.regeocode.addressComponent
- a({
- province: b.province,
- city: b.city instanceof Array ? '' : b.city,
- citycode: b.citycode instanceof Array ? '' : b.citycode,
- district: b.district instanceof Array ? '' : b.district,
- })
- },
- this
- )
- },
- A: function (a, b) {
- b = g.extend({}, b)
- this.id = g.a.yb(this)
- this.CLASS_NAME = 'AMap.Map'
- g.c.ya(this, b)
- this.C = !0
- b = b || {}
- b.mapStyle && g.r.dK[b.mapStyle] && (b.mapStyle = 'amap://styles/' + g.r.dK[b.mapStyle])
- b.mapStyle && -1 !== b.mapStyle.indexOf('amap://styles/') ? ((b.styleUrl = b.mapStyle), delete b.mapStyle) : (b.styleUrl = 'amap://styles/normal')
- b.bgColor && g.extend(g.r.De, b.bgColor)
- b.maxPitch && (b.maxPitch = Math.min(this.w.maxPitch, Math.max(b.maxPitch, 0)))
- b.pitch && (b.pitch = Math.min(b.maxPitch || this.w.maxPitch, Math.max(b.pitch, 0)))
- '3D' !== b.viewMode && (b.pitch = 0)
- g.r.Vr = b.buildingColor || null
- b.mobile && (g.l.ba = !0)
- b.noPoi && (g.r.wua = !0)
- b.editEnable = g.r.RQ ? b.editEnable : !1
- b.editEnable && ((b.nolimg = !0), (b.showIndoorMap = !1))
- void 0 !== b.nolimg && (b.nolimg_param = b.nolimg)
- '3D' === b.viewMode && g.l.qp && void 0 === b.showBuildingBlock && !0 === b.showBuildingBlock
- this.wq = !!b.enableSocket
- b.server && (g.r.Zd = b.server)
- b.vdataUrl && (g.r.vL = b.vdataUrl)
- if ('string' === typeof a) {
- if (((a = this.K = document.getElementById(a)), !a)) return
- } else 'DIV' === a.tagName && (this.K = a)
- if (this.K.___amap___) {
- var c = this.K.___amap___
- c.C = !0
- c.destroy()
- c.C = !1
- }
- this.K.___amap___ = this
- var c = this.w.zooms[1],
- d = this.w.zooms[0]
- b.zooms ? ((b.zooms[0] = Math.max(d, b.zooms[0])), !0 === b.expandZoomRange && (c = g.l.ba ? (g.l.Jc ? 19 : 20) : 20), (b.zooms[1] = Math.min(c, b.zooms[1]))) : (b.zooms = [d, c])
- b.forceZooms && (b.zooms = b.forceZooms)
- b = this.ina(b)
- c = this.getSize(!0)
- b.center && (b.center = g.a.Ka(b.center))
- this.mj = this.roa(b.crs || this.w.crs, b.center || this.w.center)
- this.nma(c, b)
- d = b.lang
- 'en' !== d && 'zh_cn' !== d && 'zh_en' !== d && (b.lang = 'zh_cn')
- g.f.pg || ((b.rotation = 0), (b.pitch = 0), (b.rotateEnable = !1))
- b.preloadMode = !1
- g.l.GS ? !1 !== b.workerMode && (z.Rb.Pt ? ((b.workerMode = !1), z.Rb.Pt++) : (z.Rb.Pt = 1)) : (b.workerMode = !1)
- b.layers && ((d = b.layers), delete b.layers, (b.layers = d))
- b.baseRender = b.baseRender || g.l.T1
- b.forceVector && (b.baseRender = g.l.Mf ? 'vw' : 'v')
- b.disableVector && (b.baseRender = 'd')
- 'dom' === b.renderer && ((b.baseRender = 'd'), (b.overlayRender = 'd'))
- c = Math.max(c.width, c.height)
- g.l.ja && (c *= Math.min(2, window.devicePixelRatio || 1))
- 'vw' === b.baseRender && c > g.l.Vta && (b.baseRender = 'dv')
- c = b.vectorMapForeign
- 'd' == b.baseRender && c && (b.vectorMapForeign = !1)
- c && !g.l.Xp && (b.vectorMapForeign = !1)
- c = this.Z6(b.vectorMapForeign)
- b.vectorMapForeign = c[0]
- b.name_field = c[1]
- b.turboMode = !1
- g.a.ub(this, b)
- this.jf(this.w)
- 'rotateEnable' in b || '3D' !== b.viewMode || !g.l.qp || this.set('rotateEnable', !0)
- 'pitchEnable' in b || '3D' !== b.viewMode || !g.l.qp || this.set('pitchEnable', !0)
- c = this.get('zoom', null, !0)
- ;('3D' === this.get('viewMode') && g.l.qp) || (c = Math.round(c))
- d = this.get('zooms')
- c > d[1] ? (c = d[1]) : c < d[0] && (c = d[0])
- this.set('zoom', c)
- this.w.zoom = c
- this.toa(this.w)
- this.cQ()
- var e = this
- this.jf({ overlays: [], infos: {}, controls: {} })
- var f = []
- b.vectorMapForeign && f.push('gridmap')
- b.vectorMapForeign && g.l.Xp && f.push('MVT', 'vectorForeign')
- b.forceVector && (f.push('vectorlayer'), f.push('overlay'))
- '3D' === b.viewMode && g.l.qp && f.push('Map3D')
- g.l.il && (b.vectorMapForeign || b.mapStyle || b.nolimg) && f.push('labelcanvas')
- b.editEnable && f.push('edit')
- g.l.il && (f.push('AMap.IndoorMap'), -1 !== f.indexOf('Map3D') && f.push('AMap.IndoorMap3D'))
- this.ja = g.l.ja && this.get('detectRetina')
- this.t$(b)
- this.C = !1
- e = this
- this.Fta(function () {
- e.q6(function () {
- g.tb.Fg(f, function () {
- if (!e.get('destroy')) {
- var b = new g.Rb(a, e)
- if (g.Te) {
- var c = (g.Te[0] || g.Te).stylemaps['50001:1'].browserStyle[0].split('&')
- b.VF = [c[0], c[4]]
- }
- b.af('zoom center centerCoords rotation yaw pitch resolution'.split(' '), e.view, !0)
- b.h(
- 'complete',
- function () {
- var a = {}
- b.J && '3D' == b.J.type && ((a.canvas = b.J.xa), (a.gl = b.J.ca))
- this.q('complete', a)
- },
- e,
- !0
- )
- b.mj = e.mj
- e.af(['zoomSlow', 'panTo', 'targetLevel', 'render'], b)
- b.af(['size', 'bounds'], e)
- e.loaded = !0
- e.q('coreMapCreated')
- g.l.il && e.Pla()
- e.C = !0
- '3D' === e.view.type && (e.AmbientLight || (e.AmbientLight = new g.Sw.PV([1, 1, 1], 0.9)), e.DirectionLight || (e.DirectionLight = new g.Sw.ZV([0, -1, 1], [1, 1, 1], 0.1)))
- e.C = !1
- }
- })
- })
- })
- },
- Z6: function (a) {
- if (a) {
- if ('string' == typeof a && 'style_' === a.substr(0, 6)) return [a]
- switch (a) {
- case !0:
- case 'Chinese_Simplified':
- return ['style_zh_cn']
- case 'English':
- return ['style_en']
- case 'Local':
- return ['style_local']
- case 'Chinese_Traditional':
- return ['style_en', ['coalesce', '{name_zh-Hant}', '{name}']]
- default:
- return ['style_zh_cn']
- }
- } else return [!1]
- },
- q6: function (a) {
- try {
- var b = this.get('vectorMapForeign')
- if (b)
- if (((g.PJ = 0), (g.OJ = 0), 'string' == typeof b && 'style_' == b.substr(0, 6))) {
- var c = this,
- d,
- e = b.slice(6)
- 32 == e.length
- ? ((c.js = !0),
- (g.r.aqa = g.r.SI + 'style_local/'),
- (d = g.r.tc + '://restapi.amap.com/v4/sdk/map/styles?styleid=' + e + '&key=' + g.r.key + '&sdkType=abroad_js_json&s=rsv3'),
- (d += '&platform=JS&logversion=2.0'),
- (d += '&appname=' + g.r.Up),
- (d += '&csid=' + g.a.Bw()),
- (d += '&sdkversion=' + g.r.ln))
- : ((c.js = !1), (g.r.aqa = g.r.SI + b + '/'), (d = g.r.Gb + '/styles/foreign/web_v8_' + b + '.json'))
- var f = new g.jb.XMLHttpRequest(d, { pU: 'application/json', responseType: 'json' })
- f.h(
- 'complete',
- function (b) {
- if (b && b.data && !b.data.MDa) {
- if (b.data.style) b = b.data
- else if ('string' === typeof b.data) b = JSON.parse(b.data)
- else {
- c.set('vectorMapForeign', !1)
- c.js = !1
- a()
- return
- }
- var d = b.hole
- if (d) {
- g.oy = []
- for (var e = 0, f = d.length; e < f - 1; e += 2) {
- var h = c.kc([d[e + 1], d[e]], 16)
- g.oy.push([h.x >> 0, h.y >> 0])
- }
- }
- ;(d = b.style) && d.layers && ((g.Ota = d.layers), b.zoomlevel && ((g.PJ = b.zoomlevel[0]), (g.OJ = b.zoomlevel[1])))
- } else (c.js = !1), c.set('vectorMapForeign', !1)
- a()
- },
- this
- )
- f.h(
- 'error',
- function () {
- c.js = !1
- c.set('vectorMapForeign', !1)
- a()
- },
- this
- )
- } else (this.js = !1), this.set('vectorMapForeign', !1), a()
- else (this.js = !1), this.set('vectorMapForeign', !1), a()
- } catch (h) {
- ;(this.js = !1), this.set('vectorMapForeign', !1), a()
- }
- },
- Fta: function (a) {
- function b() {
- var a = AMap.anole,
- b = {},
- c = [],
- d = 0,
- e = void 0
- if (a) {
- for (var a = a.replace(/\?/g, ':').replace(/\//g, '&'), e = a.split(''), a = 0, f = e.length; a < f; a++) void 0 === b[e[a]] && ((b[e[a]] = d++), c.push(e[a]))
- c.reverse()
- d = 0
- for (a = e.length; d < a; d++) e[d] = c[b[e[d]]]
- a = e.join('')
- g.Te = eval(a)
- delete AMap.anole
- }
- }
- if (g.l.Ue || g.Te) a()
- else {
- var c = !0
- if (window.__AMapStyleSource) c = !1
- else
- try {
- var d = JSON.parse(localStorage.getItem('_AMap_anole'))
- d && d.version === g.l.lf && d.script && 100 < d.script.length ? eval(d.script) : (c = !1)
- } catch (e) {
- c = !1
- }
- if (c) b(), a()
- else {
- var f = document.createElement('script')
- f.qDa = 'anonymous'
- f.id = 'amap_anole_js'
- f.src = window.__AMapStyleSource || g.r.tc + '://vdata.amap.com/style?v=' + g.r.ln + '&key=' + g.r.key + '&mapstyle=normal'
- c = document
- ;(c.head || c.getElementsByTagName('head')[0] || c.body).appendChild(f)
- f.onload = function () {
- if (!g.Te) {
- if (AMap.anole && !window.__AMapStyleSource && g.l.Gv)
- try {
- var c = { version: g.l.lf, script: "AMap['anole']=" + JSON.stringify(AMap.anole) }
- localStorage.setItem('_AMap_anole', JSON.stringify(c))
- } catch (d) {}
- b()
- }
- a()
- f.parentNode.removeChild(f)
- }
- }
- }
- },
- getViewMode_: function () {
- return this.view.type
- },
- qqa: function (a, b, c) {
- var d = new g.U(a[4], a[5])
- if ((a = new g.oe(a[0], a[1], a[2], a[3])) && b && d) {
- for (var e = c[1]; e > c[0]; e -= 1) {
- var f = this.kc(a.wc, e),
- h = this.kc(a.nc, e)
- if (Math.abs(h.x - f.x) < b.width && Math.abs(f.y - h.y) < b.height) break
- }
- return [d, Math.min(e + 1, c[1])]
- }
- return null
- },
- nma: function (a, b) {
- if (!(b && b.center && b.zoom)) {
- var c = this.qqa(g.r.Rd, a, b.zooms)
- b.center = b.center || (c && c[0])
- 'number' !== typeof b.zoom && (b.zoom = c && c[1])
- }
- },
- roa: function (a, b) {
- if (b instanceof g.U) {
- if ('string' === typeof a) {
- switch (a) {
- case 'EPSG3395':
- return g.Zh.$V
- case 'EPSG4326':
- return g.Zh.aW
- }
- return g.Zh.IL
- }
- if (a.pointToLngLat && a.lngLatToPoint) return { lE: a.pointToLngLat, MD: a.lngLatToPoint, nq: a.getResolution }
- throw 'illegal projection'
- }
- var c = this.get('zoom', null, !0)
- return {
- nq: function (a) {
- return Math.pow(2, c - a)
- },
- MD: function () {},
- lE: function () {},
- }
- },
- Lxa: function (a, b) {
- this.ax && this.ax.stop()
- var c = ['pitch', 'rotation', 'zoom', 'center'],
- d = {},
- e = !1,
- f
- for (f in a)
- if (a.hasOwnProperty(f) && -1 !== g.a.indexOf(c, f)) {
- var h = this.get(f)
- void 0 === h || h === a[f] || (h.gb && h.gb(a[f])) || ((d[f] = this.get(f)), (e = !0))
- }
- e &&
- ((this.ax = new g.Kj(d, a, null, 0)),
- (this.ax.transition = function (a, c, e) {
- e /= b || 300
- if (1 <= e) return c
- var f = {},
- h
- for (h in d) d.hasOwnProperty(h) && (f[h] = 'center' === h ? a[h].add(c[h].ab(a[h]).Nd(e)) : a[h] + (c[h] - a[h]) * e)
- return f
- }),
- (this.ax.Jq = function (b) {
- b === a && (this.ax.stop(), (this.Fd = null))
- for (var c in b) b.hasOwnProperty(c) && ('center' === c ? ((this.C = !0), this.setCenter(b[c], !0), (this.C = !1)) : this.set(c, b[c]))
- }),
- this.ax.Nn(this))
- },
- toa: function (a) {
- '3D' === this.get('viewMode') && g.l.qp ? (this.set('baseRender', 'vw'), (this.view = new g.qM(this, a))) : (this.view = new g.NF(this, a))
- this.o5()
- },
- o5: function () {
- this.Bi = 'd' < this.get('baseRender') || '3D' === this.view.type
- },
- featuresChanged: function () {
- this.cQ()
- },
- ZS: function () {
- this.cQ()
- this.KU()
- },
- KU: function () {
- if (this.qm) {
- var a = !0
- this.C = !0
- var b = this.getMapStyle()
- if (!1 === this.get('showIndoorMap') || ('normal' !== b && 'amap://styles/normal' !== b)) a = !1
- for (var b = this.getLayers(), c = (this.C = !1), d = 0, e = b.length; d < e; d += 1) {
- if (b.hasOwnProperty(d) && 'AMap.IndoorMap' === b[d].CLASS_NAME && b[d] !== this.qm) {
- a = !1
- break
- }
- b[d].vq && b[d].vq() && b[d].get('visible') && (c = !0)
- }
- ;(a = c && a) && this.qm.getMap() !== this && this.qm.setMap(this)
- this.qm.set('visible', a)
- }
- },
- cQ: function () {
- this.t$()
- if (this.view && '3D' !== this.view.type) {
- var a = this.get('baseRender')
- if (a && !('dv' < a)) {
- var b = this.get('features', null, !0)
- this.C = !0
- var c = this.getMapStyle()
- this.C = !1
- var d = this.get('editEnable')
- b &&
- c &&
- (g.l.Xp && (d || 'all' !== b || ('normal' !== c && 'amap://styles/normal' !== c))
- ? (this.set('baseRender', 'v'), (this.uT = a))
- : this.uT && (this.set('baseRender', this.uT), (this.uT = null)))
- this.o5()
- }
- }
- },
- Pla: function () {
- var a = this
- !a.qm &&
- a.K &&
- ((a.indoorMap = a.qm = new AMap.IndoorMap({ innerLayer: !0 })),
- a.KU(),
- g.a.Wc(function () {
- a.q('indoor_create', { target: a })
- a.set('display')
- }))
- },
- layersChanged: function () {
- this.C = !0
- var a = this.getLayers()
- this.YJ = this.C = !1
- for (var b = 0; b < a.length; b += 1) (a[b].C = !0), a[b].getMap() !== this && a[b].setMap(this), (a[b].C = !1), a[b].YJ && (this.YJ = !0)
- this.KU()
- },
- getMapNumber: function () {
- if (this.map) return this.map.tE()
- },
- getAdcode: function () {
- g.c.add(this, 'getAdcode')
- return g.r.Nla
- },
- t$: function () {
- function a() {
- var a = !1
- g.a.Tb(
- b.w.layers,
- function (b) {
- if (b.FG && b.constructor === z.o.rb) return (a = !0), !1
- },
- b
- )
- if (
- g.a.ka(['d', 'dv'], b.get('baseRender')) ||
- !g.a.ka(['normal', 'amap://styles/normal'], b.get('mapStyle')) ||
- ('3D' === b.get('viewMode') && 0 < b.get('pitch')) ||
- 'all' !== b.get('features') ||
- b.get('editEnable') ||
- !b.get('turboMode')
- )
- a = !1
- return a
- }
- if (!this.d8) {
- var b = this,
- c = a(),
- d = this.get('rasterLayer')
- if (d && !c) this.sk(d), this.set('rasterLayer', void 0)
- else if (!d && c && this.get('layers')) {
- d = new z.o.rb({ innerLayer: !0, map: this, Sv: !0, zIndex: 0 })
- d.Hsa = !0
- if (this.w.layers) {
- var e = null
- g.a.Tb(this.w.layers, function (a) {
- a instanceof z.o.rb && a.FG && (null === e || a.get('zIndex') > e.get('zIndex')) && (e = a)
- })
- e && d.af(['zIndex', 'opacity', 'zooms', 'visible'], e)
- }
- this.set('rasterLayer', d, !0)
- }
- }
- },
- ina: function (a) {
- a || (a = {})
- if (a.hasOwnProperty('defaultLayer')) {
- a.layers = [a.defaultLayer]
- var b = a.defaultLayer
- b.GP = !0
- this.set('defaultLayer', b, !0)
- }
- a.layers && 0 !== a.layers.length ? this.set('defaultLayer', a.layers[0], !0) : ((b = new z.o.rb({ innerLayer: !0 })), (a.layers = [b]), (b.GP = !0), this.set('defaultLayer', b, !0))
- if ((b = a.view))
- b.w.rotation && (a.rotation = b.w.rotation),
- b.w.center && (a.center = b.w.center),
- b.w.zoom && (a.zoom = Math.max(a.zooms[0], Math.min(a.zooms[1], b.w.zoom))),
- b.w.crs && (a.crs = b.w.crs)
- a.level && !a.zoom && (a.zoom = a.level)
- return a
- },
- setLimitBounds: function (a) {
- g.c.add(this, 'setLimitBounds')
- a instanceof g.tp && ((a.C = !0), (a = a.toBounds()), (a.C = !1))
- a instanceof g.oe || (a = null)
- this.set('limitBounds', a)
- },
- clearLimitBounds: function () {
- g.c.add(this, 'clearLimitBounds')
- this.set('limitBounds', null)
- },
- getLimitBounds: function () {
- g.c.add(this, 'getLimitBounds')
- return this.get('limitBounds', null, !0)
- },
- PH: function (a) {
- var b = this.get('layers')
- if (!(0 <= g.a.indexOf(b, a)) && (b.push(a), this.set('layers', b), a.xB)) {
- a = a.getLayers()
- for (var b = -1, c = a.length; ++b < c; ) {
- var d = a[b]
- d instanceof z.o.Yb || !d.setMap || d.setMap(this)
- }
- }
- },
- sC: function (a) {
- var b = this.get('overlays')
- 0 <= g.a.indexOf(b, a) ||
- (a instanceof z.B.Tn
- ? (this.get('overlays').push(a), this.ry instanceof z.B.Tn && ((this.ry.C = !0), this.ry.close(), (this.ry.C = !1)), (this.ry = a), this.set('contextmenu', a, !0))
- : (a instanceof z.B.Ye && (this.rm instanceof z.B.Ye && this.Jz(this.rm), (this.rm = a)), this.get('overlays').push(a)),
- this.q('overlays'))
- },
- sk: function (a) {
- var b = this.get('layers'),
- c = g.a.indexOf(b, a)
- if (-1 !== c) {
- if (a.xB)
- for (c = b.length; -1 < --c; ) {
- var d = b[c]
- ;(d.YA !== a && d !== a) || b.splice(c, 1)
- }
- else a.YA && a.YA.Tka(a), (b = g.a.Fo(b, c))
- this.set('layers', b)
- if (a.xB) for (a = a.getLayers(), b = -1, c = a.length; ++b < c; ) (d = a[b]), d instanceof z.o.Yb || !d.setMap || d.setMap()
- }
- },
- getZooms: function () {
- return this.get('zooms', null, !0)
- },
- setZooms: function (a) {
- return this.set('zooms', a, !0)
- },
- Jz: function (a) {
- var b = this.get('overlays')
- this.set('overlays', g.a.Fo(b, g.a.indexOf(b, a)))
- },
- getTileCoordByLngLat: function (a, b, c) {
- b = b || 256
- this.C = !0
- c = c || Math.round(this.getZoom())
- this.C = !1
- a = this.kc(a, c)
- c = new g.pr(c, Math.floor(a.x / b), Math.floor(a.y / b))
- c.aD = a.x % b
- c.bD = a.y % b
- return c
- },
- setZoom: function (a, b) {
- g.c.add(this, 'setZoom')
- a = this.gD(a)
- var c = this.get('zooms')
- a > c[1] && (a = c[1])
- a < c[0] && (a = c[0])
- this.get('zoomEnable') && (b || !this.loaded ? (this.set('zoom', a), this.q('zoomstart'), this.q('zoomchange'), this.q('zoomend')) : this.set('zoomSlow', a))
- },
- getZoom: function (a) {
- g.c.add(this, 'getZoom')
- return a ? this.get('zoom', null, !0) : this.gD(this.get('targetLevel') || this.get('zoom', null, !0))
- },
- getCenter: function () {
- g.c.add(this, 'getCenter')
- return this.get('center', null, !0)
- },
- setCenter: function (a, b) {
- g.c.add(this, 'setCenter')
- a = g.a.Ka(a)
- b || !this.loaded ? (this.q('movestart'), this.set('center', a), this.q('mapmove'), this.map ? this.map.q('moveend') : this.q('moveend')) : ((this.C = !0), this.panTo(a), (this.C = !1))
- },
- getCoordsBound: function () {
- return this.view.jm()
- },
- getCoordsBoundByZoom: function (a) {
- return this.view.nqa(a)
- },
- setRotation: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 0
- g.c.add(this, 'setRotation')
- !g.l.Ue && this.get('rotateEnable') && this.set('rotation', a)
- },
- getRotation: function () {
- g.c.add(this, 'getRotation')
- return this.get('rotation')
- },
- setPitch: function (a) {
- g.c.add(this, 'setPitch')
- a = Math.min(this.get('maxPitch'), Math.max(a, 0))
- '3D' === this.view.type && this.get('pitchEnable') && this.set('pitch', a)
- },
- getPitch: function () {
- g.c.add(this, 'getRotation')
- return '3D' === this.view.type ? this.get('pitch') : 0
- },
- getStatus: function () {
- g.c.add(this, 'getStatus')
- for (
- var a = 'isHotspot pitchEnable dragEnable zoomEnable keyboardEnable jogEnable doubleClickZoom scrollWheel resizeEnable touchZoom rotateEnable animateEnable'.split(' '), b = {}, c = 0;
- c < a.length;
- c += 1
- )
- b[a[c]] = this.get(a[c], null, !0)
- return b
- },
- setStatus: function (a) {
- g.c.add(this, 'setStatus')
- for (var b in a)
- a.hasOwnProperty(b) &&
- -1 !==
- 'isHotspot,pitchEnable,dragEnable,keyboardEnable,doubleClickZoom,scrollWheel,zoomEnable,jogEnable,continuousZoomEnable,resizeEnable,animateEnable,rotateEnable,touchZoom'.indexOf(
- b
- ) &&
- this.set(b, a[b])
- },
- getResolution: function (a, b) {
- g.c.add(this, 'getResolution')
- var c = (a = g.a.Ka(a)) ? a.Q : this.get('center', null, !0).Q
- return this.mj.nq(b || this.get('zoom')) * Math.cos((c * Math.PI) / 180)
- },
- getScale: function (a) {
- g.c.add(this, 'getScale')
- this.C = !0
- a = (this.getResolution() * (a || 96)) / 0.0254
- this.C = !1
- return a
- },
- getDefaultCursor: function () {
- g.c.add(this, 'getDefaultCursor')
- return this.get('defaultCursor', null, !0) || 'url(' + g.r.Gb + '/theme/v1.3/openhand.cur),default'
- },
- setDefaultCursor: function (a) {
- g.c.add(this, 'setDefaultCursor')
- return this.set('defaultCursor', a, !0)
- },
- zoomIn: function (a) {
- g.c.add(this, 'zoomIn')
- this.C = !0
- this.setZoom(this.getZoom() + 1, a)
- this.C = !1
- },
- zoomOut: function (a) {
- g.c.add(this, 'zoomOut')
- this.C = !0
- this.setZoom(this.getZoom() - 1, a)
- this.C = !1
- },
- gD: function (a) {
- return this.view && '3D' === this.view.type ? g.a.wb(a, 4) : Math.round(a)
- },
- setZoomAndCenter: function (a, b, c) {
- g.c.add(this, 'setZoomAndCenter')
- b = g.a.Ka(b)
- a = this.gD(a)
- var d = this.get('zooms')
- a > d[1] && (a = d[1])
- a < d[0] && (a = d[0])
- this.C = !0
- this.loaded ? this.set('zoomAndCenter', [a, b, c]) : (this.setZoom(a, !0), this.setCenter(b, !0))
- this.C = !1
- },
- clearMap: function () {
- g.c.add(this, 'clearMap')
- for (var a = this.get('overlays'), b = 0; b < a.length; b += 1) a[b].set('map', null, !0)
- this.set('overlays', [])
- if (this.map && this.map.la)
- for (a = this.map.la, b = a.length - 1; 0 <= b; b -= 1)
- if (a[b].S instanceof z.o.ML) {
- var c = a[b].S
- c.C = !0
- c.setMap(null)
- c.C = !1
- }
- },
- destroy: function () {
- g.c.add(this, 'destroy')
- this.qm && (this.qm.setMap(), (this.indoorMap = this.qm = null))
- this.set('overlays', [])
- this.set('defaultLayer', null)
- this.set('layers', [])
- var a = this.get('controls')
- a.remove = []
- for (var b in a.Ld) a.Ld.hasOwnProperty(b) && a.remove.push(a.Ld[b])
- a.Ld = []
- a.add = []
- this.set('controls', a)
- this.set('destroy', !0)
- this.Ra = !1
- this.yl()
- this.w = this.K = null
- this.Gc && this.Gc.yl()
- this.Gc = null
- this.view && this.view.yl()
- this.view = null
- this.ti()
- z.Rb.Pt--
- },
- addControl: function (a) {
- g.c.add(this, 'addControl')
- var b = g.a.yb(a),
- c = this.get('controls') || {}
- c.Ld = c.Ld || {}
- c.Ld[b] || (c.Ld[b] = a)
- c.add = c.add || []
- c.add.push(a)
- this.set('controls', c)
- },
- removeControl: function (a) {
- g.c.add(this, 'removeControl')
- var b = g.a.yb(a),
- c = this.get('controls') || {}
- c.Ld = c.Ld || {}
- c.Ld[b] && delete c.Ld[b]
- c.remove = c.remove || []
- c.remove.push(a)
- this.set('controls', c)
- },
- clearControl: function () {
- g.c.add(this, 'clearControl')
- var a = this.get('controls') || {}
- a.remove = a.remove || []
- a.Ld = a.Ld || {}
- for (var b in a.Ld) a.Ld.hasOwnProperty(b) && (a.remove.push(a.Ld[b]), delete a.Ld[b])
- this.set('controls', a)
- },
- plugin: function (a, b) {
- g.c.add(this, 'plugin')
- 'string' === typeof a && (a = [a])
- for (var c = [], d = 0; d < a.length; d += 1) {
- var e = a[d].split('.')
- 2 < e.length || (2 == e.length ? 'AMap' === e[0] && (window.AMap[e[1]] || c.push(a[d])) : c.push(a[d]))
- }
- if (0 === c.length) return b(), this
- g.tb.Fg(c, b)
- return this
- },
- clearInfoWindow: function () {
- g.c.add(this, 'clearInfoWindow')
- var a = this.get('overlays')
- a && 0 !== a.length && this.rm && ((this.rm.C = !0), this.rm.close(), (this.rm.C = !1))
- },
- remove: function (a) {
- g.c.add(this, 'remove')
- a instanceof Array || (a = [a])
- for (var b = 0; b < a.length; b += 1) {
- var c = a[b]
- c.C = !0
- c.getMap && c.getMap() === this && (c.close ? c.close() : c.setMap && c.setMap(null))
- c.C = !1
- }
- },
- add: function (a) {
- g.c.add(this, 'add')
- a instanceof Array || (a = [a])
- for (var b = 0; b < a.length; b += 1) {
- var c = a[b]
- c.C = !0
- if (c.getMap && c.getMap() !== this)
- if (c.open) continue
- else c.setMap && c.setMap(this)
- c.C = !1
- }
- },
- getAllOverlays: function (a, b) {
- g.c.add(this, 'getAllOverlays')
- var c = this.get('overlays')
- if (a) {
- for (var d = 'amap.' + a.toLowerCase(), e = [], f = 0; f < c.length; f += 1) d !== c[f].CLASS_NAME.toLowerCase() || (!b && (c[f].Da || c[f].isOfficial)) || e.push(c[f])
- return e
- }
- if (!b) {
- e = []
- for (f = 0; f < c.length; f += 1) c[f].Da || c[f].isOfficial || e.push(c[f])
- c = e
- }
- d = this.get('layers')
- e = []
- if (d) for (var f = 0, h = d.length; f < h; f += 1) d[f] instanceof z.o.ML && e.push(d[f]), d[f].kb && (e = e.concat(d[f].kb))
- return c.concat(e)
- },
- triggerResize: function () {
- this.map && this.map.WO()
- },
- refreshSize: function () {
- this.eG = this.W3()
- },
- W3: function () {
- return g.f.S3(this.K)
- },
- getSize: function () {
- g.c.add(this, 'getSize')
- ;(!this.eG || 10 > this.eG.width * this.eG.height) && this.refreshSize()
- return this.eG
- },
- getContainer: function () {
- g.c.add(this, 'getContainer')
- return this.K
- },
- panTo: function (a) {
- g.c.add(this, 'panTo')
- a = g.a.Ka(a)
- this.loaded ? this.set('panTo', a) : ((this.C = !0), this.setCenter(a), (this.C = !1))
- },
- panBy: function (a, b, c) {
- g.c.add(this, 'panBy')
- this.C = !0
- var d = (this.get('rotation') * Math.PI) / 180,
- e = a * Math.cos(d) + Math.sin(d) * b
- a = -Math.sin(d) * a + Math.cos(d) * b
- b = this.loaded && this.map && this.map.Fd ? this.map.Fd.E9 : this.get('centerCoords')
- d = Math.pow(2, 20 - this.getZoom())
- e = b.add(new g.H(-e * d, -a * d))
- e = this.Od(e)
- !this.loaded || c ? this.setCenter(e, c) : this.set('panTo', e)
- this.C = !1
- },
- setFitView: function (a, b, c, d) {
- g.c.add(this, 'setFitView')
- this.C = !0
- var e = this.get('size'),
- f = e.height
- if (!e.width || !f) return !0
- if ((a = this.q4(a))) {
- if ((c = this.bJ(a, 0, new g.H(40, 40), c, d)))
- (b = b || !this.getBounds().contains(a.xi()) || (g.l.ba && 1 < Math.abs(c[0] + this.get('zoom', null, !0)))), this.setZoomAndCenter(c[0], c[1], b)
- this.C = !1
- return a
- }
- },
- q4: function (a) {
- if (a)
- if (a instanceof z.B.Eh) a = [a]
- else {
- if (!(a instanceof Array)) return null
- }
- else (this.C = !0), (a = this.getAllOverlays()), (this.C = !1)
- if (a) {
- for (var b, c = 0; c < a.length; c += 1) {
- var d = a[c]
- if (d.get('visible') && !(d instanceof z.B.Ye || d instanceof z.B.Tn)) {
- d.C = !0
- var e = d.getBounds()
- d.C = !1
- e && (b = b ? b.rza(e) : e.cb())
- }
- }
- return b
- }
- },
- getBounds: function (a) {
- g.c.add(this, 'getBounds')
- var b = this.view.Kd()
- return a && b.toBounds ? ((b.C = !0), (a = b.toBounds()), (b.C = !1), a) : b
- },
- setBounds: function (a, b, c, d, e, f) {
- g.c.add(this, 'setBounds')
- c = this.bJ(a, b, c, e, f)
- d = d || (g.l.ba && 1 < Math.abs(c[0] + b - this.get('zoom', null, !0)))
- this.C = !0
- this.setZoomAndCenter(c[0], c[1], d)
- this.C = !1
- return a
- },
- c4: function (a, b, c, d, e) {
- a = this.q4(a)
- return this.bJ(a, b, c, d, e)
- },
- getCoordsBoundByZoomIn3D: function (a) {
- this.UH || (this.UH = new g.qM())
- this.C = !0
- var b = this.getRotation(),
- c = this.getPitch(),
- d = this.getSize(!0).cb()
- this.C = !1
- a = { size: d, zoom: a, rotation: b, pitch: c, centerCoords: this.get('centerCoords') }
- this.UH.jf(a, !0)
- this.UH.ir()
- return this.UH.jm()
- },
- bJ: function (a, b, c, d, e) {
- b = b ? Number(b) : 0
- this.C = !0
- var f = this.getRotation(),
- h = this.getPitch(),
- k = this.getSize(!0).cb(),
- l = this.view.type
- this.C = !1
- var m = a.pR(this)
- a = a.sR(this)
- this.wC || (this.wC = '3D' === l ? new g.qM() : new g.NF())
- this.wC.jf({ size: k, zoom: 3, rotation: f, pitch: h, centerCoords: m }, !0)
- var n = (h = 0)
- d ? ((n = d[0]), (c = d[1]), (h = d[2]), (d = d[3]), (k.width -= h + d), (k.height -= n + c), (h = (h - d) / 2), (n = (n - c) / 2)) : c && ((k.width -= 2 * c.x), (k.height -= 2 * c.y))
- e = e || (g.l.ba ? 17 : 18)
- c = this.get('zooms')
- d = c[0]
- var p = Infinity,
- q = Infinity
- do {
- this.wC.jf({ zoom: d }, !0)
- '3D' === l && this.wC.ir()
- for (var q = (p = Infinity), r = -Infinity, s = -Infinity, u = 0; u < a.length; u += 1)
- var v = this.wC.Xd(a[u]), p = Math.min(p, v.x), r = Math.max(r, v.x), q = Math.min(q, v.y), s = Math.max(s, v.y)
- p = r - p
- q = s - q
- if (p > k.width || q > k.height) {
- d -= 1
- break
- }
- d += 1
- } while (d <= c[1])
- d = Math.min(c[1], e, Math.max(c[0], d + b))
- d = Math.floor(d)
- b = Math.pow(2, 20 - d)
- e = (f * Math.PI) / 180
- f = h * Math.cos(e) + Math.sin(e) * n
- e = -Math.sin(e) * h + Math.cos(e) * n
- m = m.ab(new g.H(f * b, e * b))
- m = this.Wh(m, 20)
- return [d, m]
- },
- setLayers: function (a) {
- g.c.add(this, 'setLayers')
- for (var b = 0; b < a.length; b += 1) a[b].set('map', this, !0)
- this.set('layers', a)
- },
- getLayers: function () {
- g.c.add(this, 'getLayers')
- var a = this.get('layers', null, !0),
- a = a.slice()
- if (this.C) {
- for (var b = [], c = -1, d = a.length; ++c < d; ) {
- var e = a[c]
- if (e.xB)
- for (var e = e.getLayers(), f = -1, h = e.length; ++f < h; ) {
- var k = e[f]
- k instanceof z.o.Yb && -1 === g.a.indexOf(a, k) && b.push(k)
- }
- }
- a = a.concat(b)
- } else for (b = a.length; -1 < --b; ) a[b].YA && a.splice(b, 1)
- return a
- },
- getDefaultLayer: function () {
- g.c.add(this, 'getDefaultLayer')
- return this.get('defaultLayer', null, !0)
- },
- setDefaultLayer: function (a) {
- if (a) {
- g.c.add(this, 'setDefaultLayer')
- this.C = !0
- a.GP = !0
- var b = this.get('defaultLayer'),
- c = this.get('layers')
- if (b) {
- if (a === b) {
- a.setMap(this)
- return
- }
- b.GP = !1
- c = g.a.Fo(c, g.a.indexOf(c, b))
- }
- this.set('defaultLayer', a, !0)
- a.C = !0
- ;-1 === g.a.indexOf(c, a) && c.push(a)
- a.C = !1
- this.setLayers(c)
- this.C = !1
- }
- },
- pixelToLngLat: function (a, b) {
- g.c.add(this, 'pixelToLngLat')
- return this.Wh(a, b)
- },
- lnglatToPixel: function (a, b) {
- g.c.add(this, 'lnglatToPixel')
- return this.kc(a, b)
- },
- drawPolyline: function (a) {
- g.c.add(this, 'drawPolyline')
- this.set('draw', 'polyline')
- this.set('drawStyle', a || { strokeColor: '#006600', pb: 0.9 })
- },
- render: function (a) {
- g.c.add(this, 'render')
- this.map && this.map.set('display', a ? 1 : 0)
- },
- setMask: function (a) {
- g.c.add(this, 'setMask')
- this.set('mask', a)
- this.map && ((this.map.UJ = !0), this.map.set('display'))
- },
- drawPolygon: function (a) {
- g.c.add(this, 'drawPolygon')
- this.set('draw', 'polygon')
- this.set('drawStyle', a || { strokeColor: '#006600', pb: 0.9, fillColor: '#FFAA00', le: 0.9 })
- },
- drawCircle: function (a) {
- g.c.add(this, 'drawCircle')
- this.set('draw', 'circle')
- this.set('drawStyle', a || { strokeColor: '#006600', pb: 0.9, fillColor: '#006600', le: 0.9 })
- },
- rD: function () {
- return this.view.rD()
- },
- getCameraState: function () {
- g.c.add(this, 'getCameraState')
- if (this.view && '3D' == this.view.type) return this.view.R3()
- },
- endDraw: function () {
- this.set('draw', null)
- },
- isGoogleTileVisible: function () {
- return this.map.isForeignMapVisible()
- },
- isForeignMapVisible: function () {
- if (this.get('gridForeignMap') || this.get('vectorForeignMap')) return this.map && this.map.xga()
- },
- Xd: function (a, b, c) {
- g.c.add(this, 'p20ToContainer')
- return this.view.Xd(a, b, c)
- },
- yg: function (a, b, c) {
- g.c.add(this, 'containerToP20')
- return this.view.yg(a, b, c)
- },
- getObject3DByContainerPos: function (a, b, c) {
- g.c.add(this, 'getObject3DByContainerPos')
- if ('2D' === this.view.type || !this.map || !this.map.J) return null
- this.C = !0
- this.view.yg(a)
- var d = this.view.V3(a),
- e = this.map.J.OT,
- f = this.view.cc,
- h = this.get('zoom', null, !0),
- h = Math.pow(2, 20 - h)
- b = b || this.getLayers()
- this.C = !1
- for (var k = [], l = 0; l < b.length; l += 1) {
- var m = b[l]
- m instanceof z.o.Nm && (m = m.kp(e, d, f, h, a)) && k.push(m)
- }
- return c
- ? k
- : k.length
- ? (k.sort(function (a, b) {
- return a.Td - b.Td
- }),
- { index: k[0].index, point: k[0].kE, distance: k[0].Td, object: k[0].object })
- : null
- },
- eJ: function (a) {
- var b = this.get('layers', null, !0),
- b = b.slice()
- if (this.C) {
- for (var c = [], d = -1, e = b.length; ++d < e; ) {
- var f = b[d]
- if (f.xB)
- for (var f = f.yEa(), h = -1, k = f.length; ++h < k; ) {
- var l = f[h]
- ;-1 === g.a.indexOf(b, l) && c.push(l)
- }
- }
- b = b.concat(c)
- }
- return b.filter(function (b) {
- return b instanceof z.o.Nm && (a ? -1 < a.indexOf(b) : !0)
- })
- },
- queryObjectIndexFromFboByContainerPos: function (a, b) {
- g.c.add(this, 'queryObjectIndexFromFboByContainerPos')
- if ('2D' === this.view.type || !this.map || !this.map.J) return null
- var c = this.diffFilterLayers(b),
- d = this.eJ(b),
- e = this.getSize()
- if (c) (this.YG = this.view.Le.cb()), (this.XG = this.view.cc.cb())
- else if (this.YG && this.XG) {
- if (((c = this.XG.Yu(this.view.cc)), (c = !(this.YG.Yu(this.view.Le) && c)))) (this.YG = this.view.Le.cb()), (this.XG = this.view.cc.cb())
- } else (this.YG = this.view.Le.cb()), (this.XG = this.view.cc.cb())
- if (c) this.map.Pq(d)
- else {
- for (var f = 0; f < d.length; f += 1) {
- var h = d[f]
- if (h instanceof z.o.Nm && h.Ora()) {
- c = !0
- break
- }
- }
- c && this.map.Pq(d)
- }
- return this.map.Oy().gwa(a, e)
- },
- diffFilterLayers: function (a) {
- a = a || []
- if (!this.ju || this.ju.length !== a.length) return (this.ju = a ? a.slice(0) : []), !0
- for (var b = 0; b < this.ju.length; ) {
- if (this.ju[b] !== a[b]) return (this.ju = a ? a.slice(0) : []), !0
- b++
- }
- this.ju = a ? a.slice(0) : []
- },
- })
- z.Rb.Xb({
- LJ: 'lngLatToGeodeticCoord',
- kqa: 'geodeticCoordToLngLat',
- bJ: 'getFitZoomAndCenterByBounds',
- c4: 'getFitZoomAndCenterByOverlays',
- Ls: 'lnglatTocontainer',
- lnglatTocontainer: 'lngLatToContainer',
- $p: 'containTolnglat',
- containTolnglat: 'containerToLngLat',
- Bb: 'lngLatToP20',
- Od: 'p20ToLngLat',
- Xd: 'p20ToContainer',
- yg: 'containerToP20',
- kc: 'project',
- Wh: 'unproject',
- queryObjectIndexFromFboByContainerPos: 'pickObject3DByContainerPos',
- })
- z.Rb.Hb({
- isHotspotChanged: function () {
- if ('undefined' !== typeof this.uD && (this.Ina(), this.get('isHotspot'))) {
- var a = this.get('layers', null, !0)
- a && a.length && !this.uD && this.YJ && this.Xua()
- }
- },
- Xua: function () {
- if (this.hk) this.c5()
- else {
- var a = this
- this.C = !0
- this.plugin('AMap.HotSpot', function () {
- if (!a.uD) {
- if (!a.hk) {
- var b = new g.bi()
- new z.B.Ye({ innerOverlay: !0 })
- a.hk = b
- }
- a.c5()
- }
- })
- this.C = !1
- }
- },
- Ina: function () {
- this.hk && this.Sra()
- },
- m7: function (a) {
- a.type = 'hotspotover'
- a.isIndoorPOI = !1
- this.q('hotspotover', a)
- },
- k7: function (a) {
- a.type = 'hotspotclick'
- a.isIndoorPOI = !1
- this.q('hotspotclick', a)
- },
- l7: function (a) {
- a.type = 'hotspotout'
- a.isIndoorPOI = !1
- this.q('hotspotout', a)
- },
- c5: function () {
- var a = this.hk
- this.hk.C = !0
- this.hk.setMap(this)
- this.hk.C = !1
- a.h('mouseover', this.m7, this)
- a.h('click', this.k7, this)
- a.h('mouseout', this.l7, this)
- },
- Sra: function () {
- var a = this.hk
- a.G('mouseover', this.m7, this)
- a.G('click', this.k7, this)
- a.G('mouseout', this.l7, this)
- this.hk.C = !0
- this.hk.setMap(null)
- this.hk.C = !1
- this.hk = null
- },
- })
- z.event = {
- Y: function (a, b, c, d) {
- g.F.h(a, b, c, d)
- return new g.sF(0, a, b, c, d)
- },
- Qla: function () {},
- addListener: function (a, b, c, d) {
- g.a.Ph(a.addListener) ? a.addListener(b, c, d) : (a.ve || (a.ve = g.va.ve), g.va.h.call(a, b, c, d))
- return new g.sF(1, a, b, c, d)
- },
- by: function (a, b, c, d) {
- g.a.Ph(a.by) ? a.by(b, c, d) : (a.ve || (a.ve = g.va.ve), g.va.h.call(a, b, c, d, !0))
- return new g.sF(1, a, b, c, d)
- },
- kI: function (a) {
- g.a.Ph(a.kI) ? a.kI() : g.va.ti.call(a)
- },
- Hu: function (a, b) {
- g.a.Ph(a.Hu) ? a.Hu(b) : g.va.ti.call(a, b)
- },
- removeListener: function (a) {
- a instanceof g.sF &&
- (g.a.Ph(a.Ai.removeListener)
- ? a.Ai.removeListener(a)
- : 0 === a.type
- ? g.F.G(a.Ai, a.VQ, a.cS, a.bf)
- : 1 === a.type && (a.Ai.ve || (a.Ai.ve = g.va.ve), g.va.G.call(a.Ai, a.VQ, a.cS, a.bf)))
- },
- O: function (a, b) {
- var c = Array.prototype.slice.call(arguments, 1)
- g.a.Ph(a.O) ? a.O.apply(a, c) : (a.ve || (a.ve = g.va.ve), g.va.q.apply(a, c))
- },
- }
- g.sF = g.da.extend({
- A: function (a, b, c, d, e) {
- this.type = a
- this.Ai = b
- this.VQ = c
- this.cS = d
- this.bf = e
- },
- })
- var qc = {
- Y: 'addDomListener',
- Qla: 'addDomListenerOnce',
- addListener: 'addListener',
- by: 'addListenerOnce',
- kI: 'clearInstanceListeners',
- Hu: 'clearListeners',
- removeListener: 'removeListener',
- O: 'trigger',
- },
- rc
- for (rc in qc) qc.hasOwnProperty(rc) && (z.event[qc[rc]] = z.event[rc])
- g.event = z.event
- z.o.Yb = g.da.extend({
- ka: [g.va, g.Ze],
- A: function (a) {
- new Date().getTime()
- this.CLASS_NAME = this.CLASS_NAME || 'AMap.Layer'
- g.a.ub(this, a)
- this.w.map && ((a = this.w.map), delete this.w.map, (this.w.map = a))
- this.jf(this.w)
- },
- getContainer: function () {
- g.c.add(this, 'getContainer')
- if (this.o && this.o.M) return this.o.M.uj()
- },
- getZooms: function () {
- return this.get('zooms', null, !0)
- },
- setOpacity: function (a) {
- g.c.add(this, 'setOpacity')
- a !== this.get('opacity', null, !0) && this.set('opacity', a)
- },
- getOpacity: function () {
- return this.get('opacity', null, !0)
- },
- show: function () {
- g.c.add(this, 'show')
- this.set('visible', !0)
- if (this.Gq) {
- var a = this.get('map', null, !0)
- a && a.set('layers', a.get('layers', null, !0))
- }
- },
- hide: function () {
- g.c.add(this, 'hide')
- this.set('visible', !1)
- if (this.Gq) {
- var a = this.get('map', null, !0)
- a && a.set('layers', a.get('layers', null, !0))
- }
- },
- setMap: function (a) {
- g.c.add(this, 'setMap')
- var b = this.get('map')
- if (a) b && a !== b && b.sk(this), this.set('map', a)
- else if (b && (b.sk(this), this.set('map', null, !0), (this.qi = !1), this.gg && this.gg(), this.onRemove)) this.onRemove()
- },
- getMap: function () {
- g.c.add(this, 'getMap')
- return this.get('map', null, !0)
- },
- mapChanged: function () {
- var a = this.get('map')
- a && a.PH(this)
- },
- setzIndex: function (a) {
- g.c.add(this, 'setzIndex')
- this.set('zIndex', a)
- },
- getzIndex: function () {
- return this.get('zIndex', null, !0)
- },
- })
- z.o.rb = z.o.Yb.extend({
- w: {
- tileSize: 256,
- visible: !0,
- opacity: 1,
- zIndex: 0,
- noLimg: 1,
- zooms: [3, 20],
- getTileUrl: g.l.ba ? g.r.TE : g.r.OD,
- errorUrl: g.a.wpa,
- detectRetina: !0,
- className: 'amap-layer',
- mapNumber: '',
- merge: !1,
- sort: !1,
- cacheSize: g.l.size,
- },
- A: function (a) {
- this.CLASS_NAME = this.CLASS_NAME || 'AMap.TileLayer'
- g.c.ya(this, a)
- ;(a = a || {}) && a.tileUrl && (a.getTileUrl = a.tileUrl)
- this.pna(a)
- var b = a.zooms
- b && b[1] >= this.ol[0] ? (b[0] < this.ol[0] && (b[0] = this.ol[0]), b[1] > this.ol[1] && (b[1] = this.ol[1])) : (a.zooms = [this.ol[0], this.ol[1]])
- arguments.callee.ma.call(this, a)
- a.Sv && (this.Sv = !0)
- this.FG = this.vq()
- },
- setTextIndex: function (a) {
- g.c.add(this, 'setTextIndex')
- this.set('textIndex', a)
- },
- vq: function () {
- if (this.get('createTile')) return !1
- var a = this.get('getTileUrl')
- return a && a !== g.r.OD && a !== g.r.TE ? !1 : !0
- },
- v2: function () {
- if (!this.vq()) return !1
- var a = this.get('map')
- return a && a.Bi && 'zh_cn' === a.get('lang') && !this.noVector ? !0 : !1
- },
- y4: function (a) {
- var b = g.r.SJ
- g.l.ja && this.get('detectRetina') && (b = g.r.SJ.replace('scl=1', 'scl=2'))
- a && (b = b.replace('ltype=3', 'ltype=11'))
- return b
- },
- bg: function (a) {
- var b = this.v2(),
- c = this.get('map')
- this.vq() && this.set('mapNumber', 'GS(2019)6379')
- if (this.Sv) return new g.o.rb(this, a, this.yr(this.y4(!0)), this.w.maxDataZoom, !0)
- if (b)
- if (((this.Gq = !0), g.o.ei)) {
- if ('dv' === c.get('baseRender') && !this.get('watermark')) {
- var b = c.get('showBuildingBlock'),
- d = new g.o.rb(this, a, this.yr(this.y4(!b)), void 0, !0)
- b &&
- ((d.Hj = new g.o.od(new z.o.rb({ zooms: [16, 20], innerLayer: !0 }), a, ['building'])),
- (d.Hj.type = '\u697c\u5757\u56fe\u5c42'),
- d.Hj.af(['visible', 'opacity', 'zIndex'], d, !0),
- d.Hj.AC(c.get('mapStyle') || 'normal'))
- d.type = '\u6805\u683c\u5e95\u56fe'
- return d
- }
- if ('v' <= c.get('baseRender') || this.get('watermark'))
- return (
- '3D' == a.D.view.type
- ? ((c = new g.o.od(this, a, ['region', 'road'])),
- (c.type = '\u77e2\u91cf\u5e95\u56fe'),
- (b = new z.o.rb({ zooms: [17, 20], zIndex: 50, innerLayer: !0 })),
- (c.Hj = new g.o.od(b, a, ['building'])),
- (c.Hj.ff = 17),
- (c.Hj.type = '\u697c\u5757\u56fe\u5c42'),
- (c.Hj.Yy = 1),
- c.Hj.af(['visible', 'merge', 'sort', 'opacity'], c, !0),
- b.X('rejectMapMask', this, !0))
- : ((c = new g.o.od(this, a, ['region', 'building', 'road'])), (c.type = '\u77e2\u91cf\u5e95\u56fe')),
- (a.xma = c)
- )
- } else return ['vectorlayer', 'overlay']
- else return (this.Gq = !1), new g.o.rb(this, a, null, this.w.maxDataZoom)
- },
- getTileUrlChanged: function () {
- var a = this.get('getTileUrl')
- if (a === g.r.OD || a === g.r.TE || a === g.r.OK) this.YJ = !0
- 'string' === typeof a && (a = this.yr(a))
- this.set('tileFun', a)
- },
- pna: function (a) {
- this.ol || (this.ol = [this.w.zooms[0], this.w.zooms[1]])
- var b
- a.hasOwnProperty('detectRetina') && !1 === a.detectRetina && (b = !0)
- g.l.ba && g.l.ja && this.w.detectRetina && !b && (this.ol[1] -= 1)
- },
- getTiles: function () {
- g.c.add(this, 'getTiles')
- var a = this.get('tiles', null, !0)
- if (a && a.length) a = a[0]
- else return []
- for (var b = [], c, d = 0; d < a.length; d += 1) a[d].key && ((c = a[d].key.split('/')), b.push('' + c[1] + ',' + c[2]))
- return b
- },
- reload: function () {
- g.c.add(this, 'reload')
- this.set('reload', 1)
- },
- $s: function () {
- this.C = !0
- var a = this.get('map', null, !0)
- this.setMap(null)
- this.qi = !1
- this.setMap(a)
- this.C = !1
- },
- setTileUrl: function (a) {
- g.c.add(this, 'setTileUrl')
- this.v2() ? (this.set('getTileUrl', a), this.$s()) : this.set('getTileUrl', a)
- },
- yr: function (a) {
- var b = this,
- c,
- d,
- e
- return function (f, h, k) {
- f = (f + Math.pow(2, k)) % Math.pow(2, k)
- if ('number' !== typeof (f + h + k)) return null
- var l = b.get('map'),
- m = 'zh_cn'
- l && (m = l.get('lang') || 'zh_cn')
- k = a.replace('[x]', f).replace('[y]', h).replace('[z]', k).replace('[lang]', m)
- if (!c) {
- if ((d = a.match(/\{.*\}/))) (e = d.toString().replace('{', '').replace('}', '')), (e = e.split(','))
- c = !0
- }
- e && e.length && (k = k.replace(d, e[Math.abs(f + h) % e.length]))
- return k
- }
- },
- getTileUrl: function (a, b, c) {
- g.c.add(this, 'getTileUrl')
- return this.get('tileFun', null, !0)(a, b, c)
- },
- getZooms: function (a) {
- a || g.c.add(this, 'getZooms')
- return this.get('zooms', null, !0)
- },
- })
- z.o.rb.EW = z.o.rb.extend({
- w: { getTileUrl: g.r.xU, zooms: [3, 20], zIndex: 2, maxDataZoom: 18, detectRetina: !1, mapNumber: 'GS(2021)4122', className: 'amap-layer amap-satellite', cacheSize: g.l.size },
- A: function (a) {
- this.CLASS_NAME = 'AMap.TileLayer.Satellite'
- g.c.ya(this, a)
- this.ol = [3, 20]
- arguments.callee.ma.apply(this, arguments)
- },
- })
- z.o.rb.AW = z.o.rb.extend({
- w: { getTileUrl: g.r.OK, zooms: [3, 20], zIndex: 3, type: 'overlayer', maxDataZoom: 18, className: 'amap-layer amap-roadnet', cacheSize: g.l.size },
- A: function (a) {
- this.CLASS_NAME = 'AMap.TileLayer.RoadNet'
- g.c.ya(this, a)
- this.ol = [3, 20]
- arguments.callee.ma.apply(this, arguments)
- },
- bg: function (a) {
- if (this.get('map').Bi) {
- this.Gq = !0
- var b = g.r.PK
- g.l.ja && this.get('detectRetina') && (b = g.r.PK.replace('scl=1', 'scl=2'))
- a = new g.o.rb(this, a, this.yr(b), this.w.maxDataZoom)
- } else (this.Gq = !1), (a = new g.o.rb(this, a))
- return a
- },
- })
- z.o.rb.MW = z.o.rb.extend({
- w: {
- getTileUrl: function (a, b, c) {
- return g.r.tc + '://tm.amap.com/trafficengine/mapabc/traffictile?v=1.0&t=1&zoom=' + (17 - c) + '&x=' + a + '&y=' + b
- },
- zooms: [6, 20],
- zIndex: 4,
- type: 'overlayer',
- autoRefresh: !1,
- interval: 180,
- maxDataZoom: 17,
- alwaysRender: !g.l.j3,
- className: 'amap-layer amap-traffic',
- cacheSize: g.l.size,
- },
- A: function (a) {
- this.CLASS_NAME = 'AMap.TileLayer.Traffic'
- g.c.ya(this, a)
- this.ol = [6, 20]
- arguments.callee.ma.apply(this, arguments)
- this.C = !0
- this.startRefresh()
- this.C = !1
- },
- stopRefresh: function () {
- g.c.add(this, 'stopRefresh')
- this.CK && (clearInterval(this.CK), (this.CK = null))
- },
- startRefresh: function () {
- g.c.add(this, 'startRefresh')
- if (this.get('autoRefresh') && !this.CK) {
- var a = this
- this.CK = setInterval(function () {
- a.C = !0
- a.reload()
- a.C = !1
- a.q('refresh')
- }, Math.max(1e3 * (this.get('interval') || 180), 1e4))
- }
- },
- reload: function () {
- g.c.add(this, 'reload')
- g.a.Wc(function () {
- this.set('reload')
- }, this)
- },
- gg: function () {
- this.C = !0
- this.stopRefresh()
- this.get('map') && this.get('map').G('zoomstart', this.reload, this)
- this.C = !1
- },
- bg: function (a) {
- var b = this.get('map'),
- b = a.D
- b.h('zoomstart', this.reload, this)
- return 'd' !== b.get('baseRender') ? (g.o.$w ? (a = new g.o.$w(this, a)) : ['vt']) : (a = new g.o.rb(this, a, null, this.w.maxDataZoom))
- },
- })
- z.o.rb.yA = z.o.rb.extend({
- w: { zooms: [3, 20], zIndex: 12, detectRetina: !1, className: 'amap-layer amap-flexible', cacheSize: g.l.size },
- A: function (a) {
- this.CLASS_NAME = this.CLASS_NAME || 'AMap.TileLayer.Flexible'
- g.c.ya(this, a)
- this.Isa = !0
- arguments.callee.ma.call(this, a)
- },
- setCreateTile: function (a) {
- g.c.add(this, 'setCreateTile')
- 'function' === typeof a && a !== this.get('createTile') && this.set('createTile', a)
- },
- getCreateTile: function () {
- return this.get('createTile', null, !0)
- },
- })
- z.o.rb.Hba = z.o.rb.yA.extend({
- w: { zooms: [3, 20], zIndex: 12, tileSize: 512, detectRetina: !1, className: 'amap-layer amap-wms', cacheSize: g.l.size, url: '', params: '' },
- A: function (a) {
- this.CLASS_NAME = 'AMap.TileLayer.WMS'
- g.c.ya(this, a)
- arguments.callee.ma.call(this, a)
- this.zw()
- var b = this,
- c = this.get('tileSize')
- this.set('createTile', function (a, e, f, h, k) {
- var l = Math.pow(2, 20 - f) * c
- f = new g.H(l * a, l * (e + 1))
- a = new g.H(l * (a + 1), l * e)
- e = g.RJ.t7(f)
- a = g.RJ.t7(a)
- var m = document.createElement('img')
- '3D' === b.Uf && (m.crossOrigin = 'anonymous')
- g.F.h(m, 'load', function () {
- h(m)
- })
- g.F.h(m, 'error', function () {
- k(m)
- })
- m.src = this.url + '&BBOX=' + e + ',' + a
- })
- },
- zw: function () {
- var a = this.get('url', null, !0),
- b = this.get('params', null, !0),
- c = this.get('tileSize')
- b.WIDTH = c
- b.HEIGHT = c
- b.CRS = b.CRS || 'EPSG:3857'
- b.REQUEST = 'GetMap'
- b.SERVICE = 'WMS'
- b.FORMAT = b.FORMAT || 'image/png'
- b.TRANSPARENT = void 0 === b.TRANSPARENT ? 'true' : b.TRANSPARENT
- delete b.BBOX
- this.url = a + '?' + g.a.join(b, '&')
- this.C = !0
- this.reload()
- this.C = !1
- },
- setUrl: function (a) {
- g.c.add(this, 'setUrl')
- this.set('url', a, !0)
- this.zw()
- },
- getUrl: function () {
- g.c.add(this, 'getUrl')
- return this.get('url', null, !0)
- },
- setParams: function (a) {
- g.c.add(this, 'setParams')
- g.extend(this.get('params', null, !0), a || {})
- this.zw()
- },
- getParams: function () {
- g.c.add(this, 'getParams')
- return this.get('params', null, !0)
- },
- })
- z.o.rb.Iba = z.o.rb.yA.extend({
- w: { zooms: [3, 20], tileSize: 256, zIndex: 12, detectRetina: !1, className: 'amap-layer amap-wmts', cacheSize: g.l.size },
- A: function (a) {
- this.CLASS_NAME = 'AMap.TileLayer.WMTS'
- g.c.ya(this, a)
- arguments.callee.ma.call(this, a)
- this.zw()
- var b = this
- this.get('tileSize')
- this.set('createTile', function (a, d, e, f, h) {
- var k = document.createElement('img')
- '3D' === b.Uf && (k.crossOrigin = 'anonymous')
- g.F.h(k, 'load', function () {
- f(k)
- })
- g.F.h(k, 'error', function () {
- h(k)
- })
- k.src = this.url + '&TileMatrix=' + e + '&TileRow=' + d + '&TileCol=' + a
- })
- },
- zw: function () {
- var a = this.get('url', null, !0),
- b = this.get('params', null, !0)
- b.TileMatrixSet = b.TileMatrixSet || 'EPSG:3857'
- b.Request = 'GetTile'
- b.Service = 'WMTS'
- b.Format = b.Format || 'image/png'
- this.url = a + '?' + g.a.join(b, '&')
- this.C = !0
- this.reload()
- this.C = !1
- },
- setUrl: function (a) {
- g.c.add(this, 'setUrl')
- this.set('url', a, !0)
- this.zw()
- },
- getUrl: function () {
- g.c.add(this, 'getUrl')
- return this.get('url', null, !0)
- },
- setParams: function (a) {
- g.c.add(this, 'setParams')
- g.extend(this.get('params', null, !0), a || {})
- this.zw()
- },
- getParams: function () {
- g.c.add(this, 'getParams')
- return this.get('params', null, !0)
- },
- })
- z.o.rb.LL = z.o.rb.yA.extend({
- w: { detectRetina: !0, zooms: [10, 18], zIndex: 2 },
- A: function (a) {
- arguments.callee.ma.apply(this, arguments)
- var b = this
- this.set('createTile', function (a, d, e, f, h) {
- var k = b.Ce.map.map
- k.Re.NE(a, d, e, function (l) {
- if (l) h()
- else {
- var m = document.createElement('img')
- '3D' === b.Uf && (m.crossOrigin = 'anonymous')
- g.F.h(m, 'load', function () {
- f(m)
- })
- g.F.h(m, 'error', function () {
- h(m)
- })
- m.src = (function (a, c, d) {
- var e = 'zh_cn'
- b && b.get && k && (e = k.get('lang') || 'zh_cn')
- return g.r.tc + '://grid.amap.com/grid/' + d + '/' + a + '/' + c + '?src=jsapi&key=' + g.r.key + '&lang=' + e + '&dpiType=' + (g.l.Jc ? 'wprd' : 'webrd')
- })(a, d, e)
- }
- })
- })
- },
- })
- z.o.fd = z.o.Yb.extend({
- w: { visible: !0, zooms: [3, 25], type: 'overlay', zIndex: 5, alwaysRender: !0 },
- A: function (a) {
- this.w5 = !0
- arguments.callee.ma.apply(this, arguments)
- },
- bg: function (a) {
- return new g.o.fd(this, a)
- },
- })
- z.o.W$ = z.o.Yb.extend({
- w: { zooms: [14, 20], zIndex: 8, visible: !0, merge: !0, sort: !1 },
- A: function (a) {
- this.CLASS_NAME = 'AMap.Buildings'
- g.c.ya(this, a)
- a = a || {}
- a.zooms && (a.zooms[0] = Math.max(14, a.zooms[0]))
- arguments.callee.ma.apply(this, arguments)
- },
- vq: function () {
- return !1
- },
- bg: function (a) {
- if (g.l.Xp) return (a = new g.o.Eba(this, a)), (a.Yy = this.get('heightFactor') || 1), a
- },
- setStyle: function (a) {
- this.set('customStyle', a)
- g.c.add(this, 'setStyle')
- },
- })
- z.o.EL = z.o.Yb.extend({
- w: { visible: !0, zooms: [3, g.l.ba ? 20 : 18], opacity: 1, type: 'overlay', zIndex: 6 },
- A: function (a) {
- arguments.callee.ma.apply(this, arguments)
- },
- bg: function (a) {
- return g.o.BA ? new g.o.BA(this, a) : ['imagelayer']
- },
- getMap: function () {
- g.c.add(this, 'getMap')
- return this.Ce.map
- },
- show: function () {
- g.c.add(this, 'show')
- this.set('visible', !0)
- this.q('options')
- },
- getOpacity: function () {
- g.c.add(this, 'getOpacity')
- return this.get('opacity', null, !0)
- },
- setOpacity: function (a) {
- g.c.add(this, 'setOpacity')
- this.set('opacity', a)
- },
- getBounds: function () {
- g.c.add(this, 'getBounds')
- return this.get('bounds', null, !0).cb()
- },
- setBounds: function (a) {
- g.c.add(this, 'setBounds')
- this.q('bounds', a)
- this.C = !0
- this.setOptions({ bounds: a })
- this.C = !1
- },
- hide: function () {
- g.c.add(this, 'hide')
- this.set('visible', !1)
- this.q('options')
- },
- setOptions: function (a) {
- g.c.add(this, 'setOptions')
- this.jf(a)
- this.q('options')
- },
- getOptions: function () {
- g.c.add(this, 'getOptions')
- var a = {},
- b
- for (b in this.w) this.w.hasOwnProperty(b) && (a[b] = this.get(b))
- return a
- },
- getElement: function () {
- return this.o.M ? this.o.M.Ob : this.o.Bf ? this.o.Bf.Ob : null
- },
- })
- z.o.BA = z.o.EL.extend({
- A: function (a) {
- this.CLASS_NAME = 'AMap.ImageLayer'
- g.c.ya(this, a)
- a && a.url && (a.__source__ = a.url)
- arguments.callee.ma.apply(this, arguments)
- },
- getImageUrl: function () {
- g.c.add(this, 'getImageUrl')
- return this.get('__source__')
- },
- setImageUrl: function (a) {
- g.c.add(this, 'setImageUrl')
- return this.set('__source__', a)
- },
- })
- z.o.Gba = z.o.EL.extend({
- A: function (a) {
- this.CLASS_NAME = 'AMap.VideoLayer'
- g.c.ya(this, a)
- a && a.url && (a.__source__ = a.url)
- arguments.callee.ma.apply(this, arguments)
- },
- play: function () {
- var a = this.getElement()
- a && a.play && a.play()
- },
- pause: function () {
- var a = this.getElement()
- a && a.pause && a.pause()
- },
- getVideoUrl: function () {
- g.c.add(this, 'getVideoUrl')
- return this.get('__source__')
- },
- setVideoUrl: function (a) {
- g.c.add(this, 'setVideoUrl')
- return this.set('__source__', a)
- },
- })
- z.o.Y$ = z.o.EL.extend({
- A: function (a) {
- this.CLASS_NAME = 'AMap.CanvasLayer'
- g.c.ya(this, a)
- a && a.canvas && (a.__source__ = a.canvas)
- arguments.callee.ma.apply(this, arguments)
- },
- getCanvas: function () {
- g.c.add(this, 'getCanvas')
- return this.get('__source__')
- },
- setCanvas: function (a) {
- g.c.add(this, 'setCanvas')
- return this.set('__source__', a)
- },
- reFresh: function () {
- this.o && ((this.o.KE = !0), this.o.set('display'))
- },
- })
- z.o.Raa = z.o.Yb.extend({
- w: { visible: !0, zooms: [3, 20], type: 'overlay', zIndex: 5, cursor: 'pointer', alwaysRender: !0, stable: !0, bubble: !0, rejectMapMask: !0, className: 'amap-mass' },
- A: function (a, b) {
- this.CLASS_NAME = 'AMap.MassMarks'
- g.c.ya(this, b)
- g.l.il &&
- ((this.zj = !0),
- b.size && (b.size = g.a.Lq(b.size)),
- (this.C = !0),
- this.setData(a),
- g.a.ub(this, b),
- b.style ? (this.jf(this.w, !0), this.setStyle(b.style)) : this.setStyle(this.w),
- (this.C = !1))
- },
- clear: function () {
- g.c.add(this, 'clear')
- this.set('dataSources', '')
- },
- getStyle: function () {
- g.c.add(this, 'getStyle')
- return this.Cm
- },
- setStyle: function (a) {
- g.c.add(this, 'setStyle')
- if (a instanceof Array) {
- for (var b = 0; b < a.length; b += 1)
- (a[b].rotation_ = (Math.PI * (a[b].rotation || 0)) / 180),
- (a[b].size = g.a.Lq(a[b].size)),
- (a.Af = Math.max(a.Af || 0, a[b].size.width + a[b].anchor.x)),
- (a.ig = Math.max(a.Af || 0, a[b].size.height + a[b].anchor.y))
- this.Cm = a
- } else
- a.size && (a.size = g.a.Lq(a.size)),
- (a.rotation_ = (Math.PI * (a.rotation || 0)) / 180),
- this.jf(a, !0),
- (this.Cm = { anchor: this.get('anchor'), url: this.get('url'), size: this.get('size'), rotation_: this.get('rotation_') }),
- (this.Cm.Af = this.Cm.size.width + this.Cm.anchor.x),
- (this.Cm.ig = this.Cm.size.height + this.Cm.anchor.y)
- this.q('style')
- },
- setData: function (a) {
- g.c.add(this, 'setData')
- this.set('dataSources', a)
- },
- getData: function () {
- g.c.add(this, 'getData')
- return this.get('datas') || this.get('dataSources')
- },
- setMap: function (a) {
- g.c.add(this, 'setMap')
- g.l.il &&
- (a ? (this.get('map') && this.get('map').sk(this), this.set('map', a)) : this.get('map') && (this.get('map').sk(this), this.set('map', null, !0), (this.qi = !1), this.gg && this.gg()))
- },
- bg: function (a) {
- return g.tb.ID(['cvector']) ? ((a = new g.o.fd(this, a)), this.X('datas', a), a) : ['cvector']
- },
- })
- z.o.baa = z.o.Yb.extend({
- A: function (a) {
- this.CLASS_NAME = 'AMap.CompositeLayer'
- this.xB = !0
- g.a.ub(this, a)
- this.Vm = []
- this.jf(this.w)
- },
- opacityChanged: function () {
- for (var a = this.get('opacity', null, !0), b = -1, c = this.Vm.length; ++b < c; ) this.Vm[b].setOpacity(a)
- },
- addLayer: function (a) {
- if (!this.has(a)) {
- a.YA = this
- var b = this.get('map')
- a.setMap(b)
- this.Vm.push(a)
- }
- return this
- },
- removeLayer: function (a) {
- this.has(a) && a.setMap(null)
- return this
- },
- Tka: function (a) {
- if (this.has(a)) {
- delete a.YA
- var b = this.Vm
- a = g.a.indexOf(b, a)
- g.a.Fo(b, a)
- }
- },
- has: function (a) {
- return -1 !== g.a.indexOf(this.Vm, a)
- },
- show: function () {
- for (var a = -1, b = this.Vm.length; ++a < b; ) this.Vm[a].show()
- },
- hide: function () {
- for (var a = -1, b = this.Vm.length; ++a < b; ) this.Vm[a].hide()
- },
- setzIndex: function (a, b) {
- g.c.add(this, 'setzIndex')
- this.set('zIndex', a)
- var c = this.Vm
- if ('undefined' === typeof b)
- for (var d = -1, e = c.length; ++d < e; ) {
- var f = c[d]
- f.setzIndex(a)
- }
- else (f = c[b]) && f.setzIndex(a)
- },
- bg: function (a) {
- this.e = a
- },
- getLayers: function () {
- return this.Vm
- },
- })
- z.o.qr = z.o.Yb.extend({
- Faa: { visible: !0, zIndex: 121, opacity: 1, zooms: [3, 20], collision: !0, animation: !0, alwaysRender: !0 },
- w: { zooms: [3, 20] },
- oP: null,
- _markerBindArray: {},
- A: function (a) {
- this.CLASS_NAME = this.CLASS_NAME || 'AMap.LabelsLayer'
- a = a || {}
- g.c.ya(this, a)
- arguments.callee.ma.apply(this, arguments)
- this.w = this.Faa
- g.a.ub(this, a)
- this.jf(this.w)
- this.Xf = []
- this.kb = []
- this.Ou = []
- },
- getCollision: function () {
- return this.get('collision', null, !0)
- },
- setCollision: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : !0
- this.set('collision', a)
- this.w.collision = a
- this.g && this.g.ub(this.w, this.Xf)
- },
- getOpacity: function () {
- return this.get('opacity', null, !0)
- },
- setOpacity: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 1
- this.set('opacity', a)
- this.w.opacity = a
- this.g && this.g.ub(this.w, this.Xf)
- },
- getzIndex: function () {
- return this.get('zIndex', null, !0)
- },
- setzIndex: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 120
- this.set('zIndex', a)
- this.w.zIndex = a
- this.g && this.g.ub(this.w, this.Xf)
- },
- getAnimation: function () {
- return this.get('animation', null, !0)
- },
- setAnimation: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : !0
- this.set('animation', a)
- this.w.animation = a
- this.g && this.g.ub(this.w, this.Xf)
- },
- getZooms: function () {
- return this.get('zooms', null, !0)
- },
- setZooms: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : [3, 20]
- this.set('zooms', a)
- this.w.zooms = a
- this.g && this.g.ub(this.w, this.Xf)
- },
- add: function (a) {
- g.c.add(this, 'add')
- if (a) {
- a = '[object Array]' !== Object.prototype.toString.apply(a) ? [a] : a
- for (var b = 0; b < a.length; b++) {
- var c = a[b]
- if (c) {
- c.g = this
- var d = c.w,
- e = {
- data: { id: c._LabelMarkerId || void 0, name: d.title || '', position: this.nfa(d.position) || void 0, rank: d.rank || void 0 },
- opts: {
- zooms: d.zooms || void 0,
- opacity: 'number' === typeof d.opacity ? d.opacity : 1,
- zIndex: 'number' === typeof d.zIndex ? d.zIndex : 1,
- height: 'number' === typeof d.height ? d.height : 0,
- icon: {},
- text: {},
- },
- }
- if (d.icon) {
- var f = d.icon,
- h = f.size,
- k = f.clipSize
- h && (f.size = this.wG(h))
- k && (f.clipSize = this.wG(k))
- e.opts.icon = d.icon
- }
- d.text && ((e.opts.text = d.text), d.text.content && (e.data.txt = d.text.content), (d = (d = e.opts.text.style) && d.padding) && (e.opts.text.style.padding = this.sha(d)))
- this.Xf.push(e)
- this.kb.push(c)
- this._markerBindArray[c._LabelMarkerId] = c
- }
- }
- this.Ho()
- b = a.length
- for (c = 0; c < b; c++) (e = a[c]) && e.Q8 && e.Q8()
- }
- },
- getMarkers: function () {
- return this.kb
- },
- remove: function (a) {
- g.c.add(this, 'remove')
- if (a) {
- var b = void 0,
- b = '[object Array]' !== Object.prototype.toString.apply(a) ? [a] : a
- if (this.Xf) {
- for (a = 0; a < b.length; a++) {
- var c = this.vn(this.Xf, b[a])
- ;-1 !== c && (this.Xf.splice(c, 1), this.kb.splice(c, 1))
- }
- this.Ho()
- }
- }
- },
- clear: function () {
- g.c.add(this, 'clear')
- this.g && this.g.clear()
- this.Xf = []
- this.kb = []
- },
- setPosition: function () {},
- positionChanged: function () {},
- on: function (a) {
- g.c.add(this, 'on')
- this.g ? (this.Ch(arguments), this.g.X1(a)) : this.Ou.push(arguments)
- },
- off: function (a) {
- g.c.add(this, 'off')
- this.g && this.g.o$(a)
- },
- Ho: function () {
- this.g && this.g.Qz(this.Xf)
- },
- Qz: function (a) {
- this.W0(a)
- },
- IU: function (a, b) {
- var c = this.oP
- a && (b ? (c && c._LabelMarkerId !== a._LabelMarkerId && c.setTop(!1), (this.oP = a)) : (this.oP = null))
- },
- wR: function (a) {
- if (this.g) return this.g.wR(a)
- },
- vn: function (a, b) {
- for (var c = b._LabelMarkerId || null, d = 0; d < a.length; d++) if (a[d].data.id === c) return d
- return -1
- },
- removeItem: function () {},
- bg: function (a) {
- this.get('map') || this.set('map', a.D, !0)
- if (g.o.qr) {
- this.g = new g.o.qr(this, a)
- this.Xf && this.Ho()
- a = this.Ou
- if (a.length) {
- for (var b = 0; b < a.length; b++) this.on.apply(this, a[b])
- this.Ou = []
- }
- return this.g
- }
- return ['AMap.LabelsLayer']
- },
- m4: function (a) {
- if (a) return this._markerBindArray[a] || null
- },
- xZ: function () {
- var a = this
- return g.a.LD(function (b) {
- var c = a.g
- c ? c.Qz(b) : (a.tD = b)
- }, 100)
- },
- If: function (a) {
- return 'undefined' === typeof a
- },
- QZ: function (a) {
- return 'string' === typeof a
- },
- Aga: function (a) {
- return 'number' === typeof a
- },
- wG: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : []
- return this.If(a.width) || this.If(a.height) ? (this.QZ(a) ? a.split(',') : this.Aga(a) ? [a, a] : a) : [a.width, a.height]
- },
- nfa: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : []
- return this.If(a.R) || this.If(a.Q) ? (this.QZ(a) ? a.split(',') : a) : [a.R, a.Q]
- },
- sha: function (a) {
- 'string' === typeof a && ((a = a.trim()), (a = a.split(' ')))
- if ('[object Array]' === Object.prototype.toString.apply(a)) {
- for (var b = a.length, c = 0; c < b; c++) {
- var d = parseInt(a[c])
- a[c] = isNaN(d) ? 3 : d
- }
- switch (b) {
- case 0:
- a = [3, 3, 3, 3]
- break
- case 1:
- a = [a[0], a[0], a[0], a[0]]
- break
- case 2:
- a = [a[0], a[1], a[0], a[1]]
- break
- case 3:
- a = [a[0], a[1], a[2], a[1]]
- }
- return a
- }
- return [3, 3, 3, 3]
- },
- })
- z.o.ML = z.o.BA.extend({
- A: function (a, b, c) {
- this.CLASS_NAME = 'AMap.GroundImage'
- g.c.ya(this, c)
- c = c || {}
- this.$g = !0
- var d = parseFloat(c.opacity)
- isNaN(d) && (d = 1)
- arguments.callee.ma.call(this, { url: a, bounds: b, clickable: c.clickable, opacity: d, map: c.map, zooms: c.zooms || [3, 20] })
- this.CLASS_NAME = 'AMap.GroundImage'
- },
- Nua: function (a) {
- this.get('bounds').contains(a.lnglat) && ((a.target = this), this.q('click', a))
- },
- Oua: function (a) {
- this.get('bounds').contains(a.lnglat) && ((a.target = this), this.q('dblclick', a))
- },
- setMap: function (a) {
- g.c.add(this, 'setMap')
- a
- ? (this.get('map') && (this.get('map').sk(this), this.F2 && z.event.removeListener(this.F2), this.W2 && z.event.removeListener(this.W2)), this.set('map', a))
- : this.get('map') && (this.get('map').sk(this), (this.Ce.map = null))
- },
- mapChanged: function () {
- this.get('map') &&
- (this.get('map').PH(this),
- this.get('clickable') && ((this.F2 = z.event.addListener(this.get('map'), 'click', this.Nua, this)), (this.W2 = z.event.addListener(this.get('map'), 'dblclick', this.Oua, this))))
- },
- })
- z.B.Eh = g.da.extend({
- ka: [g.va, g.Ze, { Ka: g.a.Ka }],
- w: { extData: {}, bubble: !1, clickable: !0, draggable: !1 },
- A: function () {
- this.MG = g.a.yb(this)
- },
- xEa: function () {
- return this.MG
- },
- bDa: function () {
- this.C = !0
- this.get('map', null, !0) && this.setMap(this.get('map'))
- this.C = !1
- },
- mapChanged: function () {
- this.get('map', null, !0) && this.get('map', null, !0).sC(this)
- },
- cR: function (a) {
- var b = 0
- a && (b = 'string' === typeof a ? Math.round(parseFloat(a) / 0.14929107086948487) : a)
- return b
- },
- setHeight: function (a) {
- this.height = a = a || 0
- a = this.cR(a)
- this.set('altitude', a)
- },
- getHeight: function () {
- return this.height
- },
- show: function () {
- g.c.add(this, 'show')
- !0 != this.get('visible', null, !0) && this.set('visible', !0)
- },
- hide: function () {
- g.c.add(this, 'hide')
- !1 != this.get('visible', null, !0) && this.set('visible', !1)
- },
- setMap: function (a) {
- g.c.add(this, 'setMap')
- a !== this.get('map', null, !0) &&
- (a
- ? (this.get('map', null, !0) && this.get('map', null, !0).Jz(this), this.set('map', a))
- : this.get('map', null, !0) && (this.get('map', null, !0).Jz(this), this.set('map', null, !0)))
- },
- getMap: function () {
- g.c.add(this, 'getMap')
- return this.get('map', null, !0)
- },
- setExtData: function (a) {
- g.c.add(this, 'setExtData')
- this.set('extData', a)
- },
- positionChanged: function () {},
- getExtData: function () {
- g.c.add(this, 'getExtData')
- return this.get('extData', null, !0)
- },
- getVisible: function () {
- return this.get('visible', null, !0)
- },
- })
- z.B.fd = z.B.Eh.extend({
- A: function (a) {
- z.B.fd.bd.A.apply(this, arguments)
- },
- show: function () {
- g.c.add(this, 'show')
- !1 == this.get('visible', null, !0) && (this.set('visible', !0), this.q('show', { type: 'show', target: this }))
- },
- hide: function () {
- g.c.add(this, 'hide')
- !0 == this.get('visible', null, !0) && (this.set('visible', !1), this.q('hide', { type: 'hide', target: this }))
- },
- getVisible: function () {
- g.c.add(this, 'getVisible')
- return this.get('visible', null, !0)
- },
- getOptions: function () {
- g.c.add(this, 'getOptions')
- var a = {},
- b = 'map zIndex strokeColor strokeOpacity strokeWeight strokeStyle strokeDasharray extData bubble clickable draggable'.split(' '),
- c = 'isOutline outlineColor geodesic path lineJoin lineCap borderWeight showDir dirColor dirImg'.split(' '),
- d = ['fillColor', 'fillOpacity', 'path', 'lineJoin', 'texture'],
- e = ['center', 'radius', 'texture'],
- f = ['bounds', 'texture'],
- h = []
- this instanceof z.B.Zb && (h = b.concat(c))
- this instanceof z.B.Dc && (h = b.concat(d))
- this instanceof z.B.gh && (h = b.concat(e).concat(d))
- this instanceof z.B.Et && (h = b.concat(e).concat(d))
- this instanceof z.B.Lt && (h = b.concat(d).concat(f))
- for (b = 0; b < h.length; b += 1) a[h[b]] = this.get(h[b], null, !0)
- return a
- },
- setOptions: function (a) {
- g.c.add(this, 'setOptions')
- a.hasOwnProperty('path') && ((a.path && a.path.length) || (a.path = []), (a.path = this.Ka(a.path)))
- a.center && (a.center = this.Ka(a.center))
- var b
- a.hasOwnProperty('map') && ((b = a.map), delete a.map)
- this.jf(a)
- void 0 !== b && (this.setMap(b), (a.map = b))
- this.q('options')
- this.q('change', { type: 'change', target: this })
- },
- setzIndex: function (a) {
- g.c.add(this, 'setzIndex')
- this.set('zIndex', a)
- },
- getzIndex: function () {
- g.c.add(this, 'getzIndex')
- return this.get('zIndex', null, !0)
- },
- setDraggable: function (a) {
- g.c.add(this, 'setDraggable')
- this.set('draggable', a)
- },
- })
- z.B.dM = z.B.fd.extend({
- w: { visible: !0, zIndex: 10, strokeColor: '#006600', strokeOpacity: 0.9, strokeWeight: 3, strokeStyle: 'solid', strokeDasharray: [10, 5], lineJoin: 'miter', lineCap: 'butt', path: [] },
- A: function (a) {
- z.B.dM.bd.A.apply(this, arguments)
- },
- setPath: function (a, b) {
- g.c.add(this, 'setPath')
- ;(a && a.length) || (a = [])
- a = this.Ka(a)
- this.B && this.B.get('deltaPos') && this.B.set('deltaPos', [0, 0], !0)
- this.set('path', a)
- this.q('change', { type: 'change', target: this })
- b || this.q('setPath')
- },
- getPath: function () {
- g.c.add(this, 'getPath')
- return this.L2()
- },
- reset: function () {
- var a = this.L2()
- this.B.set('deltaPos', [0, 0], !0)
- this.setPath(a)
- },
- L2: function () {
- var a = this.get('path', null, !0)
- this.B && this.B.get('deltaPos') && (a = this.B.St(a, this.B.get('deltaPos')))
- return a
- },
- })
- z.B.ci = g.da.extend({
- ka: [g.va, g.Ze],
- w: { size: new g.xd(36, 36), imageOffset: new g.H(0, 0), image: g.r.Gb + '/theme/v1.3/markers/0.png', imageSize: null },
- A: function (a) {
- this.CLASS_NAME = 'AMap.Icon'
- g.c.ya(this, a)
- a = a || {}
- a.size && (a.size = g.a.Lq(a.size))
- a.imageSize && (a.imageSize = g.a.Lq(a.imageSize))
- g.a.ub(this, a)
- this.jf(this.w)
- },
- setImageSize: function (a) {
- g.c.add(this, 'setImageSize')
- a = g.a.Lq(a)
- this.set('imageSize', a)
- },
- getImageSize: function () {
- g.c.add(this, 'getImageSize')
- return this.get('imageSize', null, !0)
- },
- })
- z.B.Paa = g.da.extend({
- ka: [g.va, g.Ze],
- w: { coords: [], type: '' },
- A: function (a) {
- this.CLASS_NAME = 'AMap.MarkerShape'
- g.c.ya(this, a)
- g.a.ub(this, a)
- this.jf(this.w)
- },
- })
- z.B.vb = z.B.Eh.extend({
- w: {
- cursor: 'pointer',
- visible: !0,
- zIndex: 100,
- angle: 0,
- textAlign: 'left',
- verticalAlign: 'top',
- autoRotation: !1,
- opacity: 1,
- offset: new g.H(-9, -31),
- size: new g.H(19, 33),
- raiseOnDrag: !1,
- topWhenClick: !1,
- topWhenMouseOver: !1,
- animation: 'AMAP_ANIMATION_NONE',
- },
- A: function (a) {
- this.CLASS_NAME = this.CLASS_NAME || 'AMap.Marker'
- g.c.ya(this, a)
- a = a || {}
- this.$g = !0
- this.hha = g.a.yb(this)
- this.C = !0
- a.position && (a.position = this.Ka(a.position))
- a.height && this.setHeight(a.height)
- g.a.ub(this, a)
- g.l.Ue && (this.w.angle = 0)
- this.jf(this.w, !0)
- this.mapChanged()
- this.C = !1
- },
- getAnchor: function () {
- g.c.add(this, 'getAnchor')
- return this.get('anchor', null, !0)
- },
- setAnchor: function (a) {
- g.c.add(this, 'setAnchor')
- this.set('anchor', a)
- },
- getId: function () {
- g.c.add(this, 'getId')
- return this.hha
- },
- setRaiseOnDrag: function (a) {
- g.c.add(this, 'setRaiseOnDrag')
- this.set('raiseOnDrag', a)
- },
- setPosition: function (a, b) {
- g.c.add(this, 'setPosition')
- a = this.Ka(a)
- void 0 !== b && ((this.C = !0), this.setHeight(b), (this.C = !1))
- this.set('position', a)
- },
- getPosition: function () {
- g.c.add(this, 'getPosition')
- return this.get('position', null, !0)
- },
- getBounds: function () {
- var a = this.get('position', null, !0).cb()
- return new g.oe(a, a.cb())
- },
- mapChanged: function () {
- this.xl('zoom')
- var a = this.get('map', null, !0)
- a && (this.get('position', null, !0) || this.set('position', a.get('center')), a.sC(this), this.X('zoom', a))
- },
- getZooms: function () {
- g.c.add(this, 'getZooms')
- return this.get('zooms', null, !0)
- },
- zoomChanged: function () {
- var a = this.get('zooms', null, !0)
- if (a) {
- var b = this.get('zoom')
- b < a[0] || b > a[1] ? this.set('outOfZooms', !0) : this.set('outOfZooms', !1)
- this.B && this.B.jva()
- }
- },
- setIcon: function (a) {
- g.c.add(this, 'setIcon')
- this.set('icon', a)
- },
- getIcon: function () {
- g.c.add(this, 'getIcon')
- return this.get('icon', null, !0)
- },
- setContent: function (a) {
- g.c.add(this, 'setContent')
- this.set('content', a)
- },
- getContent: function () {
- g.c.add(this, 'getContent')
- return this.get('content', null, !0)
- },
- getContentDom: function () {
- return this.get('contentDom', null, !0)
- },
- hide: function () {
- g.c.add(this, 'hide')
- !0 == this.get('visible', null, !0) && this.set('visible', !1)
- },
- show: function () {
- g.c.add(this, 'show')
- !1 == this.get('visible', null, !0) && this.set('visible', !0)
- },
- setCursor: function (a) {
- g.c.add(this, 'setCursor')
- this.set('cursor', a)
- },
- setRotation: function (a) {
- g.c.add(this, 'setRotation')
- g.l.Ue || this.set('angle', a)
- },
- setAngle: function (a) {
- g.c.add(this, 'setAngle')
- g.l.Ue || 'number' !== typeof a || this.set('angle', a)
- },
- getAngle: function () {
- g.c.add(this, 'getAngle')
- return this.get('angle', null, !0)
- },
- setOffset: function (a) {
- g.c.add(this, 'setOffset')
- this.set('offset', a)
- },
- getOffset: function () {
- g.c.add(this, 'getOffset')
- return this.get('offset', null, !0)
- },
- setTextAlign: function (a) {
- g.c.add(this, 'setTextAlign')
- this.set('textAlign', a)
- },
- getTextAlign: function () {
- g.c.add(this, 'getTextAlign')
- return this.get('textAlign', null, !0)
- },
- setVerticalAlign: function (a) {
- g.c.add(this, 'setVerticalAlign')
- this.set('verticalAlign', a)
- },
- getVerticalAlign: function () {
- g.c.add(this, 'getVerticalAlign')
- return this.get('verticalAlign', null, !0)
- },
- setzIndex: function (a) {
- g.c.add(this, 'setzIndex')
- this.set('zIndex', a)
- },
- getzIndex: function () {
- g.c.add(this, 'getzIndex')
- return this.get('zIndex', null, !0)
- },
- setOpacity: function (a) {
- g.c.add(this, 'setOpacity')
- this.set('opacity', a)
- },
- setDraggable: function (a) {
- g.c.add(this, 'setDraggable')
- this.set('draggable', a)
- },
- getDraggable: function () {
- g.c.add(this, 'getDraggable')
- return this.get('draggable', null, !0)
- },
- moveTo: function (a, b, c) {
- g.c.add(this, 'moveTo')
- a = this.Ka(a)
- this.set('move', { Nf: a, speed: b, xb: c })
- },
- moveAlong: function (a, b, c, d) {
- g.c.add(this, 'moveAlong')
- if (!(2 > a.length)) {
- a = this.Ka(a)
- for (var e = [a[0]], f = a[0], h = 1; h < a.length; h += 1) f.gb(a[h]) || (e.push(a[h]), (f = a[h]))
- this.set('move', { Nf: e, speed: b, xb: c, vna: d })
- }
- },
- stopMove: function () {
- g.c.add(this, 'stopMove')
- this.set('move', !1)
- },
- pauseMove: function () {
- g.c.add(this, 'pauseMove')
- var a = this.get('move')
- if (!a) return !1
- a.action = 'pause'
- this.set('move', a)
- return !0
- },
- resumeMove: function () {
- g.c.add(this, 'resumeMove')
- var a = this.get('move')
- if (!a) return !1
- a.action = 'resume'
- this.set('move', a)
- return !0
- },
- setShadow: function (a) {
- g.c.add(this, 'setShadow')
- this.set('shadow', a)
- },
- getShadow: function () {
- g.c.add(this, 'getShadow')
- return this.get('shadow', null, !0)
- },
- setClickable: function (a) {
- g.c.add(this, 'setClickable')
- a !== this.get('clickable', null, !0) && this.set('clickable', a)
- },
- getClickable: function () {
- g.c.add(this, 'getClickable')
- return this.get('clickable', null, !0)
- },
- setTitle: function (a, b) {
- g.c.add(this, 'setTitle')
- 'string' === typeof a && this.set('title', a, b)
- },
- getTitle: function () {
- g.c.add(this, 'getTitle')
- return this.get('title', null, !0)
- },
- setLabel: function (a) {
- g.c.add(this, 'setLabel')
- a && !g.a.uh(a) && (a = g.extend({}, this.get('label'), a))
- this.set('label', a)
- },
- getLabel: function () {
- g.c.add(this, 'getLabel')
- return this.get('label', null, !0)
- },
- setTop: function (a, b) {
- g.c.add(this, 'setTop')
- this.set('isTop', a, b)
- },
- getTop: function () {
- g.c.add(this, 'getTop')
- return this.get('isTop', null, !0)
- },
- setShape: function (a, b) {
- g.c.add(this, 'setShape')
- this.set('shape', a, b)
- },
- getShape: function () {
- g.c.add(this, 'getShape')
- return this.get('shape', null, !0)
- },
- setAnimation: function (a, b) {
- g.c.add(this, 'setAnimation')
- this.set('animation', a, b)
- },
- getAnimation: function () {
- g.c.add(this, 'getAnimation')
- return this.get('animation', null, !0)
- },
- getMap: function () {
- g.c.add(this, 'getMap')
- return this.get('map', null, !0)
- },
- markOnAMAP: function (a) {
- g.c.add(this, 'markOnAMAP')
- a = a || {}
- var b = {}
- b.name = a.name || this.get('name', null, !0) || ''
- a = this.Ka(a.position) || this.get('position', null, !0)
- b.y = a.Q
- b.x = a.R
- g.$h.mt(g.$h.era(b))
- },
- })
- z.B.Iaa = z.B.Eh.extend({
- Taa: Math.pow(2, 31),
- w: { position: null, zooms: [3, 20], opacity: 1, visible: !0, zIndex: 1, rank: 1, extData: null },
- A: function (a) {
- a = a || {}
- this.CLASS_NAME = this.CLASS_NAME || 'AMap.LabelMarker'
- g.c.ya(this, a)
- arguments.callee.ma.apply(this, arguments)
- this._LabelMarkerId = g.a.yb(this)
- g.a.ub(this, a)
- this.jf(this.w, !0)
- this.r3 = []
- },
- vn: function (a, b) {
- for (var c = b._LabelMarkerId || null, d = 0, e = a.length; d < e; d++) if (a[d].data.id === c) return d
- return -1
- },
- Q8: function () {
- var a = this.r3 || []
- if (a.length) {
- for (var b = 0, c = a.length; b < c; b++) this.on.apply(this, a[b])
- this.r3 = []
- }
- },
- hJ: function () {
- var a = this.g
- if (!a) return null
- var a = a.Xf || [],
- b = this.vn(a, this)
- return -1 !== b ? a[b] : null
- },
- getName: function () {
- g.c.add(this, 'getName')
- return this.w.name
- },
- setName: function (a) {
- g.c.add(this, 'setName')
- this.w.name = a
- var b = this.hJ()
- b && (b.opts.title = a)
- },
- getBounds: function () {
- g.c.add(this, 'getBounds')
- var a = this.get('position', null, !0)
- try {
- return 'string' === typeof a ? (a = new g.U(a.split(','))) : '[object Array]' == Object.prototype.toString.apply(a) && (a = new g.U(a[0], a[1])), new g.oe(a, a.cb())
- } catch (b) {
- return null
- }
- },
- getPosition: function () {
- g.c.add(this, 'getPosition')
- var a = this.g.Xf,
- b = this.vn(a, this)
- return -1 !== b ? a[b].data.position : null
- },
- setPosition: function (a) {
- g.c.add(this, 'setPosition')
- this.w.position = a
- var b = this.g
- if (b) {
- var c = b.Xf,
- d = this.vn(c, this)
- ;-1 !== d && ((c[d].data.position = a), b.Ho())
- }
- },
- getZooms: function () {
- g.c.add(this, 'getZooms')
- var a = this.g.Xf,
- b = this.vn(a, this)
- return -1 !== b ? a[b].opts.zooms : null
- },
- setZooms: function (a) {
- g.c.add(this, 'setZooms')
- this.w.zooms = a
- var b = this.g
- if (b) {
- var c = b.Xf || [],
- d = this.vn(c, this)
- ;-1 !== d && ((c[d].opts.zooms = a), b.Ho())
- }
- },
- getOpacity: function () {
- g.c.add(this, 'getOpacity')
- var a = this.g.Xf,
- b = this.vn(a, this)
- return -1 !== b ? a[b].opts.opacity : null
- },
- setOpacity: function (a) {
- g.c.add(this, 'setOpacity')
- this.w.opacity = a
- var b = this.g
- if (b) {
- var c = b.Xf,
- d = this.vn(c, this)
- ;-1 !== d && ((c[d].opts.opacity = a), b.Ho())
- }
- },
- getzIndex: function () {
- g.c.add(this, 'getzIndex')
- if (this.hJ()) return this.w.zIndex
- },
- setzIndex: function (a) {
- g.c.add(this, 'setzIndex')
- this.w.zIndex = a
- var b = this.hJ()
- b && ((b.opts.zIndex = a), this.g.Ho())
- },
- getRank: function () {
- g.c.add(this, 'getRank')
- return this.w.rank
- },
- setRank: function (a) {
- g.c.add(this, 'setZIndex')
- var b = this.hJ()
- this.w.rank = a
- b && ((b.data.rank = a), this.g.Ho())
- },
- getIcon: function () {
- g.c.add(this, 'getIcon')
- return this.w.icon
- },
- setIcon: function (a) {
- g.c.add(this, 'setIcon')
- this.w.icon = this.w.icon ? g.extend({}, this.w.icon, a) : a
- var b = this.g
- if (b) {
- var b = b.Xf,
- c = this.vn(b, this)
- if (-1 !== c) {
- var d = a.size,
- e = a.clipSize
- d && (a.size = this.g.wG(d))
- e && (a.clipSize = this.g.wG(e))
- b[c].opts.icon = g.extend({}, b[c].opts.icon, a)
- this.g.Ho()
- }
- }
- },
- getText: function () {
- g.c.add(this, 'getText')
- return this.w.text
- },
- setText: function (a) {
- g.c.add(this, 'setText')
- this.w.text = this.w.text ? g.extend({}, this.w.text, a) : a
- var b = this.g
- if (b) {
- var b = b.Xf,
- c = this.vn(b, this)
- ;-1 !== c &&
- ((b[c].data.txt = void 0 == a.content ? b[c].data.txt : a.content),
- (b[c].opts.text = g.extend({}, b[c].opts.text, a)),
- a.style && (b[c].opts.text.style = g.extend({}, b[c].opts.text.style, a.style)),
- this.g.Ho())
- }
- },
- setTop: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : !0
- g.c.add(this, 'setTop')
- this.g && this.g.IU(this, a)
- a ? ((this.yca = this.w.zIndex), this.setzIndex(this.Taa)) : this.setzIndex(this.yca || this.w.zIndex)
- },
- getVisible: function () {
- g.c.add(this, 'getVisible')
- var a = this.w.visible
- this.g && a && (a = !this.g.wR(this._LabelMarkerId))
- return a
- },
- getExtData: function () {
- g.c.add(this, 'getExtData')
- return this.w.extData
- },
- setExtData: function (a) {
- g.c.add(this, 'setExtData')
- this.w.extData = a
- },
- getOptions: function () {
- return this.w
- },
- show: function () {
- g.c.add(this, 'show')
- this.w.visible = !0
- this.g && this.g.add(this)
- return this
- },
- hide: function () {
- g.c.add(this, 'hide')
- this.w.visible = !1
- this.g && this.g.remove(this)
- return this
- },
- })
- z.B.Tn = z.B.Eh.extend({
- w: { visible: !1, items: [] },
- A: function (a) {
- this.CLASS_NAME = 'AMap.ContextMenu'
- g.c.ya(this, a)
- this.$g = !0
- g.a.ub(this, a)
- this.w.items = []
- this.jf(this.w)
- },
- addItem: function (a, b, c) {
- g.c.add(this, 'addItem')
- this.get('items').push({ Qn: a, xb: b, jK: c })
- this.q('items')
- },
- removeItem: function (a, b) {
- g.c.add(this, 'removeItem')
- var c = this.get('items'),
- d,
- e
- for (e = 0; e < c.length; e += 1)
- if (((d = c[e]), d.Qn === a && d.xb === b)) {
- c.splice(e, 1)
- break
- }
- this.q('items')
- },
- open: function (a, b) {
- g.c.add(this, 'open')
- this.C = !0
- b = g.a.Ka(b)
- this.set('position', b)
- this.map ? this.map && this.map !== a && (this.map.Jz(this), (this.map = a), this.setMap(a)) : ((this.map = a), this.setMap(a))
- this.q('open', { type: 'open', target: this })
- this.C = !1
- },
- close: function () {
- g.c.add(this, 'close')
- this.C = !0
- this.setMap(null)
- this.map && ((this.map = this.map.ry = null), this.q('close', { type: 'close', target: this }))
- this.C = !1
- },
- })
- z.B.Ye = z.B.Eh.extend({
- w: { visible: !0, offset: new g.H(0, 0), showShadow: !1, closeWhenClickMap: !1, retainWhenClose: !0, autoMove: !0, altitude: 0, anchor: 'bottom-center' },
- A: function (a) {
- this.CLASS_NAME = this.CLASS_NAME || 'AMap.InfoWindow'
- g.c.ya(this, a)
- a = a || {}
- this.$g = !0
- a && a.size && (a.size = g.a.Lq(a.size))
- g.a.ub(this, a)
- this.jf(this.w)
- a.position && this.set('position', g.a.Ka(a.position), !0)
- a.height && this.set('altitude', this.cR(a.height), !0)
- },
- open: function (a, b, c) {
- g.c.add(this, 'open')
- b = g.a.Ka(b)
- if (a && !this.hL && (b = b || this.get('position', null, !0))) {
- this.q('change', { type: 'change', target: this })
- c = this.cR(c) || this.get('altitude')
- var d = this.get('map', null, !0)
- d && d === a
- ? (this.set('altitude', c, !0), this.set('position', b))
- : ((this.map = a), a.rm && a.rm.close(), this.set('position', b, !0), this.set('altitude', c, !0), (this.C = !0), this.setMap(a), (this.C = !1))
- this.q('open', { type: 'open', target: this })
- }
- },
- close: function () {
- g.c.add(this, 'close')
- this.B && this.B.map && ((this.C = !0), this.setMap(null), (this.map = null), this.q('change', { type: 'change', target: this }), (this.C = !1))
- },
- getAnchor: function () {
- g.c.add(this, 'getAnchor')
- return this.get('anchor', null, !0)
- },
- setAnchor: function (a) {
- g.c.add(this, 'setAnchor')
- this.set('anchor', a)
- this.q('change', { type: 'change', target: this })
- },
- setContent: function (a) {
- g.c.add(this, 'setContent')
- this.set('content', a)
- this.q('change', { type: 'change', target: this })
- },
- getContentU: function () {
- g.c.add(this, 'getContentU')
- return this.get('content', null, !0)
- },
- getContentDom: function () {
- return this.get('contentDom', null, !0)
- },
- getContent: function () {
- g.c.add(this, 'getContent')
- return this.get('content', null, !0)
- },
- setPosition: function (a) {
- g.c.add(this, 'setPosition')
- a = g.a.Ka(a)
- this.set('position', a)
- this.q('change', { type: 'change', target: this })
- },
- setOffset: function (a) {
- g.c.add(this, 'setOffset')
- this.set('offset', a)
- this.q('change', { type: 'change', target: this })
- },
- getPosition: function () {
- g.c.add(this, 'getPosition')
- return this.get('position', null, !0)
- },
- setSize: function (a) {
- g.c.add(this, 'setSize')
- a = g.a.Lq(a)
- this.set('size', a)
- this.q('change', { type: 'change', target: this })
- },
- getSize: function (a) {
- g.c.add(this, 'getSize')
- var b = this.get('size', null, !0)
- if (b) return b
- if (this.B && !a) return new g.xd(this.B.ph.offsetWidth, this.B.ph.offsetHeight)
- },
- getIsOpen: function () {
- g.c.add(this, 'getIsOpen')
- return !!this.get('map')
- },
- })
- z.B.Zb = z.B.dM.extend({
- w: { isOutline: !1, outlineColor: '#000000', geodesic: !1, dirColor: 'white', showDir: !1, borderWeight: 1 },
- A: function (a) {
- this.CLASS_NAME = this.CLASS_NAME || 'AMap.Polyline'
- g.c.ya(this, a)
- this.C = !0
- z.B.Zb.bd.A.apply(this, arguments)
- this.$g = !0
- a = a || {}
- a.zIndex = 'number' === typeof a.zIndex ? a.zIndex : 50
- a.path && (a.path = this.Ka(a.path))
- g.a.ub(this, a)
- this.setOptions(this.w)
- this.C = !1
- },
- getLength: function () {
- g.c.add(this, 'getLength')
- for (var a = this.get('path'), b = 0, c = 0; c < a.length - 1; c += 1) b += a[c].Ge(a[c + 1])
- return parseFloat(b.toFixed(2))
- },
- getBounds: function () {
- var a = this.get('path')
- if (!a || !a.length) return null
- for (var b = new g.oe(180, 90, -180, -90), c = a.length - 1; 0 <= c; c -= 1) b.extend(a[c])
- return b
- },
- })
- ;(function (a) {
- function b(a, b, c, d) {
- if (1 <= a) return d
- var e = 1 - a
- return e * e * b + 2 * e * a * c + a * a * d
- }
- function c(a, b, c, d, e) {
- if (1 <= a) return e
- var f = 3 * (c[0] - b[0]),
- h = 3 * (d[0] - c[0]) - f,
- s = 3 * (c[1] - b[1])
- c = 3 * (d[1] - c[1]) - s
- return [(e[0] - b[0] - f - h) * Math.pow(a, 3) + h * Math.pow(a, 2) + f * a + b[0], (e[1] - b[1] - s - c) * Math.pow(a, 3) + c * Math.pow(a, 2) + s * a + b[1]]
- }
- function d(a, c, d, e) {
- return [b(a, c[0], d[0], e[0]), b(a, c[1], d[1], e[1])]
- }
- function e(b, c) {
- c = a.a.Ka(c)
- return b.MD(c, 20).wl()
- }
- function f(b, c) {
- a.a.isArray(c) && (c = new a.H(c[0], c[1]))
- return b.lE(c, 20)
- }
- function h(b, f, h, n, p, q) {
- var r = null
- if (b && h && h.length) {
- b = [b]
- b.push.apply(b, h)
- b.push(f)
- h = 0
- for (r = b.length; h < r; h++) b[h] = e(n, b[h])
- h = a.extend({ tolerance: 4, interpolateNumLimit: [3, 300] }, q)
- q = h.tolerance
- h = h.interpolateNumLimit
- q = Math.max(2, q)
- for (var s = (r = 0), u = 0, v = b.length; u < v - 1; u++) var w = b[u], t = b[u + 1], r = r + Math.abs(t[0] - w[0]), s = s + Math.abs(t[1] - w[1])
- a: {
- p = Math.min(h[1], Math.max(h[0], Math.round(Math.max(r, s) / p / q)))
- q = null
- switch (b.length) {
- case 3:
- q = d
- break
- case 4:
- q = c
- break
- default:
- r = null
- break a
- }
- h = []
- r = [0].concat(b)
- for (s = 1; s < p - 2; s++) (r[0] = s / p), h.push(q.apply(null, r))
- h.push(b[b.length - 1])
- r = h
- }
- }
- return r || [e(n, f)]
- }
- a.Kw = {
- LGa: d,
- rDa: c,
- EI: (function () {
- function a(b, c, d) {
- return (((1 - 3 * d + 3 * c) * b + (3 * d - 6 * c)) * b + 3 * c) * b
- }
- function b(a) {
- return a
- }
- var c = {},
- d = 'function' === typeof Float32Array
- return function (e, f, h, s) {
- function u(b) {
- if (0 === b) b = 0
- else if (1 === b) b = 1
- else {
- for (var c = 0, d = 1; 10 !== d && w[d] <= b; ++d) c += 0.1
- --d
- var d = c + ((b - w[d]) / (w[d + 1] - w[d])) * 0.1,
- l = 3 * (1 - 3 * h + 3 * e) * d * d + 2 * (3 * h - 6 * e) * d + 3 * e
- if (0.001 <= l) {
- for (c = 0; 4 > c; ++c) {
- l = 3 * (1 - 3 * h + 3 * e) * d * d + 2 * (3 * h - 6 * e) * d + 3 * e
- if (0 === l) break
- d -= (a(d, e, h) - b) / l
- }
- b = d
- } else if (0 === l) b = d
- else {
- var d = c,
- c = c + 0.1,
- m,
- n = 0
- do (m = d + (c - d) / 2), (l = a(m, e, h) - b), 0 < l ? (c = m) : (d = m)
- while (1e-7 < Math.abs(l) && 10 > ++n)
- b = m
- }
- b = a(b, f, s)
- }
- return b
- }
- if (!(0 <= e && 1 >= e && 0 <= h && 1 >= h)) throw Error('bezier x values must be in [0, 1] range')
- var v = arguments.toString()
- if (c[v]) return c[v]
- if (e === f && h === s) return b
- for (var w = d ? new Float32Array(11) : Array(11), t = 0; 11 > t; ++t) w[t] = a(0.1 * t, e, h)
- return (c[v] = u)
- }
- })(),
- h4: function (a, b, c, d) {
- var e,
- f,
- r = []
- e = 0
- for (f = a.length; e < f; e += 1) r.push.apply(r, h(a[e - 1], a[e], a[e].controlPoints, b, c, d))
- return r
- },
- Sqa: function (a, b, c, d) {
- a = this.h4(a, b, c, d)
- c = []
- d = 0
- for (var e = a.length; d < e; d++) c.push(f(b, a[d]))
- return c
- },
- }
- })(g)
- z.B.sA = z.B.Zb.extend({
- w: { tolerance: 4, interpolateNumLimit: [3, 300] },
- A: function (a) {
- this.CLASS_NAME = 'AMap.BezierCurve'
- g.c.ya(this, a)
- z.B.sA.bd.A.apply(this, arguments)
- },
- getLength: function () {
- g.c.add(this, 'getLength')
- this.get('map')
- this.C = !0
- var a = this.getInterpolateLngLats()
- this.C = !1
- return g.Ft.distanceOfLine(a)
- },
- getInterpolateLngLats: function () {
- g.c.add(this, 'getInterpolateLngLats')
- var a = this.get('map')
- return g.Kw.Sqa(this.get('path'), (a && a.mj) || g.Zh.IL, Math.pow(2, 2), this.w)
- },
- getSerializedPath: function () {
- g.c.add(this, 'getSerializedPath')
- for (var a = this.get('path', null, !0), b = [], c = 0, d = a.length; c < d; c++) {
- var e = a[c]
- if (e instanceof g.U) {
- var f = []
- if (e.controlPoints) for (var h = 0, k = e.controlPoints.length; h < k; h++) f.push(e.controlPoints[h].AR()), f.push(e.controlPoints[h].xR())
- f.push(e.AR())
- f.push(e.xR())
- b.push(f)
- } else b.push(e)
- }
- return b
- },
- Ka: function (a) {
- var b = typeof a[0]
- if (g.a.isArray(a) && 'object' === b) {
- for (b = 0; b < a.length; b += 1) a[b] = this.zja(a[b])
- return a
- }
- return [this.qGa(a)]
- },
- zja: function (a) {
- var b
- if (a instanceof g.U) b = a
- else {
- b = typeof a[0]
- var c,
- d,
- e = []
- if ('string' === b || 'number' === b) {
- d = a.length
- if (d % 2) throw Error("LngLat number should be even, now it's " + d)
- b = new g.U(a[d - 2], a[d - 1])
- c = 0
- for (d -= 2; c < d; c += 2) e.push(new g.U(a[c], a[c + 1]))
- } else if (g.a.isArray(a[0])) for (d = a.length, b = new g.U(a[d - 1][0], a[d - 1][1]), c = 0, d -= 1; c < d; c++) e.push(new g.U(a[c][0], a[c][1]))
- else throw Error("AMap.LngLat expected, now it's " + a)
- b && e.length && (b.controlPoints = g.a.Ka(e))
- }
- if (b.controlPoints && 2 < b.controlPoints.length) throw Error('Control Points Number should be 1 or 2 !')
- return b
- },
- })
- z.B.Dc = z.B.dM.extend({
- A: function (a) {
- this.CLASS_NAME = this.CLASS_NAME || 'AMap.Polygon'
- g.c.ya(this, a)
- this.C = !0
- z.B.Dc.bd.A.apply(this, arguments)
- this.$g = !0
- a = a || {}
- a.zIndex = 'number' === typeof a.zIndex ? a.zIndex : 10
- a.path && (a.path = this.Ka(a.path))
- g.a.ub(this, g.extend({ fillColor: '#FFAA00', fillOpacity: 0.9 }, a))
- this.setOptions(this.w)
- this.C = !1
- },
- w4: function (a) {
- var b = (6378137 * Math.PI) / 180,
- c = 0,
- d = a.length
- if (3 > d) return 0
- for (var e = 0; e < d - 1; e += 1)
- var f = a[e], h = a[e + 1], k = f.R * b * Math.cos((f.Q * Math.PI) / 180), f = f.Q * b, l = h.R * b * Math.cos((h.Q * Math.PI) / 180), c = c + (k * h.Q * b - l * f)
- e = a[e]
- a = a[0]
- d = e.R * b * Math.cos((e.Q * Math.PI) / 180)
- e = e.Q * b
- h = a.R * b * Math.cos((a.Q * Math.PI) / 180)
- c += d * a.Q * b - h * e
- return 0.5 * Math.abs(c)
- },
- bK: function (a) {
- return a.length ? (a[0] instanceof g.U ? [[a]] : a[0] instanceof Array && a[0][0] instanceof g.U ? [a] : a) : a
- },
- getArea: function () {
- g.c.add(this, 'getArea')
- for (var a = this.get('path', null, !0), a = this.bK(a), b = 0, c = 0, d = a.length; c < d; c += 1)
- for (var e = a[c], b = b + this.w4(e[0]), f = 1; f < e.length; f += 1) b -= this.w4(e[f])
- return Number(b.toFixed(2))
- },
- toString: function () {
- g.c.add(this, 'toString')
- for (var a = this.get('path'), a = this.bK(a), b = [], c = 0, d = a.length; c < d; c += 1) {
- for (var e = a[c], f = [], h = 0, k = e.length; h < k; h += 1) f.push(e[h].join(';'))
- b.push(f.join('|'))
- }
- return b.join('^')
- },
- getBounds: function () {
- var a = this.get('path')
- if (a && a.length) {
- for (var a = this.bK(a), b = new g.oe(180, 90, -180, -90), c = 0, d = a.length; c < d; c += 1) for (var e = a[c][0], f = e.length - 1; 0 <= f; f -= 1) b.extend(e[f])
- return b
- }
- return null
- },
- contains: function (a) {
- g.c.add(this, 'contains')
- a = g.a.Ka(a)
- var b = this.get('path'),
- b = this.bK(b)
- a = [a.R, a.Q]
- for (var c = 0, d = b.length; c < d; c += 1) {
- for (var e = b[c], f = !1, h = 0, k = e.length; h < k && ((f = this.dna(e[h])), g.wd.uq(f) || f.reverse(), (f = g.wd.Sd(a, f, 0 === h ? !0 : !1)), 0 < h && (f = !f), f); h += 1);
- if (f) return !0
- }
- return !1
- },
- dna: function (a) {
- for (var b = [], c = 0; c < a.length; c += 1) b.push([a[c].R, a[c].Q])
- return b
- },
- })
- z.B.gh = z.B.fd.extend({
- w: {
- visible: !0,
- zIndex: 10,
- strokeColor: '#006600',
- strokeOpacity: 0.9,
- strokeWeight: 3,
- strokeStyle: 'solid',
- strokeDasharray: [10, 5],
- radius: 1e3,
- fillColor: '#006600',
- fillOpacity: 0.9,
- unit: 'miter',
- },
- A: function (a) {
- this.CLASS_NAME = this.CLASS_NAME || 'AMap.Circle'
- g.c.ya(this, a)
- this.C = !0
- z.B.gh.bd.A.apply(this, arguments)
- a = a || {}
- a.center && (a.center = g.a.Ka(a.center))
- a.zIndex = 'number' === typeof a.zIndex ? a.zIndex : 10
- g.a.jk(a.radius, 'string') && ((a.radius = parseFloat(a.radius)), isNaN(a.radius) && delete a.radius)
- g.a.ub(this, a)
- this.$g = this.w.center ? !0 : !1
- this.setOptions(this.w)
- this.C = !1
- },
- setCenter: function (a, b) {
- g.c.add(this, 'setCenter')
- ;(a = g.a.Ka(a)) &&
- a instanceof g.U &&
- (this.B && this.B.get('deltaPos') && this.B.set('deltaPos', [0, 0], !0),
- this.set('center', a),
- this.q('change', { type: 'change', target: this }),
- this.$g || ((this.$g = !0), this.get('map') && this.get('map').q('overlays')),
- b || this.q('setCenter'))
- },
- getCenter: function () {
- g.c.add(this, 'getCenter')
- var a = this.get('center', null, !0)
- this.B && this.B.get('deltaPos') && (a = this.B.St([a], this.B.get('deltaPos'))[0])
- return a
- },
- reset: function () {
- var a = this.get('center', null, !0)
- this.B && this.B.get('deltaPos') && ((a = this.B.St([a], this.B.get('deltaPos'))[0]), this.B.set('deltaPos', [0, 0], !0))
- this.set('center', a)
- },
- setRadius: function (a, b) {
- g.c.add(this, 'setRadius')
- this.set('radius', a)
- this.q('change', { type: 'change', target: this })
- b || this.q('setRadius')
- },
- getPath: function (a) {
- g.c.add(this, 'getPath')
- a = a || 36
- for (var b = this.get('center', null, !0), c = this.get('radius', null, !0), d = [], e = 0; e < a; e += 1) {
- var f = ((Math.PI * e) / a) * 2,
- h = Math.cos(f) * c,
- f = Math.sin(f) * c
- d.push(b.offset(h, f))
- }
- return d
- },
- getRadius: function () {
- g.c.add(this, 'getRadius')
- return this.get('radius', null, !0)
- },
- getBounds: function () {
- var a = this.get('center'),
- b = this.get('radius')
- if (!a) return null
- var c = a.offset(-b, -b),
- a = a.offset(b, b)
- return new g.oe(c, a)
- },
- contains: function (a) {
- g.c.add(this, 'contains')
- return this.get('center').Ge(a) <= this.get('radius') ? !0 : !1
- },
- })
- z.B.VV = z.B.gh.extend({
- A: function (a) {
- this.CLASS_NAME = 'AMap.CircleMarker'
- g.c.ya(this, a)
- a = a || {}
- a.unit = 'px'
- void 0 === a.radius ? (a.radius = 20) : g.a.jk(a.radius, 'string') && ((a.radius = parseFloat(a.radius)), isNaN(a.radius) && (a.radius = 20))
- z.B.VV.bd.A.apply(this, arguments)
- },
- getBounds: function () {
- this.C = !0
- var a = this.getCenter()
- this.C = !1
- return new g.oe(a, a.cb())
- },
- contains: function (a) {
- g.c.add(this, 'contains')
- this.C = !0
- var b = this.getMap()
- this.C = !1
- if (!b) return !1
- var c = this.get('center')
- b.C = !0
- var d = !1
- c.Ge(a) <= this.get('radius') * b.getResolution(c) && (d = !0)
- b.C = !1
- return d
- },
- })
- var sc = g.da.extend({
- A: function (a) {
- var b = Array(3),
- c
- c = a instanceof Array ? a : a instanceof g.Fl || a instanceof g.Pa ? a.elements : arguments
- b[0] = c[0] || 0
- b[1] = c[1] || 0
- b[2] = c[2] || 0
- this.elements = b
- },
- length: function () {
- return Math.sqrt(this.k6())
- },
- k6: function () {
- var a = this.elements
- return a[0] * a[0] + a[1] * a[1] + a[2] * a[2]
- },
- normalize: function () {
- var a = this.elements,
- b = a[0],
- c = a[1],
- d = a[2],
- e = Math.sqrt(b * b + c * c + d * d)
- if (e) {
- if (1 === e) return this
- } else return (a[0] = 0), (a[1] = 0), (a[2] = 0), this
- e = 1 / e
- a[0] = b * e
- a[1] = c * e
- a[2] = d * e
- return this
- },
- cb: function () {
- return new g.Pa(this)
- },
- copy: function (a) {
- var b = this.elements
- a = a.elements
- b[0] = a[0]
- b[1] = a[1]
- b[2] = a[2]
- return this
- },
- set: function (a, b, c) {
- var d = this.elements
- d[0] = a
- d[1] = b
- d[2] = c
- },
- gb: function (a) {
- var b = this.elements
- a = a.elements
- return b[0] === a[0] && b[1] === a[1] && b[2] === a[2]
- },
- Kn: function (a) {
- var b = this.elements
- b[0] *= a
- b[1] *= a
- b[2] *= a
- return this
- },
- add: function (a) {
- var b = this.elements
- a = a.elements
- b[0] += a[0]
- b[1] += a[1]
- b[2] += a[2]
- return this
- },
- $la: function (a, b) {
- var c = a.elements,
- d = b.elements,
- e = this.elements
- e[0] = c[0] + d[0]
- e[1] = c[1] + d[1]
- e[2] = c[2] + d[2]
- return this
- },
- sub: function (a) {
- a = a.elements
- var b = this.elements
- b[0] -= a[0]
- b[1] -= a[1]
- b[2] -= a[2]
- return this
- },
- Vz: function (a, b) {
- var c = a.elements,
- d = b.elements,
- e = this.elements
- e[0] = c[0] - d[0]
- e[1] = c[1] - d[1]
- e[2] = c[2] - d[2]
- return this
- },
- hs: function (a) {
- a = a.elements
- var b = this.elements
- b[0] = b[1] * a[2] - b[2] * a[1]
- b[1] = b[2] * a[0] - b[0] * a[2]
- b[2] = b[0] * a[1] - b[1] * a[0]
- return this
- },
- wy: function (a, b) {
- var c = a.elements,
- d = b.elements,
- e = this.elements
- e[0] = c[1] * d[2] - c[2] * d[1]
- e[1] = c[2] * d[0] - c[0] * d[2]
- e[2] = c[0] * d[1] - c[1] * d[0]
- return this
- },
- Lf: function (a) {
- a = a.elements
- var b = this.elements
- return b[0] * a[0] + b[1] * a[1] + b[2] * a[2]
- },
- Ge: function (a) {
- return Math.sqrt(this.d3(a))
- },
- d3: function (a) {
- var b = a.elements,
- c = this.elements
- a = c[0] - b[0]
- var d = c[1] - b[1],
- b = c[2] - b[2]
- return a * a + d * d + b * b
- },
- sf: function (a) {
- var b = this.elements[0],
- c = this.elements[1],
- d = this.elements[2]
- a = a.elements
- var e = 1 / (a[3] * b + a[7] * c + a[11] * d + a[15])
- this.elements[0] = (a[0] * b + a[4] * c + a[8] * d + a[12]) * e
- this.elements[1] = (a[1] * b + a[5] * c + a[9] * d + a[13]) * e
- this.elements[2] = (a[2] * b + a[6] * c + a[10] * d + a[14]) * e
- return this
- },
- })
- g.Pa = sc
- g.Pa.Xb({ Lf: 'dot', cb: 'clone', add: 'add', sub: 'sub', $la: 'addVectors', Vz: 'subVectors', wy: 'crossVectors', normalize: 'normalize', length: 'length' })
- var vc = g.da.extend({
- A: function (a) {
- var b = Array(4),
- c
- c = a instanceof Array ? a : arguments
- b[0] = c[0]
- b[1] = c[1]
- b[2] = c[2]
- b[3] = c[3] || 1
- this.elements = b
- },
- copy: function (a) {
- var b = this.elements
- a = a.elements
- b[0] = a[0]
- b[1] = a[1]
- b[2] = a[2]
- b[3] = void 0 !== a[3] ? a[3] : 1
- return this
- },
- multiply: function (a) {
- var b = this.elements
- b[0] *= a
- b[1] *= a
- b[2] *= a
- b[3] *= a
- },
- sf: function (a) {
- var b = this.elements[0],
- c = this.elements[1],
- d = this.elements[2],
- e = this.elements[3]
- a = a.elements
- this.elements[0] = a[0] * b + a[4] * c + a[8] * d + a[12] * e
- this.elements[1] = a[1] * b + a[5] * c + a[9] * d + a[13] * e
- this.elements[2] = a[2] * b + a[6] * c + a[10] * d + a[14] * e
- this.elements[3] = a[3] * b + a[7] * c + a[11] * d + a[15] * e
- return this
- },
- })
- g.Fl = vc
- function wc(a, b) {
- this.vz = void 0 !== a ? a : new g.Pa(1, 0, 0)
- this.KC = void 0 !== b ? b : 0
- }
- g.Vw = wc
- wc.prototype = {
- set: function (a, b) {
- this.vz.copy(a)
- this.KC = b
- return this
- },
- normalize: function () {
- var a = 1 / this.vz.length()
- this.vz.Kn(a)
- this.KC *= a
- return this
- },
- xI: function (a) {
- return this.vz.Lf(a) + this.KC
- },
- }
- function xc(a, b, c, d, e) {
- a.vz.set(b, c, d)
- a.KC = e
- return a
- }
- function yc(a, b, c, d, e, f) {
- this.iE = [
- void 0 !== a ? a : new g.Vw(),
- void 0 !== b ? b : new g.Vw(),
- void 0 !== c ? c : new g.Vw(),
- void 0 !== d ? d : new g.Vw(),
- void 0 !== e ? e : new g.Vw(),
- void 0 !== f ? f : new g.Vw(),
- ]
- }
- g.eW = yc
- yc.prototype = {
- set: function (a, b, c, d, e, f) {
- var h = this.iE
- h[0].copy(a)
- h[1].copy(b)
- h[2].copy(c)
- h[3].copy(d)
- h[4].copy(e)
- h[5].copy(f)
- return this
- },
- cb: function () {
- return new g.eW().copy(this)
- },
- copy: function (a) {
- for (var b = this.iE, c = 0; 6 > c; c++) b[c].copy(a.iE[c])
- return this
- },
- yJ: (function () {
- var a = new g.Pa(),
- b = new g.Pa(),
- c = a.elements,
- d = b.elements
- return function (e) {
- var f = this.iE,
- h = e.max.elements
- e = e.min.elements
- for (var k = 0; 6 > k; k++) {
- var l = f[k],
- m = l.vz.elements
- c[0] = 0 < m[0] ? e[0] : h[0]
- d[0] = 0 < m[0] ? h[0] : e[0]
- c[1] = 0 < m[1] ? e[1] : h[1]
- d[1] = 0 < m[1] ? h[1] : e[1]
- c[2] = 0 < m[2] ? e[2] : h[2]
- d[2] = 0 < m[2] ? h[2] : e[2]
- m = l.xI(a)
- l = l.xI(b)
- if (0 > m && 0 > l) return !1
- }
- return !0
- }
- })(),
- }
- ;(function (a) {
- function b(a) {
- this.elements = a || [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
- }
- a.cM = function (a) {
- this.elements = [a.elements[0], a.elements[1], a.elements[2], a.elements[4], a.elements[5], a.elements[6], a.elements[8], a.elements[9], a.elements[10]]
- }
- b.prototype.CU = function () {
- var a = this.elements
- a[0] = 1
- a[4] = 0
- a[8] = 0
- a[12] = 0
- a[1] = 0
- a[5] = 1
- a[9] = 0
- a[13] = 0
- a[2] = 0
- a[6] = 0
- a[10] = 1
- a[14] = 0
- a[3] = 0
- a[7] = 0
- a[11] = 0
- a[15] = 1
- }
- b.prototype.set = function (a) {
- if (a.elements !== this.elements) return (this.elements = a.elements.slice(0)), this
- }
- b.prototype.toFixed = function (b) {
- for (var d = this.elements, e = 0; 16 > e; ++e) 0 !== d[e] && (d[e] = a.a.wb(d[e], b))
- return this
- }
- b.prototype.concat = function (a) {
- var b, e, f, h, k, l, m
- e = b = this.elements
- f = a.elements
- if (b === f) for (f = Array(16), a = 0; 16 > a; ++a) f[a] = b[a]
- for (a = 0; 4 > a; a++)
- (h = e[a]),
- (k = e[a + 4]),
- (l = e[a + 8]),
- (m = e[a + 12]),
- (b[a] = h * f[0] + k * f[1] + l * f[2] + m * f[3]),
- (b[a + 4] = h * f[4] + k * f[5] + l * f[6] + m * f[7]),
- (b[a + 8] = h * f[8] + k * f[9] + l * f[10] + m * f[11]),
- (b[a + 12] = h * f[12] + k * f[13] + l * f[14] + m * f[15])
- return this
- }
- b.multiply = function (b, d) {
- var e = Array(16),
- f,
- h,
- k,
- l,
- m,
- n,
- p
- k = h = b.elements
- l = d.elements
- if (h === l) for (f = 0; 16 > f; ++f) e[f] = h[f]
- for (f = 0; 4 > f; f++)
- (h = k[f]),
- (m = k[f + 4]),
- (n = k[f + 8]),
- (p = k[f + 12]),
- (e[f] = h * l[0] + m * l[1] + n * l[2] + p * l[3]),
- (e[f + 4] = h * l[4] + m * l[5] + n * l[6] + p * l[7]),
- (e[f + 8] = h * l[8] + m * l[9] + n * l[10] + p * l[11]),
- (e[f + 12] = h * l[12] + m * l[13] + n * l[14] + p * l[15])
- return new a.Cc(e)
- }
- b.prototype.multiply = b.prototype.concat
- b.prototype.Ah = function (b) {
- var d = this.elements
- b = b.elements
- var e = new a.Fl(),
- f = e.elements
- f[0] = b[0] * d[0] + b[1] * d[4] + b[2] * d[8] + b[3] * d[12]
- f[1] = b[0] * d[1] + b[1] * d[5] + b[2] * d[9] + b[3] * d[13]
- f[2] = b[0] * d[2] + b[1] * d[6] + b[2] * d[10] + b[3] * d[14]
- f[3] = b[0] * d[3] + b[1] * d[7] + b[2] * d[11] + b[3] * d[15]
- return e
- }
- b.prototype.cA = function () {
- var a, b
- a = this.elements
- b = a[1]
- a[1] = a[4]
- a[4] = b
- b = a[2]
- a[2] = a[8]
- a[8] = b
- b = a[3]
- a[3] = a[12]
- a[12] = b
- b = a[6]
- a[6] = a[9]
- a[9] = b
- b = a[7]
- a[7] = a[13]
- a[13] = b
- b = a[11]
- a[11] = a[14]
- a[14] = b
- return this
- }
- b.prototype.Axa = function (a) {
- var b, e, f
- b = a.elements
- a = this.elements
- e = []
- e[0] = b[5] * (b[10] * b[15] - b[11] * b[14]) - b[9] * (b[6] * b[15] + b[7] * b[14]) + b[13] * (b[6] * b[11] - b[7] * b[10])
- e[4] = -b[4] * (b[10] * b[15] - b[11] * b[14]) + b[8] * (b[6] * b[15] - b[7] * b[14]) - b[12] * (b[6] * b[11] - b[7] * b[10])
- e[8] = b[4] * (b[9] * b[15] - b[11] * b[13]) - b[8] * (b[5] * b[15] - b[7] * b[13]) + b[12] * (b[5] * b[11] - b[7] * b[9])
- e[12] = -b[4] * (b[9] * b[14] - b[10] * b[13]) + b[8] * (b[5] * b[14] - b[6] * b[13]) - b[12] * (b[5] * b[10] - b[6] * b[9])
- e[1] = -b[1] * (b[10] * b[15] - b[11] * b[14]) + b[9] * (b[2] * b[15] - b[3] * b[14]) - b[13] * (b[2] * b[11] - b[3] * b[10])
- e[5] = b[0] * (b[10] * b[15] - b[11] * b[14]) - b[8] * (b[2] * b[15] - b[3] * b[14]) + b[12] * (b[2] * b[11] - b[3] * b[10])
- e[9] = -b[0] * (b[9] * b[15] - b[11] * b[13]) + b[8] * (b[1] * b[15] - b[3] * b[13]) - b[12] * (b[1] * b[11] - b[3] * b[9])
- e[13] = b[0] * (b[9] * b[14] - b[10] * b[13]) - b[8] * (b[1] * b[14] - b[2] * b[13]) + b[12] * (b[1] * b[10] - b[2] * b[9])
- e[2] = b[1] * (b[6] * b[15] - b[7] * b[14]) - b[5] * (b[2] * b[15] - b[3] * b[14]) + b[13] * (b[2] * b[7] - b[3] * b[6])
- e[6] = -b[0] * (b[6] * b[15] - b[7] * b[14]) + b[4] * (b[2] * b[15] - b[3] * b[14]) - b[12] * (b[2] * b[7] - b[3] * b[6])
- e[10] = b[0] * (b[5] * b[15] - b[7] * b[13]) - b[4] * (b[1] * b[15] - b[3] * b[13]) + b[12] * (b[1] * b[7] - b[3] * b[5])
- e[14] = -b[0] * (b[5] * b[14] - b[6] * b[13]) + b[4] * (b[1] * b[14] - b[2] * b[13]) - b[12] * (b[1] * b[6] - b[2] * b[5])
- e[3] = -b[1] * (b[6] * b[11] - b[7] * b[10]) + b[5] * (b[2] * b[11] - b[3] * b[10]) - b[9] * (b[2] * b[7] - b[3] * b[6])
- e[7] = b[0] * (b[6] * b[11] - b[7] * b[10]) - b[4] * (b[2] * b[11] + b[3] * b[10]) + b[8] * (b[2] * b[7] - b[3] * b[6])
- e[11] = -b[0] * (b[5] * b[11] + b[7] * b[9]) + b[4] * (b[1] * b[11] - b[3] * b[9]) - b[8] * (b[1] * b[7] + b[3] * b[5])
- e[15] = b[0] * (b[5] * b[10] - b[6] * b[9]) - b[4] * (b[1] * b[10] + b[2] * b[9]) + b[8] * (b[1] * b[6] - b[2] * b[5])
- f = b[0] * e[0] + b[1] * e[4] + b[2] * e[8] + b[3] * e[12]
- if (0 === f) return this
- f = 1 / f
- for (b = 0; 16 > b; b++) a[b] = e[b] * f
- return this
- }
- b.prototype.Dg = function () {
- return new b().Axa(this)
- }
- b.prototype.FU = function (a, b, e, f, h, k) {
- var l, m, n, p
- if (a === b || e === f || h === k) throw 'null frustum'
- m = 1 / (b - a)
- n = 1 / (f - e)
- p = 1 / (k - h)
- l = this.elements
- l[0] = 2 * m
- l[1] = 0
- l[2] = 0
- l[3] = 0
- l[4] = 0
- l[5] = 2 * n
- l[6] = 0
- l[7] = 0
- l[8] = 0
- l[9] = 0
- l[10] = -2 * p
- l[11] = 0
- l[12] = -(b + a) * m
- l[13] = -(f + e) * n
- l[14] = -(k + h) * p
- l[15] = 1
- return this
- }
- b.prototype.hva = function (a, d, e, f, h, k) {
- return this.concat(new b().FU(a, d, e, f, h, k))
- }
- b.prototype.yxa = function (a, b, e, f, h, k) {
- var l, m, n, p
- if (a === b || f === e || h === k) throw 'null frustum'
- if (0 >= h) throw 'near <= 0'
- if (0 >= k) throw 'far <= 0'
- m = 1 / (b - a)
- n = 1 / (f - e)
- p = 1 / (k - h)
- l = this.elements
- l[0] = 2 * h * m
- l[1] = 0
- l[2] = 0
- l[3] = 0
- l[4] = 0
- l[5] = 2 * h * n
- l[6] = 0
- l[7] = 0
- l[8] = (b + a) * m
- l[9] = (f + e) * n
- l[10] = -(k + h) * p
- l[11] = -1
- l[12] = 0
- l[13] = 0
- l[14] = -2 * h * k * p
- l[15] = 0
- return this
- }
- b.prototype.mR = function (a, d, e, f, h, k) {
- return this.concat(new b().yxa(a, d, e, f, h, k))
- }
- b.prototype.Z8 = function (a, b, e, f) {
- var h, k
- if (e === f || 0 === b) throw 'null frustum'
- if (0 >= e) throw 'near <= 0'
- if (0 >= f) throw 'far <= 0'
- a /= 2
- k = Math.sin(a)
- if (0 === k) throw 'null frustum'
- h = 1 / (f - e)
- k = Math.cos(a) / k
- a = this.elements
- a[0] = k / b
- a[1] = 0
- a[2] = 0
- a[3] = 0
- a[4] = 0
- a[5] = k
- a[6] = 0
- a[7] = 0
- a[8] = 0
- a[9] = 0
- a[10] = -(f + e) * h
- a[11] = -1
- a[12] = 0
- a[13] = 0
- a[14] = -2 * e * f * h
- a[15] = 0
- return this
- }
- b.prototype.perspective = function (a, d, e, f) {
- return this.concat(new b().Z8(a, d, e, f))
- }
- b.prototype.bw = function (a, b, e) {
- var f = this.elements
- f[0] = a
- f[4] = 0
- f[8] = 0
- f[12] = 0
- f[1] = 0
- f[5] = b
- f[9] = 0
- f[13] = 0
- f[2] = 0
- f[6] = 0
- f[10] = e
- f[14] = 0
- f[3] = 0
- f[7] = 0
- f[11] = 0
- f[15] = 1
- return this
- }
- b.prototype.scale = function (a, b, e) {
- var f = this.elements
- f[0] *= a
- f[4] *= b
- f[8] *= e
- f[1] *= a
- f[5] *= b
- f[9] *= e
- f[2] *= a
- f[6] *= b
- f[10] *= e
- f[3] *= a
- f[7] *= b
- f[11] *= e
- return this
- }
- b.prototype.c9 = function (a, b, e) {
- var f = this.elements
- f[12] = a
- f[13] = b
- f[14] = e
- return this
- }
- b.prototype.translate = function (a, b, e) {
- var f = this.elements
- f[12] += f[0] * a + f[4] * b + f[8] * e
- f[13] += f[1] * a + f[5] * b + f[9] * e
- f[14] += f[2] * a + f[6] * b + f[10] * e
- f[15] += f[3] * a + f[7] * b + f[11] * e
- return this
- }
- b.prototype.Rz = function (a, b, e, f) {
- var h, k, l, m, n, p, q, r
- a = (Math.PI * a) / 180
- h = this.elements
- k = Math.sin(a)
- a = Math.cos(a)
- 0 !== b && 0 === e && 0 === f
- ? (0 > b && (k = -k),
- (h[0] = 1),
- (h[4] = 0),
- (h[8] = 0),
- (h[12] = 0),
- (h[1] = 0),
- (h[5] = a),
- (h[9] = -k),
- (h[13] = 0),
- (h[2] = 0),
- (h[6] = k),
- (h[10] = a),
- (h[14] = 0),
- (h[3] = 0),
- (h[7] = 0),
- (h[11] = 0))
- : 0 === b && 0 !== e && 0 === f
- ? (0 > e && (k = -k),
- (h[0] = a),
- (h[4] = 0),
- (h[8] = k),
- (h[12] = 0),
- (h[1] = 0),
- (h[5] = 1),
- (h[9] = 0),
- (h[13] = 0),
- (h[2] = -k),
- (h[6] = 0),
- (h[10] = a),
- (h[14] = 0),
- (h[3] = 0),
- (h[7] = 0),
- (h[11] = 0))
- : 0 === b && 0 === e && 0 !== f
- ? (0 > f && (k = -k),
- (h[0] = a),
- (h[4] = -k),
- (h[8] = 0),
- (h[12] = 0),
- (h[1] = k),
- (h[5] = a),
- (h[9] = 0),
- (h[13] = 0),
- (h[2] = 0),
- (h[6] = 0),
- (h[10] = 1),
- (h[14] = 0),
- (h[3] = 0),
- (h[7] = 0),
- (h[11] = 0))
- : ((l = Math.sqrt(b * b + e * e + f * f)),
- 1 !== l && ((l = 1 / l), (b *= l), (e *= l), (f *= l)),
- (l = 1 - a),
- (m = b * e),
- (n = e * f),
- (p = f * b),
- (q = b * k),
- (r = e * k),
- (k *= f),
- (h[0] = b * b * l + a),
- (h[1] = m * l + k),
- (h[2] = p * l - r),
- (h[3] = 0),
- (h[4] = m * l - k),
- (h[5] = e * e * l + a),
- (h[6] = n * l + q),
- (h[7] = 0),
- (h[8] = p * l + r),
- (h[9] = n * l - q),
- (h[10] = f * f * l + a),
- (h[11] = 0),
- (h[12] = 0),
- (h[13] = 0),
- (h[14] = 0))
- h[15] = 1
- return this
- }
- b.prototype.rotate = function (a, d, e, f) {
- return this.concat(new b().Rz(a, d, e, f))
- }
- b.prototype.dt = function (a) {
- return this.rotate(a, 1, 0, 0)
- }
- b.prototype.et = function (a) {
- return this.rotate(a, 0, 1, 0)
- }
- b.prototype.ft = function (a) {
- return this.rotate(a, 0, 0, 1)
- }
- b.prototype.Yu = function (a) {
- for (var b = 0, e = this.elements.length; b < e; b++) if (this.elements[b] !== a.elements[b]) return !1
- return !0
- }
- b.prototype.cb = function () {
- return new b(this.elements.slice(0))
- }
- a.Cc = b
- })(g)
- z.B.Et = z.B.Dc.extend({
- w: {
- visible: !0,
- zIndex: 10,
- strokeColor: '#006600',
- strokeOpacity: 0.9,
- strokeWeight: 3,
- strokeStyle: 'solid',
- strokeDasharray: [10, 5],
- radius: [1e3, 1e3],
- fillColor: '#006600',
- fillOpacity: 0.9,
- },
- A: function () {
- var a = this,
- b = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}
- this.CLASS_NAME = 'AMap.Ellipse'
- g.c.ya(this, b)
- var b = g.extend({}, this.w, b),
- c = this.Ur(b)
- b.path = c
- z.B.Et.bd.A.call(this, b)
- this.set('path', c)
- ;(this.get('center') && this.get('map')) || (this.$g = !1)
- this.on('movepoly', function (b) {
- var c = a.get('map')
- b = c.Od(c.Bb(a.get('center')).add(b.qK))
- '3D' === c.view.type && a.set('deltaPos', [0, 0], !0)
- a.set('center', b)
- })
- },
- Ur: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {},
- b = [],
- c = a.center || this.get('center'),
- d = a.map || this.get('map')
- if (c && d)
- for (
- var c = g.a.Ka(c),
- e = a.radius || this.get('radius'),
- f = d.Bb(c),
- a = f.x,
- f = f.y,
- h = g.a.map(e, function (a) {
- return a / d.getResolution(c, 20)
- }),
- e = h[0],
- h = h[1],
- k = g.l.ba,
- l = ((k ? 4 : 1) * Math.PI) / 180,
- m = 0,
- k = k ? 89 : 359;
- m <= k;
- m++
- ) {
- var n = m * l,
- n = { x: a + e * Math.cos(n), y: f + h * Math.sin(n) }
- b.push(d.Od(n))
- }
- return b
- },
- mapChanged: function () {
- g.a.Ph(z.B.Et.bd.mapChanged) && z.B.Et.bd.mapChanged.apply(this)
- this.C = !0
- this.setPath(this.Ur())
- this.C = !1
- !this.$g && this.get('map') && ((this.$g = !0), this.get('map').q('overlays'))
- },
- setCenter: function (a, b) {
- g.c.add(this, 'setCenter')
- ;(a = g.a.Ka(a)) &&
- a instanceof g.U &&
- (this.B && this.B.get('deltaPos') && this.B.set('deltaPos', [0, 0], !0),
- this.set('center', a),
- this.set('path', this.Ur()),
- this.$g || ((this.$g = !0), this.get('map') && this.get('map').q('overlays')),
- b || (this.q('setCenter'), this.q('change', { type: 'change', target: this })))
- },
- setRadius: function (a) {
- var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1
- g.c.add(this, 'setRadius')
- a && 2 === a.length && (this.set('radius', a), this.set('path', this.Ur()), b || (this.q('change', { type: 'change', target: this }), this.q('setPath')))
- },
- setOptions: function (a) {
- z.B.Et.bd.setOptions.call(this, a)
- this.C = !0
- a.radius && this.setRadius(a.radius, !0)
- a.center && this.setCenter(a.center, !0)
- this.C = !1
- },
- getRadius: function () {
- g.c.add(this, 'getRadius')
- return this.get('radius', null, !0)
- },
- getCenter: function () {
- g.c.add(this, 'getCenter')
- var a = this.get('center', null, !0)
- this.B && this.B.get('deltaPos') && this.B.St([a], this.B.get('deltaPos'))[0]
- return a
- },
- })
- z.B.Lt = z.B.Dc.extend({
- w: { visible: !0, zIndex: 10, strokeColor: '#006600', strokeOpacity: 0.9, strokeWeight: 3, strokeStyle: 'solid', strokeDasharray: [10, 5], fillColor: '#006600', fillOpacity: 0.9 },
- A: function () {
- var a = this,
- b = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}
- this.CLASS_NAME = 'AMap.Rectangle'
- g.c.ya(this, b)
- b = g.extend({}, this.w, b)
- this.C = !0
- var c = this.Ur(b)
- b.path = c
- z.B.Lt.bd.A.call(this, b)
- this.setPath(c)
- ;(this.w.bounds && this.get('map')) || (this.$g = !1)
- this.on('movepoly', function (b) {
- var c = a.get('map'),
- f = a.get('bounds'),
- h = c.Od(c.Bb(f.wc).add(b.qK))
- b = c.Od(c.Bb(f.nc).add(b.qK))
- '3D' === c.view.type && a.set('deltaPos', [0, 0])
- a.set('bounds', new g.oe(h, b))
- })
- this.C = !1
- },
- Ur: function () {
- var a = [],
- b = (0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}).bounds || this.get('bounds')
- if (b) {
- b.C = !0
- var c = b.getSouthWest(),
- d = b.getNorthEast()
- b.C = !1
- g.a.Tb([new g.U(c.R, c.Q, !0), new g.U(d.R, c.Q, !0), new g.U(d.R, d.Q, !0), new g.U(c.R, d.Q, !0)], function (b) {
- return a.push(b)
- })
- }
- return a
- },
- mapChanged: function () {
- g.a.Ph(z.B.Lt.bd.mapChanged) && z.B.Lt.bd.mapChanged.apply(this)
- this.C = !0
- this.setPath(this.Ur())
- this.C = !1
- !this.$g && this.get('map') && ((this.$g = !0), this.get('map').q('overlays'))
- },
- setOptions: function (a) {
- this.C = !0
- z.B.Lt.bd.setOptions.call(this, a)
- a.bounds && this.setBounds(a.bounds, !0)
- this.C = !1
- },
- setBounds: function (a) {
- var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1
- g.c.add(this, 'setBounds')
- a &&
- a instanceof g.oe &&
- (this.set('bounds', a),
- this.set('path', this.Ur()),
- this.$g || ((this.$g = !0), this.get('map') && this.get('map').q('overlays')),
- b || (this.q('change', { type: 'change', target: this }), this.q('setBounds')))
- },
- getBounds: function () {
- g.c.add(this, 'getBounds')
- return this.get('bounds', null, !0)
- },
- })
- z.B.KW = z.B.vb.extend({
- w: { text: '', textAlign: 'center', verticalAlign: 'middle', offset: new g.H(0, 0) },
- A: function (a) {
- this.CLASS_NAME = 'AMap.Text'
- g.c.ya(this, a)
- z.B.KW.bd.A.apply(this, arguments)
- this.lga()
- this.C = !0
- this.setText(this.get('text'))
- this.setStyle(this.get('style'))
- this.C = !1
- },
- lga: function () {
- if (!this.jC) {
- var a = document.createElement('div')
- a.className = 'amap-overlay-text-container'
- this.jC = a
- }
- },
- getText: function () {
- g.c.add(this, 'getText')
- return this.get('text', null, !0)
- },
- setText: function (a) {
- g.c.add(this, 'setText')
- a || 0 === a || (a = '')
- g.f.Dya(this.jC, 'amap-overlay-text-empty', !a)
- g.c.add(this, 'setText')
- this.set('text', a)
- this.jC.innerHTML = a
- this.h8()
- },
- setStyle: function (a) {
- g.c.add(this, 'setStyle')
- a = a || {}
- for (var b in a) a.hasOwnProperty(b) && (this.jC.style[b] = a[b])
- this.h8()
- },
- h8: function () {
- this.C = !0
- this.setContent(this.jC)
- this.setShadow(this.getShadow())
- this.C = !1
- },
- })
- g.hW = {
- find: function (a) {
- return g.a.find(this.fx || [], a)
- },
- XI: function () {
- return this.fx || []
- },
- Ld: function (a) {
- return null !== this.find(a)
- },
- add: function (a) {
- var b = this,
- c = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : g.a.Rs,
- d = this.fx || (this.fx = [])
- g.a.isArray(a)
- ? g.a.Tb(a, function (a) {
- b.add(a, c)
- })
- : null === this.find(a) && (d.push(a), c(a))
- return this
- },
- remove: function (a) {
- var b = this,
- c = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : g.a.Rs,
- d = this.fx
- if (d)
- if (g.a.isArray(a))
- g.a.Tb(a, function (a) {
- b.remove(a, c)
- })
- else {
- var e = g.a.indexOf(d, a)
- ;-1 !== e && (c(d[e]), d.splice(e, 1))
- }
- return this
- },
- clear: function () {
- this.Tb(0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : g.a.Rs)
- this.fx = []
- return this
- },
- Tb: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : g.a.Rs,
- b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : null
- g.a.Tb(this.fx || [], function () {
- for (var c = arguments.length, d = Array(c), e = 0; e < c; e++) d[e] = arguments[e]
- c = d[0]
- g.a.Ph(c.Tb) ? c.Tb(a, b) : a.apply(b || c, d)
- })
- return this
- },
- So: function (a) {
- for (var b = arguments.length, c = Array(1 < b ? b - 1 : 0), d = 1; d < b; d++) c[d - 1] = arguments[d]
- this.Tb(function (b) {
- b && g.a.Ph(b[a]) && b[a].apply(b, c)
- })
- return this
- },
- h: function (a) {
- var b = arguments
- this.Tb(function (a) {
- a.on.apply(a, b)
- })
- return this
- },
- G: function (a) {
- var b = arguments
- this.Tb(function (a) {
- a.off.apply(a, b)
- })
- return this
- },
- addListener: function () {
- this.h.apply(this, arguments)
- },
- by: function (a) {
- var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : g.a.Rs,
- c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null
- this.Tb(function (d) {
- d.on.call(
- d,
- event,
- function () {
- b()
- d.off(a)
- },
- c
- )
- })
- },
- removeListener: function (a) {
- this.G(a.VQ, a.cS, a.bf)
- },
- O: function (a, b) {
- this.Tb(function (c) {
- c.emit(a, b)
- })
- },
- }
- z.B.Wn = z.B.Eh.extend({
- ka: [g.hW],
- A: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : []
- this.CLASS_NAME = 'AMap.OverlayGroup'
- g.c.ya(this)
- z.B.Wn.bd.A.apply(this)
- this.map = null
- this.add(a)
- },
- vc: function (a) {
- g.c.add(this, 'setMap')
- this.So('setMap', a)
- this.So('setMap', a)
- this.set('map', a)
- this.map = a
- return this
- },
- mapChanged: function () {},
- sC: function (a) {
- var b = this
- g.c.add(this, 'addOverlay')
- this.add(a, function (a) {
- b.map && ((a.C = !0), a.setMap(b.map), (a.C = !1))
- })
- return this
- },
- Jz: function (a) {
- var b = this
- g.c.add(this, 'removeOverlay')
- this.remove(a, function (a) {
- a.C = !0
- a.getMap() === b.map && a.setMap(null)
- a.C = !1
- })
- return this
- },
- kd: function () {
- var a = this
- g.c.add(this, 'clearOverlays')
- this.clear(function (b) {
- b.C = !0
- b.getMap() === a.map && b.setMap(null)
- b.C = !1
- })
- return this
- },
- Zy: function () {
- g.c.add(this, 'hide')
- this.So('hide')
- return this
- },
- show: function () {
- g.c.add(this, 'show')
- this.So('show')
- return this
- },
- ub: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}
- g.c.add(this, 'setOptions')
- this.So('setOptions', a)
- return this
- },
- })
- z.B.Wn.Xb({
- find: 'getOverlay',
- XI: 'getOverlays',
- sC: ['addOverlay', 'addOverlays'],
- Ld: 'hasOverlay',
- Jz: ['removeOverlay', 'removeOverlays'],
- kd: 'clearOverlays',
- Tb: 'eachOverlay',
- vc: 'setMap',
- ub: 'setOptions',
- show: 'show',
- Zy: 'hide',
- h: 'on',
- G: 'off',
- })
- ;(function (a, b) {
- function c(a, b) {
- if (!a.length) return !1
- for (var c = 0, d = a.length; c < d; c++) {
- var e = a[c]
- if (!('*' === b || (e && e.geometry && e.geometry.type === b)) || (e && e.properties && !e.properties._isAmap)) return !1
- }
- return !0
- }
- function d(a) {
- for (var b = [], c = 0, d = a.length; c < d; c++) b.push(a[c].geometry.coordinates)
- return b
- }
- function e(a) {
- if (!a || !a.length) return []
- a = b.a.Ka(a)
- for (var c = [], d = 0, e = a.length; d < e; d++) c[d] = a[d].wl()
- a[a.length - 1].gb(a[0]) || c.push(a[0].wl())
- return c
- }
- function f(a) {
- if (!a) return []
- a = b.a.Ka(a)
- b.a.isArray(a[0]) || (a = [a])
- for (var c = [], d = 0, f = a.length; d < f; d++) c[d] = e(a[d])
- return c
- }
- a.B.fW = a.B.Wn.extend({
- A: function (c) {
- this.CLASS_NAME = 'AMap.GeoJSON'
- b.c.ya(this, c)
- a.B.fW.bd.A.call(this, [])
- this.C = !0
- this.w = b.extend(
- {
- getMarker: function (b, c) {
- return new a.B.vb({ innerOverlay: !0, position: c })
- },
- getPolyline: function (b, c) {
- return new a.B.Zb({ path: c, innerOverlay: !0 })
- },
- getPolygon: function (b, c) {
- return new a.B.Dc({ path: c, innerOverlay: !0 })
- },
- coordsToLatLng: function (a) {
- return a
- },
- },
- c
- )
- if (!this.w.coordsToLatLngs) {
- var d = this.w.coordsToLatLng
- this.w.coordsToLatLngs = function (a) {
- for (var b = [], c = 0, e = a.length; c < e; c++) b.push(d.call(null, a[c]))
- return b
- }
- }
- this.importData(this.w.geoJSON)
- this.C = !1
- },
- importData: function (a) {
- b.c.add(this, 'importData')
- if (a && ((a = this.gga(a)), a.length)) {
- this.clearOverlays()
- this.sC(a)
- var c = this.w.map
- if (c) for (var d = 0, e = a.length; d < e; d++) (a[d].C = !0), a[d].setMap(c), (a[d].C = !1)
- }
- },
- toGeoJSON: function () {
- b.c.add(this, 'toGeoJSON')
- for (var a = this.XI(), c = [], d = 0, e = a.length; d < e; d++) (a[d].C = !0), (c[d] = a[d].toGeoJSON()), (a[d].C = !1)
- return c
- },
- gga: function (a) {
- if (a) {
- b.a.isArray(a) || (a = [a])
- for (var c = [], d = 0, e = a.length; d < e; d++) {
- var f = this.hga(a[d])
- f && c.push(f)
- }
- return c
- }
- },
- DX: function (a) {
- var b = 'Feature' === a.type ? a.geometry : a,
- b = this.w.coordsToLatLng(b ? b.coordinates : null),
- b = this.w.getMarker(a, b)
- this.Lr(a, b)
- return b
- },
- Yca: function (c) {
- for (var d = 'Feature' === c.type ? c.geometry : c, d = d ? d.coordinates : null, e = [], f = 0, n = d.length; f < n; f++)
- e.push(this.DX(b.extend({}, c, { type: 'Feature', properties: { _isAmap: !0, _pointIndex: f, _parentProperities: c.properties }, geometry: { type: 'Point', coordinates: d[f] } })))
- d = new a.B.Wn(e)
- this.Lr(c, d)
- return d
- },
- CX: function (a) {
- var b = 'Feature' === a.type ? a.geometry : a,
- b = this.w.coordsToLatLngs(b ? b.coordinates : null),
- b = this.w.getPolyline(a, b)
- this.Lr(a, b)
- return b
- },
- Xca: function (c) {
- for (var d = 'Feature' === c.type ? c.geometry : c, d = d ? d.coordinates : null, e = [], f = 0, n = d.length; f < n; f++)
- e.push(
- this.CX(
- b.extend({}, c, {
- type: 'Feature',
- properties: { _isAmap: !0, _lineStringIndex: f, _parentProperities: c.properties },
- geometry: { type: 'LineString', coordinates: d[f] },
- })
- )
- )
- d = new a.B.Wn(e)
- this.Lr(c, d)
- return d
- },
- EX: function (a) {
- for (var b = 'Feature' === a.type ? a.geometry : a, b = b ? b.coordinates : null, c = [], d = 0, e = b.length; d < e; d++) c.push(this.w.coordsToLatLngs(b[d]))
- b = this.w.getPolygon(a, c)
- this.Lr(a, b)
- return b
- },
- Zca: function (c) {
- for (var d = 'Feature' === c.type ? c.geometry : c, d = d ? d.coordinates : null, e = [], f = 0, n = d.length; f < n; f++)
- e.push(
- this.EX(b.extend({}, c, { type: 'Feature', properties: { _isAmap: !0, _polygonIndex: f, _parentProperities: c.properties }, geometry: { type: 'Polygon', coordinates: d[f] } }))
- )
- d = new a.B.Wn(e)
- this.Lr(c, d)
- return d
- },
- Rca: function (c) {
- for (var d = ('Feature' === c.type ? c.geometry : c).geometries, e = [], f = 0, n = d.length; f < n; f++)
- e.push(this.MN(b.extend({}, c, { type: 'Feature', properties: { _isAmap: !0, _geometryIndex: f, _parentProperities: c.properties }, geometry: d[f] })))
- d = new a.B.Wn(e)
- this.Lr(c, d)
- return d
- },
- hga: function (b) {
- if (b)
- switch (b.type) {
- case 'Feature':
- return this.MN(b)
- case 'FeatureCollection':
- for (var c = b.features, d = [], e = 0, f = c.length; e < f; e++) {
- var p = this.MN(c[e])
- p && d.push(p)
- }
- c = new a.B.Wn(d)
- this.Lr(b, c)
- return c
- default:
- throw Error('Invalid GeoJSON object.' + b.type)
- }
- },
- Lr: function (a, c) {
- c && a.properties && c.setExtData && ((c.C = !0), c.setExtData(b.extend({}, c.getExtData() || {}, { _geoJsonProperties: a.properties })), (c.C = !1))
- },
- MN: function (a) {
- var b = 'Feature' === a.type ? a.geometry : a
- if (!((b && b.coordinates) || b)) return null
- switch (b.type) {
- case 'Point':
- return this.DX(a)
- case 'MultiPoint':
- return this.Yca(a)
- case 'LineString':
- return this.CX(a)
- case 'MultiLineString':
- return this.Xca(a)
- case 'Polygon':
- return this.EX(a)
- case 'MultiPolygon':
- return this.Zca(a)
- case 'GeometryCollection':
- return this.Rca(a)
- default:
- throw Error('Invalid GeoJSON geometry.' + b.type)
- }
- },
- })
- a.B.Wn.Hb({
- toGeoJSON: function (a) {
- b.c.add(this, 'toGeoJSON')
- a = a || this.XI()
- for (var e = [], f = 0, m = a.length; f < m; f++) a[f].toGeoJSON && ((a[f].C = !0), (e[f] = a[f].toGeoJSON()), (a[f].C = !1))
- this.C = !0
- a = this.getExtData() || {}
- this.C = !1
- if (c(e, 'Point')) e = { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'MultiPoint', coordinates: d(e) } }
- else if (c(e, 'LineString')) e = { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'MultiLineString', coordinates: d(e) } }
- else if (c(e, 'Polygon')) e = { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'MultiPolygon', coordinates: d(e) } }
- else if (c(e, '*')) {
- a = a._geoJsonProperties || {}
- for (var f = [], m = 0, n = e.length; m < n; m++) f.push(e[m].geometry)
- e = { type: 'Feature', properties: a, geometry: { type: 'GeometryCollection', geometries: f } }
- } else e = { type: 'FeatureCollection', properties: a._geoJsonProperties || {}, features: e }
- return e
- },
- })
- a.B.vb.Hb({
- toGeoJSON: function () {
- b.c.add(this, 'toGeoJSON')
- this.C = !0
- var a = this.getExtData() || {},
- c = this.getPosition().wl()
- this.C = !1
- return { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'Point', coordinates: c } }
- },
- })
- a.B.Zb.Hb({
- toGeoJSON: function () {
- b.c.add(this, 'toGeoJSON')
- this.C = !0
- var a = this.getExtData() || {},
- c = this.getPath()
- this.C = !1
- return { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'LineString', coordinates: e(c) } }
- },
- })
- a.B.Dc.Hb({
- toGeoJSON: function () {
- b.c.add(this, 'toGeoJSON')
- this.C = !0
- var a = this.getExtData() || {},
- c = this.getPath()
- this.C = !1
- if (b.a.isArray(c[0]) && b.a.isArray(c[0][0])) {
- for (var d = [], e = 0; e < c.length; e += 1) d.push(f(c[e]))
- return { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'MultiPolygon', coordinates: d } }
- }
- return { type: 'Feature', properties: a._geoJsonProperties || {}, geometry: { type: 'Polygon', coordinates: f(c) } }
- },
- })
- })(z, g)
- z.o.RL = z.o.Yb.extend({
- ka: [g.hW],
- A: function (a) {
- var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : {}
- this.CLASS_NAME = 'AMap.LayerGroup'
- g.c.ya(this, b)
- z.o.RL.bd.A.call(this, b)
- this.map = null
- this.add(a)
- },
- vc: function (a) {
- g.c.add(this, 'setMap')
- this.So('setMap', a)
- this.set('map', a)
- this.map = a
- return this
- },
- mapChanged: function () {},
- PH: function (a) {
- var b = this
- g.c.add(this, 'addLayer')
- this.add(a, function (a) {
- b.map && ((a.C = !0), a.setMap(b.map), (a.C = !1))
- })
- return this
- },
- sk: function (a) {
- var b = this
- g.c.add(this, 'removeLayer')
- this.remove(a, function (a) {
- a.C = !0
- a.getMap() === b.map && a.setMap(null)
- a.C = !1
- })
- return this
- },
- Ana: function () {
- var a = this
- g.c.add(this, 'clearLayers')
- this.clear(function (b) {
- b.C = !0
- b.getMap() === a.map && b.setMap(null)
- b.C = !1
- })
- return this
- },
- Zy: function () {
- g.c.add(this, 'hide')
- this.So('hide')
- return this
- },
- show: function () {
- g.c.add(this, 'show')
- this.So('show')
- return this
- },
- reload: function () {
- this.So('reload')
- return this
- },
- ub: function () {
- var a = this,
- b = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : {}
- g.c.add(this, 'setOptions')
- var c = g.a.keys(b)
- g.a.Tb(c, function (c) {
- a.So('set', c, b[c])
- })
- return this
- },
- })
- z.o.RL.Xb({
- find: 'getLayer',
- XI: 'getLayers',
- PH: ['addLayer', 'addLayers'],
- Ld: 'hasLayer',
- sk: ['removeLayer', 'removeLayers'],
- Ana: 'clearLayers',
- Tb: 'eachLayer',
- vc: 'setMap',
- ub: 'setOptions',
- show: 'show',
- Zy: 'hide',
- reload: 'reload',
- h: 'on',
- G: 'off',
- })
- g.Zaa = z.Rb.extend({
- A: function (a, b) {
- b && ((b.center = b.position), (b.zoom = 11))
- arguments.callee.ma.apply(this, arguments)
- window.console && window.console.log && window.console.log('\u9ad8\u5fb7\u5730\u56feJSAPI\u8857\u666f\u5df2\u4e0b\u7ebf\uff0c\u611f\u8c22\u60a8\u7684\u652f\u6301\u3002')
- },
- })
- g.$aa = z.B.vb.extend({
- A: function (a) {
- arguments.callee.ma.apply(this, arguments)
- },
- })
- g.wd = {
- ms: function (a, b) {
- for (var c = Infinity, d = 0, e = 1, f = b.length; e < f; d = e, e += 1) c = Math.min(c, g.wd.Wxa(a, [b[d], b[e]]))
- return Math.sqrt(c)
- },
- Wxa: function (a, b) {
- return this.aL(a, this.G2(a, b))
- },
- aL: function (a, b) {
- var c = a[0] - b[0],
- d = a[1] - b[1]
- return c * c + d * d
- },
- GGa: function (a, b, c, d) {
- d = d || 1e-6
- if (c[0] === b[0]) {
- var e = Math.min(b[1], c[1])
- b = Math.max(b[1], c[1])
- return Math.abs(a[0] - c[0]) < d && a[1] >= e && a[1] <= b
- }
- var e = Math.min(b[0], c[0]),
- f = Math.max(b[0], c[0])
- return Math.abs(((c[1] - b[1]) / (c[0] - b[0])) * (a[0] - b[0]) + b[1] - a[1]) < d && a[0] >= e && a[0] <= f
- },
- G2: function (a, b) {
- var c = a[0],
- d = a[1],
- e = b[0],
- f = b[1],
- h = e[0],
- e = e[1],
- k = f[0],
- f = f[1],
- l = k - h,
- m = f - e,
- c = 0 === l && 0 === m ? 0 : (l * (c - h) + m * (d - e)) / (l * l + m * m || 0)
- 0 >= c || (1 <= c ? ((h = k), (e = f)) : ((h += c * l), (e += c * m)))
- return [h, e]
- },
- uq: function (a) {
- for (var b = a.length, c = 0, d = a[b - 1], e = d[0], d = d[1], f, h, k = 0; k < b; k += 1) (h = a[k]), (f = h[0]), (h = h[1]), (c += (f - e) * (h + d)), (e = f), (d = h)
- return 0 < c
- },
- Sd: function (a, b, c) {
- var d = a[0]
- a = a[1]
- var e = !1,
- f,
- h,
- k,
- l,
- m = b.length,
- n = 0
- for (l = m - 1; n < m; l = n, n += 1) {
- var p = !1
- f = b[n][0]
- h = b[n][1]
- k = b[l][0]
- l = b[l][1]
- if ((f === d && h === a) || (k === d && l === a)) return c ? !0 : !1
- if (h < a === l >= a) {
- f = ((k - f) * (a - h)) / (l - h) + f
- if (d === f) return c ? !0 : !1
- p = d < f
- }
- p && (e = !e)
- }
- return e
- },
- Q7: function (a, b) {
- function c(a, b, c, d) {
- var e = [a[0] - b[0], a[1] - b[1]],
- f = [c[0] - d[0], c[1] - d[1]]
- a = a[0] * b[1] - a[1] * b[0]
- c = c[0] * d[1] - c[1] * d[0]
- d = 1 / (e[0] * f[1] - e[1] * f[0])
- return [(a * f[0] - c * e[0]) * d, (a * f[1] - c * e[1]) * d]
- }
- function d(a, b, c) {
- return (c[0] - b[0]) * (a[1] - b[1]) > (c[1] - b[1]) * (a[0] - b[0])
- }
- var e,
- f,
- h,
- k,
- l = a
- e = b[b.length - 2]
- for (var m = 0, n = b.length - 1; m < n; m++) {
- f = b[m]
- var p = l,
- l = []
- h = p[p.length - 1]
- for (var q = 0, r = p.length; q < r; q++) (k = p[q]), d(k, e, f) ? (d(h, e, f) || l.push(c(e, f, h, k)), l.push(k)) : d(h, e, f) && l.push(c(e, f, h, k)), (h = k)
- e = f
- }
- if (3 > l.length) return []
- l.push(l[0])
- return l
- },
- }
- ;(function (a) {
- function b(b, c) {
- var d
- a: {
- switch (b) {
- case 'EPSG3395':
- d = a.Zh.$V
- break a
- case 'EPSG4326':
- d = a.Zh.aW
- break a
- }
- d = a.Zh.IL
- }
- return {
- project: function (b) {
- a.a.isArray(b) && (b = new a.U(b[0], b[1]))
- return d.MD(b, c).wl()
- },
- unproject: function (b) {
- a.a.isArray(b) && (b = new a.H(b[0], b[1]))
- return d.lE(b, c).wl()
- },
- normalizePoint: function (b) {
- return a.a.Ka(b)
- },
- distance: function (b, c) {
- c = this.normalizePoint(c)
- if (a.a.isArray(c)) return this.distanceToLine(b, c)
- b = this.normalizePoint(b)
- var d = a.Lm.Pu,
- e = Math.cos,
- f = b.Q * d,
- h = c.Q * d,
- k = 2 * a.Lm.PQ,
- d = c.R * d - b.R * d,
- e = (1 - e(h - f) + (1 - e(d)) * e(f) * e(h)) / 2
- return k * Math.asin(Math.sqrt(e))
- },
- ringArea: function (b) {
- b = this.normalizeLine(b)
- var c = a.Lm.PQ * a.Lm.Pu,
- d = 0,
- e = b.length
- if (3 > e) return 0
- for (var f = 0; f < e - 1; f += 1)
- var h = b[f], k = b[f + 1], u = h.R * c * Math.cos(h.Q * a.Lm.Pu), h = h.Q * c, v = k.R * c * Math.cos(k.Q * a.Lm.Pu), d = d + (u * k.Q * c - v * h)
- f = b[f]
- b = b[0]
- e = f.R * c * Math.cos(f.Q * a.Lm.Pu)
- f = f.Q * c
- k = b.R * c * Math.cos(b.Q * a.Lm.Pu)
- d += e * b.Q * c - k * f
- return 0.5 * Math.abs(d)
- },
- sphericalCalotteArea: function (b) {
- var c = a.Lm.PQ
- b = c - c * Math.cos(b / c)
- return 2 * Math.PI * c * b
- },
- }
- }
- function c() {
- return {
- normalizePoint: function (a) {
- return a && a.x && a.y ? [a.x, a.y] : a
- },
- distance: function (a, b) {
- var c = a[0] - b[0],
- d = a[1] - b[1]
- return Math.sqrt(c * c + d * d)
- },
- project: function (a) {
- return a
- },
- unproject: function (a) {
- return a
- },
- ringArea: function (a) {
- for (var b = [0, 0], c = [0, 0], d = 0, e = a[0], n = a.length, p = 2; p < n; p++) {
- var q = a[p - 1],
- r = a[p]
- b[0] = e[0] - r[0]
- b[1] = e[1] - r[1]
- c[0] = e[0] - q[0]
- c[1] = e[1] - q[1]
- d += b[0] * c[1] - b[1] * c[0]
- }
- return d / 2
- },
- }
- }
- function d(a) {
- for (var b = 0, c = a.length, d = 0; d < c - 1; d++) var e = a[d], n = a[d + 1], b = b + (n[0] - e[0]) * (n[1] + e[1])
- if (a[c - 1][0] !== a[0][0] || a[c - 1][1] !== a[0][1]) (e = a[c - 1]), (n = a[0]), (b += (n[0] - e[0]) * (n[1] + e[1]))
- return 0 >= b
- }
- function e(b) {
- this.CLASS_NAME = 'AMap.GeometryUtil'
- this.Vb = a.extend({ onSegmentTolerance: 5, crs: 'EPSG3857', maxZoom: 20 }, b)
- this.setCrs(this.Vb.crs)
- }
- a.extend(e.prototype, {
- clone: function (b) {
- return new e(a.extend({}, this.Vb, b))
- },
- isPoint: function (b) {
- return b && (b instanceof a.U || (a.a.isArray(b) && !isNaN(b[0])))
- },
- normalizePoint: function (a) {
- return a
- },
- normalizeLine: function (a) {
- for (var b = [], c = 0, d = a.length; c < d; c++) b.push(this.normalizePoint(a[c]))
- return b
- },
- normalizeMultiLines: function (b) {
- a.a.isArray(b) && this.isPoint(b[0]) && (b = [b])
- for (var c = [], d = 0, e = b.length; d < e; d++) c.push(this.normalizeLine(b[d]))
- return c
- },
- setCrs: function (d) {
- a.extend(this, d && d.project && d.unproject ? d : 'plane' === d ? c() : b(d, this.Vb.maxZoom))
- },
- distance: function () {
- throw Error('distance Not implemented!')
- },
- Fx: function (a, b) {
- a = this.normalizeLine(a)
- this.isPoint(a[0]) || (a = a[0])
- for (var c = [], d = 0, e = a.length; d < e; d++) c.push(this.project(a[d]))
- !0 === b ? (c = this.makesureClockwise(c)) : !1 === b && ((c = this.makesureClockwise(c)), c.reverse())
- return c
- },
- dka: function (a) {
- for (var b = [], c = 0, d = a.length; c < d; c++) b.push(this.unproject(a[c]))
- return b
- },
- closestOnSegment: function (b, c, d) {
- b = a.wd.G2(this.project(b), this.Fx([c, d]))
- return this.unproject(b)
- },
- closestOnLine: function (a, b) {
- b = this.normalizeLine(b)
- for (var c = Infinity, d, e = 0, n = b.length; e < n - 1; e++) {
- var p = this.closestOnSegment(a, b[e], b[e + 1]),
- q = this.distance(a, p)
- q < c && ((c = q), (d = p))
- }
- return d
- },
- distanceToSegment: function (a, b, c) {
- return this.distanceToLine(a, [b, c])
- },
- distanceToLine: function (a, b) {
- b = this.normalizeLine(b)
- this.isPoint(b[0]) || (b = b[0])
- for (var c = Infinity, d = 0, e = b.length; d < e - 1; d++) var n = this.closestOnSegment(a, b[d], b[d + 1]), c = Math.min(c, this.distance(a, n))
- return c
- },
- distanceToPolygon: function (a, b) {
- return this.isPointInRing(a, b) ? 0 : this.distanceToLine(a, b)
- },
- isPointOnSegment: function (a, b, c, d) {
- if ((!d && 0 !== d) || 0 > d) d = this.Vb.onSegmentTolerance
- return this.distanceToSegment(a, b, c) <= d
- },
- isPointOnLine: function (a, b, c) {
- b = this.normalizeLine(b)
- for (var d = 0, e = b.length; d < e - 1; d++) if (this.isPointOnSegment(a, b[d], b[d + 1], c)) return !0
- return !1
- },
- isPointOnRing: function (a, b, c) {
- b = this.normalizeLine(b)
- for (var d = 0, e = b.length; d < e; d++) if (this.isPointOnSegment(a, b[d], b[d === e - 1 ? 0 : d + 1], c)) return !0
- return !1
- },
- isPointOnPolygon: function (a, b, c) {
- b = this.normalizeMultiLines(b)
- for (var d = 0, e = b.length; d < e; d++) if (this.isPointOnRing(a, b[d], c)) return !0
- return !1
- },
- makesureClockwise: function (a) {
- d(a) || ((a = [].concat(a)), a.reverse())
- return a
- },
- makesureAntiClockwise: function (a) {
- d(a) && ((a = [].concat(a)), a.reverse())
- return a
- },
- isPointInRing: function (b, c, d) {
- d || (c = this.normalizeLine(c))
- c = this.Fx(c, !0)
- return a.wd.Sd(this.project(b), c, !1)
- },
- isRingInRing: function (a, b, c) {
- for (var d = 0, e = a.length; d < e; d++) if (!this.isPointInRing(a[d], b, c)) return !1
- d = 0
- for (e = b.length; d < e; d++) if (this.isPointInRing(b[d], a, c)) return !1
- return !0
- },
- isPointInPolygon: function (a, b) {
- b = this.normalizeMultiLines(b)
- for (var c, d = 0, e = b.length; d < e && ((c = this.isPointInRing(a, b[d])), 0 < d && (c = !c), c); d += 1);
- return c
- },
- doesSegmentsIntersect: function (a, b, c, d, e) {
- e = e ? [a, b, c, d] : this.Fx([a, b, c, d])
- a = e[0]
- b = e[1]
- c = e[2]
- d = e[3]
- e = !1
- var n = (d[0] - c[0]) * (a[1] - c[1]) - (d[1] - c[1]) * (a[0] - c[0]),
- p = (b[0] - a[0]) * (a[1] - c[1]) - (b[1] - a[1]) * (a[0] - c[0])
- a = (d[1] - c[1]) * (b[0] - a[0]) - (d[0] - c[0]) * (b[1] - a[1])
- 0 !== a && ((b = n / a), (a = p / a), 0 <= b && 1 >= b && 0 <= a && 1 >= a && (e = !0))
- return e
- },
- doesSegmentLineIntersect: function (a, b, c) {
- c = this.normalizeLine(c)
- for (var d = 0, e = c.length; d < e - 1; d++) if (this.doesSegmentsIntersect(a, b, c[d], c[d + 1])) return !0
- return !1
- },
- doesSegmentRingIntersect: function (a, b, c, d) {
- d || (c = this.normalizeLine(c))
- for (var e = 0, n = c.length; e < n; e++) if (this.doesSegmentsIntersect(a, b, c[e], c[e === n - 1 ? 0 : e + 1], d)) return !0
- return !1
- },
- doesSegmentPolygonIntersect: function (a, b, c) {
- c = this.normalizeMultiLines(c)
- for (var d = 0, e = c.length; d < e; d++) if (this.doesSegmentRingIntersect(a, b, c[d])) return !0
- return !1
- },
- doesLineLineIntersect: function (a, b) {
- a = this.normalizeLine(a)
- for (var c = 0, d = a.length; c < d - 1; c++) if (this.doesSegmentLineIntersect(a[c], a[c + 1], b)) return !0
- return !1
- },
- doesLineRingIntersect: function (a, b) {
- a = this.normalizeLine(a)
- for (var c = 0, d = a.length; c < d - 1; c++) if (this.doesSegmentRingIntersect(a[c], a[c + 1], b)) return !0
- return !1
- },
- doesPolygonPolygonIntersect: function (a, b) {
- return this.doesRingRingIntersect(b, a) || this.isRingInRing(a, b) || this.isRingInRing(b, a) ? !0 : !1
- },
- doesPolygonContainsPolygon: function (a, b, c) {
- return this.isRingInRing(b, a, !0) || (c ? this.doesRingRingIntersect(b, a, !0) : !1)
- },
- doesRingRingIntersect: function (a, b, c) {
- c || (a = this.normalizeLine(a))
- for (var d = 0, e = a.length; d < e; d++) if (this.doesSegmentRingIntersect(a[d], a[d === e - 1 ? 0 : d + 1], b, c)) return !0
- return !1
- },
- EP: function (a, b) {
- for (var c = 0, d = 0; d < a.length - 1; d += 1) {
- var e = this.distance(a[d], a[d + 1])
- if (e + c < b) c += e
- else return (c = (b - c) / e), [a[d][0] + c * (a[d + 1][0] - a[d][0]), a[d][1] + c * (a[d + 1][1] - a[d][1]), d]
- }
- return null
- },
- UX: function (a, b) {
- function c() {
- var a = [e[0] - n[0], e[1] - n[1]],
- b = [p[0] - q[0], p[1] - q[1]],
- d = e[0] * n[1] - e[1] * n[0],
- f = p[0] * q[1] - p[1] * q[0],
- h = 1 / (a[0] * b[1] - a[1] * b[0])
- return [(d * b[0] - f * a[0]) * h, (d * b[1] - f * a[1]) * h]
- }
- function d(a) {
- return (n[0] - e[0]) * (a[1] - e[1]) > (n[1] - e[1]) * (a[0] - e[0])
- }
- a = this.makesureAntiClockwise(a)
- b = this.makesureClockwise(b)
- var e,
- n,
- p,
- q,
- r = a
- e = b[b.length - 1]
- for (var s = 0, u = b.length; s < u; s++) {
- n = b[s]
- var v = r,
- r = []
- p = v[v.length - 1]
- for (var w = 0, t = v.length; w < t; w++) (q = v[w]), d(q) ? (d(p) || r.push(c()), r.push(q)) : d(p) && r.push(c()), (p = q)
- e = n
- }
- return r
- },
- ringRingClip: function (a, b) {
- a = this.Fx(a)
- b = this.Fx(b)
- var c = this.UX(a, b)
- 0 == c.length && (c = this.UX(b, a))
- return this.dka(c)
- },
- ringArea: function () {
- throw Error('distance Not implemented!')
- },
- distanceOfLine: function (a) {
- a = this.normalizeLine(a)
- for (var b = 0, c = 0, d = a.length; c < d - 1; c++) b += this.distance(a[c], a[c + 1])
- return b
- },
- isClockwise: function (a) {
- a = this.Fx(a)
- return d(a)
- },
- })
- a.Ft = new e()
- a.di = new e()
- a.di.setCrs('plane')
- })(g)
- g.KL = function () {
- var a = {}
- ;(function () {
- function b(a) {
- for (var b = 0, e = a.length, f = 0; f < e - 1; f++) var h = a[f], k = a[f + 1], b = b + (k[0] - h[0]) * (k[1] + h[1])
- if (a[e - 1][0] !== a[0][0] || a[e - 1][1] !== a[0][1]) (h = a[e - 1]), (k = a[0]), (b += (k[0] - h[0]) * (k[1] + h[1]))
- return 0 >= b
- }
- a.Nta = function (a) {
- b(a) && ((a = [].concat(a)), a.reverse())
- return a
- }
- a.D5 = b
- })()
- ;(function () {
- function b(a) {
- var b = a.length
- 2 < b && a[b - 1][0] == a[0][0] && a[b - 1][1] == a[0][1] && a.pop()
- }
- function c(a, b) {
- for (var c = 0; c < b.length; c++) a.push(b[c][0]), a.push(b[c][1])
- }
- a.Vh = function (a, e) {
- var f = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 0,
- h = arguments[3]
- e = e || []
- var k = [],
- l = []
- b(a)
- c(k, a)
- var m = a.length
- e.forEach(b)
- for (var n = 0; n < e.length; n++) l.push(m), (m += e[n].length), c(k, e[n])
- l = (this.lL ? this.lL : g.Ec.lL)(k, l)
- if (h) {
- f = []
- for (n = 0; n < l.length; n += 1) (h = 2 * l[n]), f.push([k[h], k[h + 1]])
- return f
- }
- if (f) for (n = 0; n < l.length; n += 1) l[n] += f
- return l
- }
- })()
- return a
- }
- ;(function (a) {
- a.rF = function () {
- function a(b, c, d, e, f) {
- for (var h, k = 0, l = c, n = d - e; l < d; l += e) (k += (b[n] - b[l]) * (b[l + 1] + b[n + 1])), (n = l)
- if (f === 0 < k) for (f = c; f < d; f += e) h = r(f, b[f], b[f + 1], h)
- else for (f = d - e; f >= c; f -= e) h = r(f, b[f], b[f + 1], h)
- h && m(h, h.next) && (s(h), (h = h.next))
- return h
- }
- function c(a, b) {
- if (!a) return a
- b || (b = a)
- var c = a,
- d
- do
- if (((d = !1), c.u9 || (!m(c, c.next) && 0 !== l(c.Ia, c, c.next)))) c = c.next
- else {
- s(c)
- c = b = c.Ia
- if (c === c.next) break
- d = !0
- }
- while (d || c !== b)
- return b
- }
- function d(a, b, e, f, r, u, C) {
- if (a) {
- if (!C && u) {
- var D = a,
- A = D
- do null === A.z && (A.z = h(A.x, A.y, f, r, u)), (A.ip = A.Ia), (A = A.nl = A.next)
- while (A !== D)
- A.ip.nl = null
- A.ip = null
- var D = A,
- B,
- G,
- H,
- I,
- P,
- L,
- M = 1
- do {
- A = D
- H = D = null
- for (I = 0; A; ) {
- I++
- G = A
- for (B = P = 0; B < M && (P++, (G = G.nl), G); B++);
- for (L = M; 0 < P || (0 < L && G); )
- 0 !== P && (0 === L || !G || A.z <= G.z) ? ((B = A), (A = A.nl), P--) : ((B = G), (G = G.nl), L--), H ? (H.nl = B) : (D = B), (B.ip = H), (H = B)
- A = G
- }
- H.nl = null
- M *= 2
- } while (1 < I)
- }
- for (D = a; a.Ia !== a.next; ) {
- A = a.Ia
- G = a.next
- if (u)
- a: if (((H = a.Ia), (I = a.next), 0 <= l(H, a, I))) H = !1
- else {
- P = h(H.x < a.x ? (H.x < I.x ? H.x : I.x) : a.x < I.x ? a.x : I.x, H.y < a.y ? (H.y < I.y ? H.y : I.y) : a.y < I.y ? a.y : I.y, f, r, u)
- M = h(H.x > a.x ? (H.x > I.x ? H.x : I.x) : a.x > I.x ? a.x : I.x, H.y > a.y ? (H.y > I.y ? H.y : I.y) : a.y > I.y ? a.y : I.y, f, r, u)
- for (B = a.nl; B && B.z <= M; ) {
- if (B !== a.Ia && B !== a.next && k(H.x, H.y, a.x, a.y, I.x, I.y, B.x, B.y) && 0 <= l(B.Ia, B, B.next)) {
- H = !1
- break a
- }
- B = B.nl
- }
- for (B = a.ip; B && B.z >= P; ) {
- if (B !== a.Ia && B !== a.next && k(H.x, H.y, a.x, a.y, I.x, I.y, B.x, B.y) && 0 <= l(B.Ia, B, B.next)) {
- H = !1
- break a
- }
- B = B.ip
- }
- H = !0
- }
- else
- a: if (((H = a.Ia), (I = a.next), 0 <= l(H, a, I))) H = !1
- else {
- for (P = a.next.next; P !== a.Ia; ) {
- if (k(H.x, H.y, a.x, a.y, I.x, I.y, P.x, P.y) && 0 <= l(P.Ia, P, P.next)) {
- H = !1
- break a
- }
- P = P.next
- }
- H = !0
- }
- if (H) b.push(A.we / e), b.push(a.we / e), b.push(G.we / e), s(a), (D = a = G.next)
- else if (((a = G), a === D)) {
- if (C)
- if (1 === C) {
- C = b
- D = e
- A = a
- do
- (G = A.Ia),
- (H = A.next.next),
- !m(G, H) && n(G, A, A.next, H) && p(G, H) && p(H, G) && (C.push(G.we / D), C.push(A.we / D), C.push(H.we / D), s(A), s(A.next), (A = a = H)),
- (A = A.next)
- while (A !== a)
- a = A
- d(a, b, e, f, r, u, 2)
- } else {
- if (2 === C)
- a: {
- C = a
- do {
- for (D = C.next.next; D !== C.Ia; ) {
- if ((A = C.we !== D.we))
- if (((A = void 0), (A = C.next.we !== D.we)))
- if (((A = void 0), (A = C.Ia.we !== D.we))) {
- A = A = void 0
- b: {
- A = C
- do {
- if (A.we !== C.we && A.next.we !== C.we && A.we !== D.we && A.next.we !== D.we && n(A, A.next, C, D)) {
- A = !0
- break b
- }
- A = A.next
- } while (A !== C)
- A = !1
- }
- if ((A = !A))
- if (((A = void 0), (A = p(C, D))))
- if (((A = void 0), (A = p(D, C)))) {
- A = C
- G = !1
- H = (C.x + D.x) / 2
- I = (C.y + D.y) / 2
- do
- A.y > I !== A.next.y > I && A.next.y !== A.y && H < ((A.next.x - A.x) * (I - A.y)) / (A.next.y - A.y) + A.x && (G = !G),
- (A = A.next)
- while (A !== C)
- A = G
- }
- }
- if (A) {
- a = q(C, D)
- C = c(C, C.next)
- a = c(a, a.next)
- d(C, b, e, f, r, u)
- d(a, b, e, f, r, u)
- break a
- }
- D = D.next
- }
- C = C.next
- } while (C !== a)
- }
- }
- else d(c(a), b, e, f, r, u, 1)
- break
- }
- }
- }
- }
- function e(a, b) {
- return a.x - b.x
- }
- function f(a, b) {
- var c = b,
- d = a.x,
- e = a.y,
- f = -Infinity,
- h
- do {
- if (e <= c.y && e >= c.next.y && c.next.y !== c.y) {
- var l = c.x + ((e - c.y) * (c.next.x - c.x)) / (c.next.y - c.y)
- if (l <= d && l > f) {
- f = l
- if (l === d) {
- if (e === c.y) return c
- if (e === c.next.y) return c.next
- }
- h = c.x < c.next.x ? c : c.next
- }
- }
- c = c.next
- } while (c !== b)
- if (!h) return null
- if (d === f) return h.Ia
- for (var l = h, m = h.x, n = h.y, r = Infinity, s, c = h.next; c !== l; )
- d >= c.x &&
- c.x >= m &&
- d !== c.x &&
- k(e < n ? d : f, e, m, n, e < n ? f : d, e, c.x, c.y) &&
- ((s = Math.abs(e - c.y) / (d - c.x)), (s < r || (s === r && c.x > h.x)) && p(c, a) && ((h = c), (r = s))),
- (c = c.next)
- return h
- }
- function h(a, b, c, d, e) {
- a = 32767 * (a - c) * e
- b = 32767 * (b - d) * e
- a = (a | (a << 8)) & 16711935
- a = (a | (a << 4)) & 252645135
- a = (a | (a << 2)) & 858993459
- b = (b | (b << 8)) & 16711935
- b = (b | (b << 4)) & 252645135
- b = (b | (b << 2)) & 858993459
- return ((a | (a << 1)) & 1431655765) | (((b | (b << 1)) & 1431655765) << 1)
- }
- function k(a, b, c, d, e, f, h, k) {
- return 0 <= (e - h) * (b - k) - (a - h) * (f - k) && 0 <= (a - h) * (d - k) - (c - h) * (b - k) && 0 <= (c - h) * (f - k) - (e - h) * (d - k)
- }
- function l(a, b, c) {
- return (b.y - a.y) * (c.x - b.x) - (b.x - a.x) * (c.y - b.y)
- }
- function m(a, b) {
- return a.x === b.x && a.y === b.y
- }
- function n(a, b, c, d) {
- return (m(a, b) && m(c, d)) || (m(a, d) && m(c, b)) ? !0 : 0 < l(a, b, c) !== 0 < l(a, b, d) && 0 < l(c, d, a) !== 0 < l(c, d, b)
- }
- function p(a, b) {
- return 0 > l(a.Ia, a, a.next) ? 0 <= l(a, b, a.next) && 0 <= l(a, a.Ia, b) : 0 > l(a, b, a.Ia) || 0 > l(a, a.next, b)
- }
- function q(a, b) {
- var c = new u(a.we, a.x, a.y),
- d = new u(b.we, b.x, b.y),
- e = a.next,
- f = b.Ia
- a.next = b
- b.Ia = a
- c.next = e
- e.Ia = c
- d.next = c
- c.Ia = d
- f.next = d
- d.Ia = f
- return d
- }
- function r(a, b, c, d) {
- a = new u(a, b, c)
- d ? ((a.next = d.next), (a.Ia = d), (d.next.Ia = a), (d.next = a)) : ((a.Ia = a), (a.next = a))
- return a
- }
- function s(a) {
- a.next.Ia = a.Ia
- a.Ia.next = a.next
- a.ip && (a.ip.nl = a.nl)
- a.nl && (a.nl.ip = a.ip)
- }
- function u(a, b, c) {
- this.we = a
- this.x = b
- this.y = c
- this.nl = this.ip = this.z = this.next = this.Ia = null
- this.u9 = !1
- }
- return {
- lL: function (h, k, l) {
- l = l || 2
- var m = k && k.length,
- n = m ? k[0] * l : h.length,
- p = a(h, 0, n, l, !0),
- r = []
- if (!p) return r
- var s, u, B, G
- if (m) {
- var H = l,
- m = [],
- I,
- P,
- L
- G = 0
- for (I = k.length; G < I; G++) {
- P = k[G] * H
- L = G < I - 1 ? k[G + 1] * H : h.length
- P = a(h, P, L, H, !1)
- P === P.next && (P.u9 = !0)
- var M = (L = P)
- do L.x < M.x && (M = L), (L = L.next)
- while (L !== P)
- m.push(M)
- }
- m.sort(e)
- for (G = 0; G < m.length; G++) {
- k = m[G]
- H = p
- if ((H = f(k, H))) (k = q(H, k)), c(k, k.next)
- p = c(p, p.next)
- }
- }
- if (h.length > 80 * l) {
- s = B = h[0]
- u = m = h[1]
- for (H = l; H < n; H += l) (G = h[H]), (k = h[H + 1]), G < s && (s = G), k < u && (u = k), G > B && (B = G), k > m && (m = k)
- B = Math.max(B - s, m - u)
- B = 0 !== B ? 1 / B : 0
- }
- d(p, r, l, s, u, B)
- return r
- },
- }
- }
- a.faa = a.rF()
- })(g)
- ;(function (a) {
- function b(a) {
- var b = a.length
- 2 < b && a[b - 1][0] == a[0][0] && a[b - 1][1] == a[0][1] && a.pop()
- }
- function c(a, b) {
- for (var c = 0; c < b.length; c++) a.push(b[c][0]), a.push(b[c][1])
- }
- a.Zn = {
- oi: function (a) {
- for (var b = a.length, c = 0, h = b - 1, k = 0; k < b; h = k++) c += a[h][0] * a[k][1] - a[k][0] * a[h][1]
- return 0.5 * c
- },
- D5: function (b) {
- return 0 > a.Zn.oi(b)
- },
- normalize: function (b) {
- var c
- if (b) {
- c = []
- for (var f = 0, h = b.length; f < h; f += 1)
- c[f] = b[f] instanceof Array ? this.normalize(b[f]) : b[f] instanceof a.U ? [b[f].R, b[f].Q] : b[f] instanceof a.H ? [b[f].x, b[f].y] : b[f]
- }
- return c
- },
- Vh: function (d, e) {
- e = e || []
- var f = [],
- h = []
- b(d)
- c(f, d)
- var k = d.length
- e.forEach(b)
- for (var l = 0; l < e.length; l++) h.push(k), (k += e[l].length), c(f, e[l])
- return a.faa.lL(f, h)
- },
- }
- })(g)
- g.qI = function (a, b, c) {
- g.c.add({ CLASS_NAME: 'convertFrom' }, b)
- var d = g.r.Zd + '/v3/assistant/coordinate/convert'
- a = g.a.Ka(a)
- var e = []
- if (a instanceof Array) {
- for (var f = 0, h = a.length; f < h; f += 1) e.push(a[f] + '')
- e = e.join(';')
- } else e = a + ''
- b = ['key=' + g.r.key, 's=rsv3', 'locations=' + e, 'coordsys=' + (b || 'gps')]
- d += 0 < b.length ? '?' + b.join('&') : ''
- d = new g.jb.zb(d, { callback: 'callback' })
- d.h(
- 'complete',
- function (a) {
- if ('1' === a.status) {
- a = a.locations.split(';')
- for (var b = 0; b < a.length; b += 1) {
- var d = a[b].split(',')
- a[b] = new AMap.LngLat(d[0], d[1])
- }
- c && 'function' === typeof c && c('complete', { info: 'ok', locations: a })
- } else c && 'function' === typeof c && c('error', a.info)
- },
- this
- )
- d.h(
- 'error',
- function (a) {
- c && 'function' === typeof c && c('error', a.info)
- },
- this
- )
- }
- g.jb = g.jb || {}
- g.jb.iM = g.da.extend({
- ka: [g.va],
- A: function (a, b) {
- this.w = { callback: 'cbk', type: 'json', charset: 'utf-8' }
- b = b || {}
- g.a.ub(this, b)
- this.url = a
- this.send(a, b.Ed, b.O2, b.pU, b.responseType)
- },
- send: function (a) {
- var b = g.f.create('script')
- b.type = 'text/javascript'
- b.charset = this.w.charset
- var c = this
- g.l.Ue
- ? (b.onreadystatechange = function () {
- ;('loaded' !== this.readyState && 'complete' !== this.readyState) || c.q('complete')
- })
- : ((b.onload = function () {
- c.q('complete')
- }),
- (b.onerror = function () {
- c.q('error', { status: 0, info: 'service error', url: a })
- }))
- b.src = a
- document.getElementsByTagName('head')[0].appendChild(b)
- },
- })
- g.jb.zb = g.jb.iM.extend({
- jna: function () {
- if (g.a.P8) return g.a.cL.push(this), !0
- },
- Xwa: function () {
- this.q('error', { info: 'TIME_OUT_A' })
- },
- send: function (a, b, c, d) {
- function e() {
- window[f] = null
- try {
- window[f] = null
- } catch (a) {}
- h.onerror = null
- h.parentNode && h.parentNode.removeChild(h)
- }
- if (!this.w.gy || !this.jna()) {
- a = encodeURI(a)
- var f = this.w.fun
- if (!f || window[f]) f = g.a.f4('jsonp_', 6) + '_'
- var h = document.createElement('script')
- h.type = 'text/javascript'
- h.charset = 'utf-8'
- h.async = !0
- var k = this
- g.l.Ue ||
- (h.onerror = function () {
- e()
- k.q('error', { info: 'REQUEST_FAILED', url: a })
- })
- window[f] = function (a) {
- e()
- if (k.w.callbackFunction) k.w.callbackFunction.call(k.w.context, a)
- else if (3e4 === a.errcode && a.data)
- (g.a.P8 = !0),
- g.tb.load('AMap.AntiCrabFrame', function () {
- g.a.gy || (g.a.gy = new g.R$())
- g.a.cL.push(k)
- g.a.gy.open(k.w.Ed, a.data.host, k.fE || '', k.url)
- })
- else {
- if (a instanceof Array || 'string' === typeof a) a = { data: a }
- a.dEa = f
- k.q('complete', a)
- }
- }
- b = '?'
- ;-1 !== a.indexOf('?') && (b = '&')
- b = a + b + this.w.callback + '=' + f
- if (-1 !== a.indexOf(g.r.Zd + '/v') || -1 !== a.indexOf('yuntuapi.amap.com/datasearch') || -1 !== a.indexOf('webapi.amap.com/'))
- (b = b + '&platform=JS&logversion=2.0' + ('&appname=' + g.r.Up)), (b += '&csid=' + g.a.Bw()), (b += '&sdkversion=' + g.r.ln)
- if ((c = this.w.GI)) {
- var l = [],
- m
- for (m in c) c.hasOwnProperty(m) && (l.push(m + '=' + c[m]), (b += '&' + m + '=' + encodeURIComponent(c[m])))
- k.fE = l.join('&')
- }
- h.src = d ? b + '&rereq=true' : b
- g.jb.zb.iea = document.getElementsByTagName('body')[0] || document.getElementsByTagName('head')[0]
- g.jb.zb.iea.appendChild(h)
- }
- },
- })
- g.jb.XMLHttpRequest = g.jb.iM.extend({
- send: function (a, b, c, d, e) {
- var f = this
- if ((g.l.Ue || g.l.j5) && window.XDomainRequest) {
- var h = (this.K$ = new XDomainRequest())
- h.onerror = function (b) {
- f.q('error', { url: a, data: b })
- }
- h.onload = function () {
- f.q('complete', { url: a, data: h.responseText })
- }
- h.open(b || 'GET', a)
- setTimeout(function () {
- h.send(c || void 0)
- }, 0)
- } else {
- var k = (this.K$ = new XMLHttpRequest())
- k.onreadystatechange = function () {
- 4 === k.readyState && 200 === k.status
- ? f.q('complete', { url: a, data: 'arraybuffer' === k.responseType || 'json' === k.responseType ? k.response : k.responseText })
- : 404 === k.status && (k.abort(), f.q('error', { url: a, data: '404' }))
- }
- k.onerror = function (b) {
- k.abort()
- f.q('error', { url: a, data: b })
- }
- k.open(b || 'GET', a)
- 'POST' === b && k.setRequestHeader('Content-Type', d || 'application/x-www-form-urlencoded')
- e && (k.responseType = e)
- k.send(c || void 0)
- }
- },
- abort: function () {
- this.K$.abort()
- },
- })
- for (
- var $ = {
- v: '1.4.17',
- Pixel: g.H,
- LngLat: g.U,
- Size: g.xd,
- Bounds: g.oe,
- ArrayBounds: g.tp,
- PixelBounds: g.Wf,
- Panorama: g.Zaa,
- PanoramaMarker: g.$aa,
- Map: z.Rb,
- View2D: z.NF,
- GroundImage: z.o.ML,
- Marker: z.B.vb,
- ImageMarker: z.B.GAa,
- Text: z.B.KW,
- Icon: z.B.ci,
- MarkerShape: z.B.Paa,
- Polyline: z.B.Zb,
- BezierCurve: z.B.sA,
- Polygon: z.B.Dc,
- Circle: z.B.gh,
- CircleMarker: z.B.VV,
- Ellipse: z.B.Et,
- Rectangle: z.B.Lt,
- ContextMenu: z.B.Tn,
- InfoWindow: z.B.Ye,
- Buildings: z.o.W$,
- TileLayer: z.o.rb,
- ImageLayer: z.o.BA,
- CanvasLayer: z.o.Y$,
- VideoLayer: z.o.Gba,
- VectorLayer: z.o.fd,
- MassMarks: z.o.Raa,
- CompositeLayer: z.o.baa,
- LabelsLayer: z.o.qr,
- LabelMarker: z.B.Iaa,
- LayerGroup: z.o.RL,
- OverlayGroup: z.B.Wn,
- GeoJSON: z.B.fW,
- CANVAS: 'canvas',
- DOM: 'dom',
- convertFrom: g.qI,
- Http: { JSONP: g.jb.zb },
- event: { CLASS_NAME: 'AMap.event' },
- },
- Ic = 'addDomListener addDomListenerOnce addListener addListenerOnce clearInstanceListeners clearListeners removeListener trigger'.split(' '),
- Jc = 0;
- Jc < Ic.length;
- Jc += 1
- )
- $.event[Ic[Jc]] = (function () {
- var a = g.event[Ic[Jc]],
- b = Ic[Jc]
- return function () {
- g.c.ya($.event)
- g.c.add($.event, b)
- return a.apply(g.event, Array.prototype.slice.call(arguments))
- }
- })()
- $.GeometryUtil = { CLASS_NAME: 'AMap.GeometryUtil' }
- for (
- var Kc =
- 'distance ringArea isClockwise makesureClockwise makesureAntiClockwise distanceOfLine ringRingClip doesSegmentsIntersect doesSegmentLineIntersect doesSegmentRingIntersect doesSegmentPolygonIntersect doesLineLineIntersect doesLineRingIntersect doesPolygonPolygonIntersect doesRingRingIntersect isPointInRing isRingInRing isPointInPolygon isPointOnSegment isPointOnLine isPointOnRing isPointOnPolygon closestOnSegment closestOnLine distanceToSegment distanceToLine distanceToPolygon'.split(
- ' '
- ),
- Jc = 0;
- Jc < Kc.length;
- Jc += 1
- )
- $.GeometryUtil[Kc[Jc]] = (function () {
- var a = g.Ft[Kc[Jc]],
- b = Kc[Jc]
- return function () {
- g.c.ya($.GeometryUtil)
- g.c.add($.GeometryUtil, b)
- return a.apply(g.Ft, Array.prototype.slice.call(arguments))
- }
- })()
- $.GeometryUtil.triangulateShape = function (a, b) {
- g.c.ya($.GeometryUtil)
- g.c.add($.GeometryUtil, 'triangulateShape')
- a = g.Zn.normalize(a)
- b = g.Zn.normalize(b)
- return g.Zn.Vh(a, b)
- }
- $.PlaneGeometryUtil = { CLASS_NAME: 'AMap.PlaneGeometryUtil' }
- for (Jc = 0; Jc < Kc.length; Jc += 1)
- $.PlaneGeometryUtil[Kc[Jc]] = (function () {
- var a = g.di[Kc[Jc]],
- b = Kc[Jc]
- return function () {
- g.c.ya($.PlaneGeometryUtil)
- g.c.add($.PlaneGeometryUtil, b)
- return a.apply(g.di, Array.prototype.slice.call(arguments))
- }
- })()
- $.PlaneGeometryUtil.triangulateShape = function (a, b) {
- g.c.ya($.PlaneGeometryUtil)
- g.c.add($.PlaneGeometryUtil, 'triangulateShape')
- a = g.Zn.normalize(a)
- b = g.Zn.normalize(b)
- return g.Zn.Vh(a, b)
- }
- $.plugin = $.service = z.Rb.prototype.plugin
- $.TileLayer.Satellite = z.o.rb.EW
- $.TileLayer.RoadNet = z.o.rb.AW
- $.TileLayer.google = z.o.rb.LL
- $.TileLayer.Flexible = z.o.rb.yA
- $.TileLayer.WMS = z.o.rb.Hba
- $.TileLayer.WMTS = z.o.rb.Iba
- $.TileLayer.Traffic = z.o.rb.MW
- $.Panorama.Events = z.event
- $.TileLayer.PanoramaLayer = z.o.rb.OAa
- $.UA = { ie: g.l.Es, ielt9: g.l.Ue, ielt11: g.l.$ra, mobile: g.l.ba, android: g.l.Xl, ios: g.l.ED }
- $.Browser = {
- ua: navigator.userAgent,
- mobile: g.l.ba,
- plat: g.l.Dz,
- mac: g.l.nz,
- windows: g.l.$za,
- ios: g.l.ED,
- iPad: g.l.Tra,
- iPhone: g.l.Ura,
- android: g.l.Xl,
- android23: g.l.cma,
- chrome: g.l.chrome,
- firefox: g.l.bR,
- safari: g.l.AE,
- wechat: g.l.C$,
- uc: g.l.oza,
- qq: g.l.ewa,
- ie: g.l.Es,
- ie6: g.l.zi,
- ie7: g.l.sv,
- ie8: g.l.Ue && !g.l.sv && !g.l.zi,
- ie9: g.l.j5,
- ie10: g.l.i5,
- ie11: g.l.Xra,
- edge: g.l.spa,
- ielt9: g.l.Ue,
- baidu: g.l.VH,
- isLocalStorage: g.l.Gv,
- isGeolocation: !!navigator.geolocation,
- mobileWebkit: g.l.jua,
- mobileWebkit3d: g.l.G6,
- mobileOpera: !!g.l.iua,
- retina: g.l.Jc,
- touch: !!g.l.Tf,
- msPointer: !!g.l.I6,
- pointer: !!g.l.FT,
- webkit: g.l.B$,
- ie3d: g.l.Yra,
- webkit3d: g.l.CL,
- gecko3d: g.l.jqa,
- opera3d: g.l.bva,
- any3d: g.l.RH,
- isCanvas: g.l.il,
- isSvg: g.l.En,
- isVML: g.l.Es,
- isWorker: !!window.Worker,
- isWebsocket: !!window.WebSocket,
- isWebGL: function () {
- for (var a = document.createElement('canvas'), b = ['webgl', 'experimental-webgl', 'moz-webgl'], c = null, d = 0; d < b.length; d += 1) {
- try {
- c = a.getContext(b[d])
- } catch (e) {}
- if (c)
- if (c.drawingBufferWidth !== a.width || c.drawingBufferHeight !== a.height) break
- else return !0
- }
- return !1
- },
- }
- $.Util = { CLASS_NAME: 'AMap.Util' }
- var Lc = {
- colorNameToHex: g.a.lI,
- rgbHex2Rgba: g.a.B8,
- argbHex2Rgba: g.a.Rr,
- isEmpty: g.a.uh,
- deleteItemFromArray: g.a.Ay,
- deleteItemFromArrayByIndex: g.a.Fo,
- indexOf: g.a.indexOf,
- format: g.a.wb,
- isArray: g.a.isArray,
- isDOM: g.a.EJ,
- includes: g.a.ka,
- requestIdleCallback: g.a.qU,
- cancelIdleCallback: g.a.$P,
- requestAnimFrame: g.a.Wc,
- cancelAnimFrame: g.a.ri,
- color2RgbaArray: g.a.Zl,
- color2Rgba: g.a.Ona,
- }
- for (Jc in Lc)
- Lc.hasOwnProperty(Jc) &&
- 'function' == typeof Lc[Jc] &&
- ($.Util[Jc] = (function () {
- var a = Jc
- return function () {
- g.c.ya($.Util)
- g.c.add($.Util, a)
- return Lc[a].apply(g.a, Array.prototype.slice.call(arguments))
- }
- })())
- $.DomUtil = { CLASS_NAME: 'AMap.DomUtil' }
- var Mc = {
- getViewport: g.f.lJ,
- getViewportOffset: g.f.RR,
- create: g.f.create,
- setClass: g.f.sxa,
- hasClass: g.f.zn,
- addClass: g.f.Wa,
- removeClass: g.f.eb,
- setOpacity: g.f.Xq,
- rotate: g.f.rotate,
- setCss: g.f.$a,
- empty: g.f.Iz,
- remove: g.f.remove,
- TRANSFORM: g.f.pg,
- TRANSITION: g.f.JF,
- }
- for (Jc in Mc)
- Mc.hasOwnProperty(Jc) &&
- 'function' == typeof Mc[Jc] &&
- ($.DomUtil[Jc] = (function () {
- var a = Jc
- return function () {
- g.c.ya($.DomUtil)
- g.c.add($.DomUtil, a)
- return Mc[a].apply(g.f, Array.prototype.slice.call(arguments))
- }
- })())
- var Nc = g.r
- $.User = { key: Nc.key }
- window.AMap = $
- window.AMap.BuryPoint = g.BuryPoint
- window.AMap.Class = g.da
- g.Kj = g.da.extend({
- A: function (a, b, c, d) {
- this.start = a
- this.end = b
- this.transition = c
- this.precision = d || 0
- this.Zv = !1
- this.update = g.a.bind(this.update, this)
- return this
- },
- Nn: function (a) {
- this.hh = this.startTime = +new Date()
- this.frames = 0
- this.Zv = !0
- this.yo = g.a.Wc(this.update)
- this.Qia = g.a.bind(this.Jq, a || this)
- },
- update: function () {
- this.frames += 1
- var a = +new Date(),
- b = a - this.startTime,
- b = this.transition ? this.transition(this.start, this.end, b, this.frames, a - this.hh) : null
- 'number' === typeof b && Math.abs(b - this.end) < this.precision ? (this.stop(), (b = this.end)) : (this.yo = g.a.Wc(this.update))
- this.hh = a
- this.Qia(b)
- },
- stop: function (a) {
- g.a.ri(this.yo)
- a && this.update()
- this.Zv = !1
- },
- })
- g.Kj.Easing = {
- Linear: {
- None: function (a) {
- return a
- },
- },
- Bounce: {
- In: function (a) {
- return (
- 1 -
- (a < 1 / 2.75
- ? 7.5625 * a * a
- : a < 2 / 2.75
- ? 7.5625 * (a -= 1.5 / 2.75) * a + 0.75
- : a < 2.5 / 2.75
- ? 7.5625 * (a -= 2.25 / 2.75) * a + 0.9375
- : 7.5625 * (a -= 2.625 / 2.75) * a + 0.984375)
- )
- },
- Out: function (a) {
- return g.Kj.Easing.Bounce.In(1 - a)
- },
- },
- Cubic: {
- In: function (a) {
- return 1 - a * a * a
- },
- Out: function (a) {
- a = 1 - a
- return 1 - a * a * a
- },
- },
- }
- g.Rb = g.da.extend({
- ka: [g.va, g.Ze, g.RJ],
- A: function (a, b) {
- this.oc = g.a.bind(this.oc, this)
- this.D = b
- this.mj = b.mj
- this.Bm = ''
- this.rg = this.Jf = this.ej = !1
- this.Tm = {}
- this.K = a
- this.Vga()
- this.tsa()
- this.X('zooms', b, !0)
- this.X('size', b, !0)
- this.X('limitBounds', b)
- this.X('view', b)
- this.X('nolimg', b, !0)
- this.X('mapNumber', b, !0)
- this.X('lang', b, !0)
- this.X('features', b, !0)
- this.X('styleID', b, !0)
- this.X('forceBig', b, !0)
- this.X('mode', b, !0)
- this.X('showBuildingBlock', b, !0)
- this.X('mapStyle', b)
- var c = this.get('mapStyle')
- this.De = g.r.De[c] || g.r.De['default']
- this.KH = '#a3ccff'
- this.ou = b.get('skyColor') || '#cce0ff'
- g.r.RQ && this.X('editEnable', b)
- g.r.RQ && this.Bd ? this.X('style', b, !0) : this.X('styleUrl', b)
- this.X('hightlight', b, !0)
- this.X('labelzIndex', b, !0)
- if (g.l.bL) {
- c = new z.o.rb({ innerLayer: !0, zIndex: b.get('labelzIndex'), visible: !1 })
- this.Gc = new g.o.Pj(c, this, ['point', 'road'])
- this.Gc.type = '\u77e2\u91cf\u6807\u6ce8'
- var d = this.D.get('defaultLayer')
- d && c.X('rejectMapMask', d, !0)
- b.labelsLayer = this.Gc.S
- this.Gc.S.h('complete', this.Br, this, !0)
- this.Gc.S.h('renderComplete', this.Br, this)
- this.Gc.yB = this.Gc.Ci = !0
- }
- this.X('isHotspot', b, !0)
- this.X('layers', b)
- this.X('overlays', b)
- this.X('infos', b, !0)
- this.X('contextmenus', b, !0)
- this.X('controls', b)
- this.X('bounds', b)
- this.X('draw', b)
- this.af('zoomAndCenter destroy defaultCursor jogEnable animateEnable baseRender overlayRender vectorMapForeign'.split(' '), b)
- this.af('rotateEnable pitchEnable dragEnable keyboardEnable doubleClickZoom scrollWheel zoomEnable touchZoom'.split(' '), b, !0)
- this.get('jogEnable') ? (this.vv = !0) : (this.vv = !1)
- this.kga()
- this.rga()
- this.EG && this.EG()
- this.X('resizeEnable', b)
- this.D.map = this
- c = this.get('size')
- c = (c.width * c.height) / 65536
- g.l.Jc && 3 < c && (this.WH = !0)
- this.V = { Ad: !1 }
- this.LK()
- },
- editEnableChanged: function () {
- this.Bd = this.get('editEnable')
- },
- labelzIndexChanged: function () {
- this.Gc && this.Gc.set('zIndex', this.get('labelzIndex'))
- },
- styleChanged: function () {
- this.Fi = !0
- },
- mapStyleChanged: function () {
- if (this.D.Bi) {
- this.Bm && (this.set('style', ''), (this.Nu = this.Bm = ''))
- var a = this.get('mapStyle')
- this.Fi = !0
- this.De = g.r.De[a] || g.r.De['default']
- this.tE()
- }
- },
- styleUrlChanged: function () {
- if (this.D.Bi) {
- var a = this.get('styleUrl') || ''
- if (a !== this.Bm) {
- var b = -1 !== a.indexOf('?isPublic=true'),
- a = a.substr(0, 46),
- c = a.split('amap://styles/')[1]
- 'normal' === c
- ? ((this.Bm = ''), this.set('nolimg', !!this.D.get('nolimg_param')), this.set('style', ''), (this.Nu = ''))
- : ((this.hA = !0),
- this.set('nolimg', !0),
- (b = new g.jb.zb(
- 32 > c.length
- ? g.r.tc + '://webapi.amap.com/style2?name=' + c + '&key=' + g.r.key
- : g.r.tc + '://webapi.amap.com/v4/map/styles2?styleid=' + c + '&s=rsv3&key=' + g.r.key + (b ? '&ispublic=1' : ''),
- { callback: 'callback' }
- )),
- b.h(
- 'complete',
- function (a) {
- a.data && a.data.layer && this.set('layerStyle', JSON.parse(a.data.layer))
- a.data && a.data.content ? this.set('style', JSON.parse(a.data.content)) : this.set('style', '')
- this.hA = !1
- },
- this
- ),
- b.h(
- 'error',
- function () {
- this.hA = !1
- },
- this
- ),
- (this.Bm = a),
- this.tE())
- }
- }
- },
- R8: function (a) {
- this.K.style.background = a
- },
- lqa: function (a) {
- var b = this.get('center')
- if (a.contains(b)) return null
- a = g.Ft.closestOnLine(b, a.dV().path)
- return new g.U(a[0], a[1])
- },
- lna: function () {
- var a = this.get('limitBounds'),
- b = this.get('bounds')
- b.wc && b.wc.R > b.nc.R && (b.nc.R += 360)
- if (!a.contains(b)) {
- if (b instanceof g.tp) return this.lqa(a, b)
- var c = this.get('center').cb()
- a.vj() < b.vj() ? (c.R = a.xi().R) : (a.wc.R > b.wc.R && (c.R += a.wc.R - b.wc.R), a.nc.R < b.nc.R && (c.R += a.nc.R - b.nc.R))
- a.tj() < b.tj() ? (c.Q = a.xi().Q) : (a.wc.Q > b.wc.Q && (c.Q += a.wc.Q - b.wc.Q), a.nc.Q < b.nc.Q && (c.Q += a.nc.Q - b.nc.Q))
- return c
- }
- },
- WO: function () {
- var a = this.OU
- this.D.refreshSize()
- var b = this.get('size')
- b && a && !b.gb(a) && ((this.OU = b), (this.ht = !0), this.set('display'), this.y8(b), this.get('resizeEnable') && this.qa('resize', { Cua: a, S6: b }))
- },
- m0: function () {
- var a = this
- a.WO()
- a.QO = setTimeout(function () {
- a.m0()
- }, 200)
- },
- pda: function () {
- this.QO && (clearTimeout(this.QO), (this.QO = null))
- },
- Vga: function () {
- this.D.C = !0
- this.OU = this.D.getSize()
- this.D.C = !1
- if (g.l.Ue || (g.l.C$ && g.l.ED) || g.l.Xta) this.m0()
- else {
- var a = this
- g.F.Xla(this.K, function (b) {
- a.WO(b)
- })
- }
- },
- tsa: function () {
- var a = this.K
- g.f.Wa(a, 'amap-container')
- var b = {}
- b.$c = g.f.create('div', a, 'amap-maps')
- this.Ml = g.f.create('div', a)
- this.Ml.style.display = 'none'
- b.Xr = g.f.create('div', b.$c, 'amap-drags')
- b.o = g.f.create('div', b.Xr, 'amap-layers')
- b.B = g.f.create('div', b.Xr, 'amap-overlays')
- b.controls = g.f.create('div', a, 'amap-controls')
- b.YS = g.f.create('a', a, 'amap-logo')
- g.f.create('img', b.YS).src = g.l.Jc ? this.D.w.logoUrlRetina : this.D.w.logoUrl
- b.rn = g.f.create('div', a, 'amap-copyright')
- b.rn.style.display = 'none'
- 350 < g.f.lJ(this.K).width && ((b.rn.innerHTML = this.D.w.copyright), (b.rn.v6 = g.f.create('span', b.rn, 'amap-mcode')), this.tE())
- this.Xa = b
- },
- tE: function () {
- var a = this.get('layers')
- if (a) {
- for (var b = -1, c = '', d = 0; d < a.length; d += 1) {
- var e = a[d].get('mapNumber'),
- f = a[d].get('zIndex', null, !0)
- e && f > b && a[d].get('visible') && ((c = e), (b = f))
- }
- this.set('mapNumber', c)
- this.D.C = !0
- a = this.D.getMapStyle()
- this.D.C = !1
- 'GS(2019)6379' === c && a && 'normal' !== a && 'amap://styles/normal' !== a && ((c = ''), (this.Xa.rn.style.visibility = 'hidden'))
- c && this.Xa.rn.v6 && ((this.Xa.rn.v6.innerHTML = '- ' + c + '\u53f7'), (this.Xa.rn.style.visibility = 'visible'))
- return c
- }
- },
- zY: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : !1
- g.Nj &&
- (a
- ? g.Nj.flush()
- : this.F3 ||
- (this.F3 = g.a.Wc(function () {
- g.Nj.flush()
- this.F3 = null
- }, this)))
- },
- cU: function (a) {
- var b = this,
- c = this.D.get('rasterLayer')
- c &&
- (this.D.set('rasterLayer', void 0),
- (this.D.d8 = !0),
- (this.D.Sv = this.D.Ra),
- this.vi && (this.vi.vD = !1),
- c.o && (c.o.XD = !0),
- a ||
- (this.dU = g.a.qU(function () {
- b.dU = null
- b.D && b.D.sk(c)
- })))
- a && this.dU && g.a.$P(this.dU)
- },
- Br: function () {
- function a() {
- for (var a = d.get('layers'), b = d.get('zoom'), c = 0; c < a.length; c += 1) {
- var e = a[c].get('zooms')
- if (
- !(
- a[c].zj ||
- a[c].Sv ||
- a[c].s5 ||
- !e ||
- b > e[1] ||
- b < e[0] ||
- !a[c].get('visible') ||
- (a[c].o && a[c].o.ga && 0 === a[c].o.ga.length) ||
- (a[c].o && a[c].o.XD) ||
- (a[c].o && a[c].o.Ra)
- )
- )
- return !1
- }
- a = d.D.get('features')
- return ('all' === a || g.a.ka(a, 'point')) && d.Gc && d.Gc.get('visible') && 0 < d.Gc.ga.length && !d.Gc.Ra && !d.Gc.po ? !1 : !0
- }
- function b() {
- d.D && d.D.qm && d.D.qm.OB && d.D.qm.OB()
- d.D.W7 = 1
- d.zY()
- d.set('display')
- d.NS = !0
- }
- function c() {
- g.a.Wc(function () {
- this.q('complete')
- }, d)
- d.D.Ra = !0
- d.set('display')
- }
- if (!this.vI)
- if (this.NS) this.zY()
- else {
- var d = this,
- e = this.D.get('rasterLayer'),
- f = a()
- e ? (e.o && e.o.Ra && (this.D.Ra || c()), f && (this.D.Ra || c(), this.cU(), b())) : f && (this.D.Ra || c(), b(), (this.D.d8 = !0))
- }
- },
- layersChanged: function () {
- this.la = this.la || []
- for (var a = this.get('layers'), b = this.la.length - 1; 0 <= b; b -= 1)
- this.la[b] === this.td ||
- this.la[b] === this.Zs ||
- this.la[b].yB ||
- this.la[b].S.yB ||
- -1 !== g.a.indexOf(a, this.la[b].S) ||
- (this.la[b].gg(), this.la[b].Hj && this.la[b].Hj.gg(), this.la[b].S.G('complete', this.Br, this), this.la[b].S.G('renderComplete', this.Br, this), (this.la = g.a.Fo(this.la, b)))
- for (var c = !1, d = !0, e = this.get('labelzIndex'), b = 0; b < a.length; b += 1)
- if (!a[b].s5)
- if (a[b].qi) -1 === g.a.indexOf(this.la, a[b].o) && this.la.push(a[b].o)
- else {
- var f = this.bg(a[b])
- f && (this.la.push(f), (a[b].qi = !0), (a[b].o = f))
- a[b].h('complete', this.Br, this, !0)
- a[b].h('renderComplete', this.Br, this)
- }
- for (b = 0; b < this.la.length; b += 1) (f = this.la[b].S), f.Gq && f.get('visible') && ((c = !0), !1 === f.get('detectRetina') && (d = !1), (e = f.get('textIndex') || e))
- this.Gc &&
- (c || '3D' !== this.D.view.type
- ? (this.Gc.po = !1)
- : ((c = g.a.find(a, function (a) {
- if (z.o.Ht && a instanceof z.o.Ht && a.get('visible')) return !0
- })),
- (this.Gc.po = c = !!c)))
- a = g.a.indexOf(this.la, this.Gc)
- c && this.D.get('showLabel')
- ? (-1 === a && this.la.push(this.Gc),
- (this.Gc.ja = d && g.l.ja),
- this.Gc.AC(this.get('mapStyle') || 'normal'),
- this.Gc.set('zIndex', e),
- this.Gc.set('visible', !0),
- (this.D.uD = !0),
- this.D.get('isHotspot') ? this.Gc.Vua() : this.Gc.iQ())
- : (this.Gc && (this.Gc.set('visible', !1), (this.D.uD = !1), this.Gc.iQ()), (this.D.uD = !1))
- this.D.isHotspotChanged()
- this.set('display', 0)
- this.tE()
- },
- isHotspotChanged: function () {
- this.layersChanged()
- },
- controlsChanged: function () {
- var a = this.get('controls'),
- b,
- c
- if (a.add && 0 < a.add.length) for (; 0 < a.add.length; ) (b = a.add.shift()), (c = b.xu || b.addTo) && c.call(b, this.D, this.Xa.controls)
- else if (a.remove && a.remove.length) for (; 0 < a.remove.length; ) (b = a.remove.shift()), (c = b.Uv || b.removeFrom) && c.call(b, this.D, this.Xa.controls)
- },
- z1: function () {
- if (!this.vI) {
- var a = this
- this.E1 = !1
- a.td || ((a.td = new g.o.fd(new z.o.fd(), a)), (a.td.Af = 36), (a.td.ig = 36), a.td.set('zIndex', 120), a.la.push(a.td), (a.td.WC = !0))
- for (var b = a.get('overlays'), c = [], d = 0; d < a.Vc.length; d += 1)
- -1 === g.a.indexOf(b, a.Vc[d].Lb) &&
- (a.Vc[d].Lb instanceof z.B.Ye || a.Vc[d].Lb instanceof z.B.Tn
- ? a.Vc[d].gg()
- : (a.td && a.Vc[d] instanceof g.B.vb ? ((a.td.ah = g.a.Ay(a.td.ah, a.Vc[d].L)), a.td.k8([a.Vc[d].L])) : a.Zs && a.Zs.k8([a.Vc[d].L]),
- a.Vc[d].L.fa
- ? (g.f.remove(a.Vc[d].L.fa), (a.Vc[d].L.fa = null))
- : a.Vc[d].L.Ma && (g.f.remove(a.Vc[d].L.Ma.Oh), g.f.remove(a.Vc[d].L.Ma.Qc), g.f.remove(a.Vc[d].L.Ma.dir), (a.Vc[d].L.Ma = null)),
- a.Vc[d].Gn && a.Vc[d].Gn.stop(),
- a.Vc[d].yh && a.Vc[d].yh.stop(),
- (a.Vc[d].Lb.qi = !1),
- a.Vc[d].Lb.yl(),
- (a.Vc[d].Lb.B = null),
- (a.Vc[d].Lb = null),
- a.Vc[d].L.Soa(),
- (a.Vc[d].L = null),
- a.Vc[d].yl(),
- (a.Vc[d].Ce = null),
- a.Vc[d].ti(),
- (a.Vc[d].map = null)),
- c.push(a.Vc[d]))
- for (d = 0; d < c.length; d += 1) a.Vc = g.a.Fo(a.Vc, g.a.indexOf(a.Vc, c[d]))
- var e = [],
- f = []
- g.a.nxa(function (b) {
- if (!b.qi && b.$g) {
- var c = b.B || a.Rma(b)
- c && (a.Vc.push(c), c instanceof g.B.Ye || c instanceof g.B.Tn ? c.Ts(a) : c instanceof g.B.vb ? e.push(c.L) : f.push(c.L), (b.qi = !0))
- }
- }, b)
- e.length && a.td.ay(e)
- f.length && (a.Zs || ((a.Zs = new g.o.fd(new z.o.fd(), a)), a.Zs.set('zIndex', 110), a.la.push(a.Zs)), a.Zs.ay(f))
- a.set('display', 0)
- }
- },
- overlaysChanged: function () {
- this.Vc = this.Vc || []
- this.get('overlays') && 0 === this.get('overlays').length ? this.z1() : this.E1 || (g.a.Wc(this.z1, this), (this.E1 = !0))
- },
- contextmenusChanged: function () {
- var a = this.get('contextmenu')
- if (a) {
- var b = this
- g.tb.load('overlay', function () {
- b.ry = new g.B.Tn(a, b)
- b.set('display', 0)
- })
- }
- },
- infosChanged: function () {
- var a = this.get('infos')
- if (a) {
- this.rm = this.rm || {}
- var b,
- c = this
- g.tb.load('overlay', function () {
- for (var d in a) a.hasOwnProperty(d) && ((b = a[d]), (c.rm[d] = c.rm[d] || new g.B.Ye(b, c)))
- })
- }
- },
- Rma: function (a) {
- var b = null
- if (a instanceof z.B.vb) b = new g.B.vb(a, this)
- else if (a instanceof z.B.Tn) b = new g.B.Tn(a, this)
- else if (a instanceof z.B.Ye) b = new g.B.Ye(a, this)
- else {
- var c = ['overlay']
- 'd' === this.get('overlayRender') ? (c.push('dvector'), g.l.En ? c.push('svg') : c.push('vml')) : c.push('cvector')
- if (!this.Kza && !g.tb.ID(c)) {
- var d = this
- g.tb.Fg(c, function () {
- this.Kza = !0
- d.overlaysChanged()
- })
- return
- }
- a instanceof z.B.Dc
- ? (b = new g.B.Dc(a, this))
- : a instanceof z.B.sA
- ? (b = new g.B.sA(a, this))
- : a instanceof z.B.Zb
- ? (b = new g.B.Zb(a, this))
- : a instanceof z.B.gh
- ? (b = new g.B.gh(a, this))
- : a instanceof z.B.Et
- ? (b = new g.B.Dc(a, this))
- : a instanceof z.B.Lt && (b = new g.B.Dc(a, this))
- }
- return b
- },
- N3: function () {
- var a = this.De
- this.Nu && (!this.Re || !this.Re.Hp || (this.D && this.D.js)) && (a = 'function' === typeof this.Nu ? this.Nu(this.vi.P.zoom) : this.Nu)
- return a
- },
- JCa: function () {
- function a() {}
- var b = new g.o.fd(),
- c = [],
- d = new g.U(116.405467, 39.907761)
- new g.style.Ng.ci()
- for (var e = 0; 100 > e; e += 1)
- for (var f = 0; 100 > f; f += 1) {
- var h = new g.U(d.R + 0.02 * f, d.Q + 0.02 * e),
- h = new g.ai({ name: 'point' + (100 * e + f), map: this, W: new g.Aa.Mg(this.Bb(h)) })
- c[100 * e + f] = h
- h.h('hover', a, h)
- }
- b.ay(c)
- this.la.push(b)
- },
- mc: function () {},
- HCa: function (a) {
- var b = new g.o.fd(),
- c = [],
- c = new g.raa({ map: this }).RT(a)
- b.ay(c)
- this.la.push(b)
- this.set('display', 0)
- },
- bg: function (a) {
- var b = this
- a = a.bg(this)
- if (!a) return null
- if (a.length && 'string' == typeof a[0])
- g.tb.Fg(a, function () {
- b.layersChanged()
- })
- else return a
- return null
- },
- CEa: function () {
- return this.Xa
- },
- SGa: function () {
- this.set('display', 0)
- },
- displayChanged: function (a) {
- this.r1 || this.LK(a)
- },
- LK: function (a) {
- if (a)
- if ((g.a.ri(this.xE), g.l.Xl)) {
- var b = this
- setTimeout(function () {
- b.oc()
- }, 0)
- } else this.oc()
- else this.Dw || ((this.xE = g.a.Wc(this.oc)), (this.Dw = !0))
- },
- oc: function () {
- this.xE = null
- if (!this.vI) {
- this.q('render')
- this.Dw = !1
- var a = {}
- if (this.la && ((a.size = this.D.get('size')), a.size.width && a.size.height)) {
- for (var b = this.D.view.type, c = [], d = 0, e = this.la.length; d < e; d += 1)
- this.la[d].Uf && this.la[d].Uf !== b ? (this.la[d].Ra = !0) : (c.push(this.la[d]), this.la[d].Hj && c.push(this.la[d].Hj))
- c.sort(function (a, b) {
- var c = a.get('zIndex'),
- d = b.get('zIndex')
- return c > d ? 1 : c === d ? (a.ex > b.ex ? 1 : -1) : -1
- })
- a.la = c
- c = g.l.ja ? Math.min(window.devicePixelRatio || 1, 2) : 1
- a.W1 = 15e5 < a.size.width * a.size.height * c * c
- a.vD = !!this.D.get('rasterLayer')
- a.ba = g.l.ba
- a.lang = this.get('lang')
- a.P = this.D.rD()
- a.Uf = b
- this.D.C = !0
- a.T = this.D.getResolution([0, 0])
- a.Dq = this.D.get('mapStyle')
- a.Fi = this.Fi
- this.D.C = !1
- a.Ad = this.rg
- a.Yoa = this.Tm
- a.ge = this.ej
- a.gf = this.Jf
- a.SE = this.Jf && g.l.ba
- a.jL = g.l.ba && this.ej
- a.nt = g.l.ba && this.rg
- this.nt = a.nt
- b = this.get('targetLevel') || a.P.zoom
- a.sp = a.P.zoom > b
- a.Gf = a.P.zoom > b ? 'zoomOut' : a.P.zoom < b ? 'zoomIn' : 'stable'
- a.rua = !0
- a.WH = this.WH
- for (var b = !1, f, c = !1, d = 0; d < this.la.length; d += 1)
- this.la[d].Di && this.la[d].S.get('visible') && a.P.zoom <= this.la[d].S.get('zooms')[1] && (a.hU = !0), this.la[d].me().Jc && (b = !0)
- for (d = 0; d < this.la.length; d += 1)
- this.la[d].S.NP && a.hU && (!this.ej && this.la[d].S.get('visible') && ((f = this.la[d].S.NP()), (f.kFa = 1), (f.zoom = a.P.zoom)), (c = !0))
- this.nb = []
- c && f && this.nb !== f && (this.nb = f)
- a.nb = this.nb
- a.Jc = b
- a.scale = Math.pow(2, a.P.zoom - a.P.ne)
- this.vi = a
- this.Nc = this.D.get('mask')
- a.Nc = this.Nc
- a.UJ = this.UJ
- if ((f = this.Oy())) f.oc(a), (this.Fi = this.hR = this.UJ = !1)
- }
- }
- },
- Pq: function (a) {
- if (!this.vI) {
- var b = {}
- if (this.la && ((b.size = this.D.get('size')), b.size.width && b.size.height)) {
- for (var c = this.D.view.type, d = [], e = 0, f = this.la.length; e < f; e += 1)
- (this.la[e].Uf && this.la[e].Uf !== c) || !(this.la[e] instanceof g.o.Nm) || 0 > a.indexOf(this.la[e].S) || (d.push(this.la[e]), this.la[e].Hj && d.push(this.la[e].Hj))
- d.sort(function (a, b) {
- var c = a.get('zIndex'),
- d = b.get('zIndex')
- return c > d ? 1 : c === d ? (a.ex > b.ex ? 1 : -1) : -1
- })
- b.la = d
- a = g.l.ja ? Math.min(window.devicePixelRatio || 1, 2) : 1
- b.W1 = 15e5 < b.size.width * b.size.height * a * a
- b.vD = !!this.D.get('rasterLayer')
- b.ba = g.l.ba
- b.lang = this.get('lang')
- b.P = this.D.rD()
- b.Uf = c
- this.D.C = !0
- b.T = this.D.getResolution([0, 0])
- b.Dq = this.D.get('mapStyle')
- b.Fi = this.Fi
- this.D.C = !1
- b.Ad = this.rg
- b.Yoa = this.Tm
- b.ge = this.ej
- b.gf = this.Jf
- b.SE = this.Jf && g.l.ba
- b.jL = g.l.ba && this.ej
- b.nt = g.l.ba && this.rg
- this.nt = b.nt
- c = this.get('targetLevel') || b.P.zoom
- b.sp = b.P.zoom > c
- b.Gf = b.P.zoom > c ? 'zoomOut' : b.P.zoom < c ? 'zoomIn' : 'stable'
- b.rua = !0
- b.WH = this.WH
- c = !1
- for (a = 0; a < this.la.length; a += 1) this.la[a].me().Jc && (c = !0)
- this.nb = []
- b.nb = this.nb
- b.Jc = c
- b.scale = Math.pow(2, b.P.zoom - b.P.ne)
- this.vi = b
- this.Nc = this.D.get('mask')
- b.Nc = this.Nc
- ;(c = this.Oy()) && c.Pq(b)
- }
- }
- },
- Oy: function () {
- if (!this.J || this.J.type !== this.D.view.type || this.J.Mta)
- if (((this.J = null), '3D' == this.D.view.type)) {
- var a = this
- g.tb.load('Map3D', function () {
- a.J || ((a.J = new g.Ea.BF(a)), a.set('display'))
- })
- } else this.J = new g.M.canvas.Rb(this)
- return this.J
- },
- wqa: function () {
- var a = [],
- b = this.get('controls').Ld,
- c
- for (c in b) b[c].Qy && b[c].Qy() && a.push(b[c].Qy())
- return a
- },
- destroyChanged: function () {
- this.vI = 1
- this.cU(!0)
- this.V = {}
- this.Gc && (this.Gc.S.G('complete', this.Br, this), this.Gc.gg(), (this.la = g.a.Fo(this.la, g.a.indexOf(this.la, this.Gc))))
- this.Re && this.Re.he && this.Re.he.S && this.Re.he.S.setMap()
- this.Oka && clearTimeout(this.Oka)
- this.ska()
- this.vha()
- this.zO && this.zO()
- this.yla()
- this.yl()
- this.D = this.D.map = null
- this.K = this.K.___amap___ = null
- this.ti()
- this.He && (this.He.stop(), (this.He = null))
- this.Vf && (this.Vf.stop(), (this.Vf = null))
- this.Fd && (this.Fd.stop(), (this.Fd = null))
- this.J && this.J.Kf && this.J.Kf()
- this.J = null
- },
- yla: function () {
- var a = this.K
- this.pda()
- g.F.Cna(a)
- g.f.Iz(a)
- this.Ml = null
- g.f.eb(a, 'amap-container')
- this.Xa = null
- },
- jogEnableChanged: function () {
- this.get('jogEnable') ? (this.vv = !0) : (this.vv = !1)
- },
- drawChanged: function () {
- var a = this,
- b,
- c,
- d = this.get('draw')
- if (d) {
- this.tq || (this.tq = [])
- b = 0
- for (c = this.tq.length; b < c; b += 1) this.tq[b].wwa()
- g.tb.load('interaction', function () {
- var b = new g.IAa({ type: d, o: a.Zs }, a)
- a.tq.push(b)
- a.loaded = !0
- })
- } else if (this.tq) for (b = 0, c = this.tq.length; b < c; b += 1) this.tq[b].wwa(), this.tq[b].fDa(), this.G('click', this.tq[b].SEa, this)
- },
- Xd: function (a, b, c) {
- return this.D.view.Xd(a, b, c)
- },
- yg: function (a, b, c) {
- return this.D.view.yg(a, b, c)
- },
- E4: function (a, b) {
- var c = this.get('size'),
- d = document.createElement('canvas')
- a = a || c.width
- b = b || c.height
- d.width = a
- d.height = b
- for (var e = -(c.width - a) / 2, c = -(c.height - b) / 2, f = d.getContext('2d'), h = this.Xa.o.childNodes, k = [], l = 0; l < h.length; l += 1) k.push(h[l])
- k.sort(function (a, b) {
- return a.style.zIndex - b.style.zIndex
- })
- for (l = 0; l < k.length; l += 1) {
- var m = k[l]
- if (g.f.zn(m, 'amap-layer') || g.f.zn(m, 'amap-e') || g.f.zn(m, 'amap-labels'))
- if ('CANVAS' === m.tagName) {
- var h = c,
- n = e,
- p = parseFloat(m.style.width) || m.width,
- q = parseFloat(m.style.height) || m.height,
- r = 1
- m.style.transform && (r = parseFloat(m.style.transform.split('(')[1]))
- f.drawImage(m, n, h, p * r, q * r)
- } else if ('DIV' === m.tagName)
- for (var r = m.childNodes, s = parseFloat(m.style.top) || 0 + c, m = parseFloat(m.style.left) || 0 + e, u = 0; u < r.length; u += 1) {
- var v = r[u]
- if ('CANVAS' === v.tagName || 'IMG' === v.tagName)
- (h = parseFloat(v.style.top) || 0),
- (n = parseFloat(v.style.left) || 0),
- (p = parseFloat(v.style.width) || v.width),
- (q = parseFloat(v.style.height) || v.height),
- f.drawImage(v, n + m, h + s, p, q)
- }
- }
- return d.toDataURL()
- },
- })
- g.Rb.Hb({
- kga: function () {
- this.DB = !1
- g.l.Tf && ('3D' === this.D.view.type ? this.Hca() : this.Fca())
- g.l.ba || this.Cca()
- },
- ska: function () {
- g.l.Tf && ('3D' === this.D.view.type ? this.Aha() : this.zha())
- g.l.ba || (this.wha(), this.m_())
- },
- rotateEnableChanged: function () {
- this.dxa = this.get('rotateEnable')
- g.l.Tf && this.Y1 && '3D' !== this.D.view.type && (this.dxa ? this.Y1() : this.Bua())
- },
- zoomEnableChanged: function () {
- this.get('zoomEnable') ? (g.l.Tf && this.PP && '3D' !== this.D.view.type && this.PP(), g.l.ba || this.Eca()) : (g.l.Tf && this.hT && this.hT(), g.l.ba || this.m_())
- },
- mousewheelChanged: function () {},
- WS: function (a) {
- a && (this.DB = a.su)
- },
- ww: function () {
- this.DB = !1
- },
- Li: function (a, b, c, d) {
- var e,
- f = {}
- a || (a = window.event)
- var h = g.F.km(a, this.Xa.$c)
- g.l.Tf && ('touchend' !== a.type ? (this.V.Qga = h) : (h = this.V.Qga))
- f.Cb = h
- f.Ta = this.yg(h)
- f.Ta && (f.Ta = f.Ta.toFixed(3))
- f.Nf = this.Od(f.Ta)
- c || ((c = this.DB ? (this.DB ? [this.DB] : null) : this.afa(f.Ta, d)) && 0 < c.length && c[0].uo && ((e = c[0].uo), (f.su = c[0])))
- e || 'info' === a.$e || (e = this)
- f.hd = e
- f.IBa = a.altKey
- f.ctrlKey = a.ctrlKey
- f.button = void 0 === a.button ? 0 : a.button
- f.vT = a
- e && 'AMap.LabelMarker' === e.CLASS_NAME && ((f.lnglat = f.Nf), (f.pixel = f.Cb), (f.target = e), (f.data = e.VW), (f.originEvent = a))
- b || g.F.preventDefault(a)
- return f
- },
- XN: function (a) {
- return a && a !== this && a !== document
- },
- RO: function () {
- var a = this.V
- a.fg && (a.ak.Cb.x === a.fg.x && a.ak.Cb.y === a.fg.y ? (a.Jf = !1) : ((a.Jf = !0), a.Ep || (a.jq.q('dragstart', a.iq), (a.Ep = !0)), a.jq.q('dragging', a.ak), (a.fg = a.ak.Cb)))
- },
- Uxa: function (a) {
- for (var b = [], c = 0; c < a.length; c += 1) a[c] && (b = b.concat(a[c]))
- return b
- },
- Ov: function (a, b, c) {
- return a && b && (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y) < (c || 10)
- },
- afa: function (a, b) {
- var c = this.Oy()
- if (!c) return null
- var d,
- e = this
- this.la.sort(function (a, b) {
- return a.get('zIndex') > b.get('zIndex') ? -1 : 1
- })
- c.mq(
- a,
- this.la,
- function (a) {
- d = a
- d = e.Uxa(d)
- },
- function () {
- d = []
- },
- b
- )
- return d
- },
- })
- g.Rb.Hb({
- rga: function () {
- this.Tm = {}
- this.h('moveend', this.g7, this)
- g.l.Xl && (g.l.qL || g.l.VH) && this.h('zoomend', this.IV, this)
- this.h('movestart', this.h7, this)
- this.h('zoomstart', this.o7, this)
- this.h('zoomend', this.n7, this)
- this.GM()
- this.hB = 0
- this.EY = {}
- 'undefined' === typeof window.requestAnimationFrame && (this.hB = 2)
- },
- o7: function () {
- 2 !== this.hB && 12 === this.get('zoom') && ((this.hB = 1), g.a.iR.start(this.EY))
- this.ej = !0
- },
- n7: function () {
- 1 === this.hB && 13 !== this.get('zoom') && ((this.hB = 0), g.a.iR.cancel(this.EY))
- this.ej = !1
- this.set('display')
- },
- V0: function (a, b) {
- this.Tm.left = 0 < a
- this.Tm.right = 0 > a
- this.Tm.bF = 0 < b
- this.Tm.FQ = 0 > b
- },
- mu: function () {
- this.Tm.left = !1
- this.Tm.right = !1
- this.Tm.bF = !1
- this.Tm.FQ = !1
- },
- vha: function () {
- this.G('moveend', this.g7, this)
- g.l.Xl && (g.l.qL || g.l.VH) && this.G('zoomend', this.IV, this)
- this.G('movestart', this.h7, this)
- this.G('zoomstart', this.o7, this)
- this.G('zoomend', this.n7, this)
- this.xha()
- },
- g7: function (a) {
- this.Jf = !1
- this.mu()
- this.y8()
- !a.N5 && this.D.get('limitBounds', null, !0) ? ((a = this.lna()) && !a.gb(this.get('center')) ? this.VK(this.get('zoom'), a, !1, !0) : this.qa('moveend')) : this.qa('moveend')
- this.set('display')
- },
- h7: function () {
- this.Jf = !0
- this.mu()
- },
- dragEnableChanged: function () {
- ;(this.XC = this.get('dragEnable')) ? this.FM() : this.yO()
- },
- qa: function (a, b) {
- if (this.D.ve(a)) {
- var c
- b && (c = b.S6 ? { type: a, newsize: b.S6, oldsize: b.Cua } : { type: a, pixel: b.Cb, target: this.D, lnglat: b.Nf, originEvent: b.vT })
- this.D.q(a, c)
- }
- },
- GM: function () {
- this.h('click', this.y_)
- this.h('dblclick', this.C_)
- g.l.Tf && this.wX()
- g.l.ba || this.Dca()
- },
- xha: function () {
- this.G('click', this.y_)
- this.G('dblclick', this.C_)
- g.l.Tf && this.n_()
- g.l.ba || this.yha()
- },
- cH: function (a, b) {
- var c = this.get('targetLevel') || this.get('zoom'),
- c = 0 < b ? Math.floor(c) + 1 : Math.ceil(c) - 1,
- c = Math.min(Math.max(c, this.get('zooms')[0]), this.get('zooms')[1])
- c === this.get('zoom') || (this.Vf && this.Vf.Zv && c === this.Vf.end) || this.qA(c, !1, a)
- },
- y_: function (a) {
- this.qa('click', a)
- },
- C_: function (a) {
- this.get('doubleClickZoom') && this.get('zoomEnable') && this.cH(a.Ta, 1)
- this.qa('dblclick', a)
- },
- pCa: function (a) {
- this.cH(a.KHa, a.H9)
- this.qa('touchend', a)
- },
- FM: function () {
- this.XC &&
- ('3D' === this.D.view.type
- ? (this.h('dragstart', this.I_), this.h('dragging', this.E_), this.h('dragend', this.G_))
- : (this.h('dragstart', this.H_), this.h('dragging', this.D_), this.h('dragend', this.F_)))
- },
- yO: function () {
- this.XC ||
- ('3D' === this.D.view.type
- ? (this.G('dragstart', this.I_), this.G('dragging', this.E_), this.G('dragend', this.G_))
- : (this.G('dragstart', this.H_), this.G('dragging', this.D_), this.G('dragend', this.F_)))
- },
- H_: function (a) {
- this.WS(a)
- this.mu()
- this.rg = !0
- this.V.Fy = a.Cb.x
- this.V.YC = a.Cb.y
- this.He && (this.He.stop(), this.us(!0))
- this.qa('dragstart')
- this.qa('movestart')
- this.q('movestart', a)
- this.$xa()
- },
- D_: function () {
- var a = this.V,
- b = a.ak.Cb.x - a.Fy,
- c = a.ak.Cb.y - a.YC
- if (c || b) {
- this.V.Jf = !0
- this.V0(b, c)
- a.Fy = a.ak.Cb.x
- a.YC = a.ak.Cb.y
- var a = b,
- d = c,
- e = this.rotation
- e && ((e *= Math.PI / 180), (a = b * Math.cos(e) + Math.sin(e) * c), (d = -Math.sin(e) * b + Math.cos(e) * c))
- a = this.get('centerCoords').ab(new g.H(a, d).Nd(this.T))
- ;(d = this.x2(a)) && (c = Math.round(this.Xd(d).ab(this.Xd(a)).y))
- this.Zo(this.Xa.Xr, b, c)
- a.x = (a.x + g.a.Fa) % g.a.Fa
- this.set('centerCoords', a, !0)
- this.set('center', this.Od(a), !0)
- this.vv && (this.hh ? ((a = new Date()), (this.Yt = 100 < a - this.hh ? new g.H(0, 0) : new g.H(b, c)), (this.hh = a)) : (this.hh = new Date()))
- this.qa('dragging')
- this.qa('mapmove')
- } else (this.V.Jf = !1), (this.Yt = null), this.mu()
- },
- Zo: function (a, b, c) {
- if (a && !(1 > Math.abs(b) && 1 > Math.abs(c))) {
- var d = parseFloat(a.style.top) || 0,
- e = parseFloat(a.style.left) || 0,
- f = ''
- this.rotation && (f = g.f.ot[g.f.pg] + ':rotate(' + this.rotation + 'deg);overflow:visible;')
- a.style.cssText = 'position:absolute;top:' + (d + c) + 'px;left:' + (e + b) + 'px;' + f
- }
- },
- x2: function (a) {
- var b = this.D.view.ZW(),
- c = (this.OU.height * this.T) / 2
- return a.y < b.fc + c ? ((a.y = b.fc + c), a) : a.y > b.sc - c ? ((a.y = b.sc - c), a) : null
- },
- F_: function () {
- this.ww()
- 100 < new Date() - this.hh && (this.Yt = null)
- this.V.fg = null
- this.rg = !1
- this.mu()
- this.qa('dragend')
- if (this.vv && this.Yt)
- if (this.V.Jf) {
- var a = this.Yt,
- b = new g.H(0, 0)
- this.He = new g.Kj(
- a,
- b,
- function (a, b, e) {
- return 600 <= e ? b : a.Nd(1 - Math.pow(e / 600, 2)).floor()
- },
- 1
- )
- this.He.Jq = function (a) {
- if (2 > Math.abs(a.x) && 2 > Math.abs(a.y)) this.He.stop(), this.q('moveend'), this.us(), (this.Yt = this.hh = null)
- else {
- var b = a.x,
- e = a.y,
- f = this.rotation
- f && ((f *= Math.PI / 180), (b = a.x * Math.cos(f) + Math.sin(f) * a.y), (e = -Math.sin(f) * a.x + Math.cos(f) * a.y))
- b = this.get('centerCoords').ab(new g.H(b, e).Nd(this.T))
- e = this.x2(b)
- f = a.y
- e && (f = Math.round(this.Xd(e).ab(this.Xd(b)).y))
- this.Zo(this.Xa.Xr, a.x, f)
- b.x = (b.x + g.a.Fa) % g.a.Fa
- this.set('centerCoords', b, !0)
- this.set('center', this.Od(b), !0)
- this.qa('mapmove')
- }
- }
- this.He.Nn(this)
- } else this.q('moveend'), this.us(!0), (this.Yt = this.hh = null)
- else this.q('moveend'), this.us(), (this.Yt = this.hh = null)
- },
- $xa: function () {
- if (!this.V.refresh) {
- var a = this,
- b = null
- this.V.refresh = setInterval(
- function () {
- b !== a.V.fg && (a.set('display', 0), (b = a.V.fg))
- },
- g.l.ba ? 400 : 100
- )
- }
- },
- IV: function () {
- if (g.l.Xl && (g.l.qL || g.l.VH)) {
- for (var a = this.Xa.o.childNodes, b = 0; b < a.length; b += 1) {
- var c = a[b]
- c instanceof HTMLCanvasElement && (c.width = 0)
- 'amap-e' === c.className && (c.style.height = '0')
- }
- for (b = 0; b < this.la.length; b += 1) (c = this.la[b]), 'undefined' !== typeof AMap.IndoorMap && c instanceof AMap.IndoorMap && (c.uu && (c.uu.width = 0), c.Wx && (c.Wx.width = 0))
- }
- },
- us: function (a) {
- this.V.refresh && (clearInterval(this.V.refresh), (this.V.refresh = null))
- a || (this.IV(), this.set('display', 0))
- },
- y8: function (a) {
- this.set('refresh', a)
- },
- })
- g.Rb.Hb({
- setZoomSlow: function (a) {
- this.VK(a, null, !this.get('animateEnable'))
- },
- setPanTo: function (a) {
- this.VK(null, a, !this.get('animateEnable'))
- },
- zoomAndCenterChanged: function (a) {
- var b = a[0]
- b < this.get('zooms')[0] && (b = this.get('zooms')[0])
- b > this.get('zooms')[1] && (b = this.get('zooms')[1])
- this.VK(b, a[1], a[2] || !this.get('animateEnable'))
- },
- zoomChanged: function () {
- this.T = Math.pow(2, 20 - this.get('zoom'))
- this.q('closeOverlays')
- this.set('display')
- },
- rotationChanged: function (a) {
- this.rotation = this.get('rotation')
- this.D.q('rotate', { rotation: this.rotation || 0 })
- !0 !== a && this.set('display', 0)
- },
- pitchChanged: function () {
- this.pitch = this.get('pitch')
- this.D.q('pitch', { pitch: this.pitch || 0 })
- this.set('display', 0)
- },
- centerCoordsChanged: function () {
- this.q('closeOverlays')
- this.NBa ? this.LK(!0) : this.LK(!1)
- },
- })
- g.OW = g.da.extend({
- ka: [g.va, g.Ze],
- A: function (a, b) {
- this.type = '2D'
- this.jf(b, !0)
- a && this.Bma(a)
- },
- Bma: function (a) {
- this.map = a
- this.af(['size', 'refresh', 'maxPitch'], a)
- this.centerChanged()
- a.af(['zoom', 'center', 'centerCoords', 'rotation', 'pitch'], this)
- },
- ZW: function () {
- this.wM || this.Vna()
- return this.wM
- },
- Vna: function () {
- var a
- if (this.get('center') instanceof g.U) {
- a = new g.oe(-180, -85, 180, 85)
- var b = this.map.Bb(a.dk())
- a = this.map.Bb(a.Oo())
- this.wM = { Ic: b.x, fc: b.y, Hc: a.x, sc: a.y }
- } else (a = this.map.get('limitBounds', null, !0)), (this.wM = { Ic: a[0], fc: a[1], Hc: a[2], sc: a[3] })
- },
- rD: function () {
- var a = this.map,
- b = this.get('zoom')
- return {
- zoom: b,
- oh: this.get('center'),
- Ha: this.jm(),
- lb: this.get('centerCoords'),
- rotation: parseInt(this.get('rotation')),
- Pf: a.get('crs'),
- T: Math.pow(2, 20 - b),
- ne: Math.round(b),
- Gg: Math.pow(2, 20 - Math.round(this.get('zoom'))),
- }
- },
- centerChanged: function () {
- this.set('centerCoords', this.map.Bb(this.get('center')).toFixed(3), !0)
- },
- centerCoordsChanged: function () {
- var a = this.map
- a.C = !0
- var b = this.ZW(),
- c = this.get('centerCoords'),
- d = a.getSize()
- a.C = !1
- var e = this.get('zoom', null, !0),
- a = this.get('center', null, !0),
- d = (d.height * Math.pow(2, 20 - e)) / 2
- a instanceof g.U ? (c.x = (c.x + 268435456) % 268435456) : 0 > c.x ? (c.x = 0) : c.x > b.Hc && (c.x = b.Hc)
- c.y < b.fc + d ? (c.y = b.fc + d) : c.y > b.sc - d && (c.y = b.sc - d)
- this.set('center', this.map.Od(c), !0)
- },
- })
- g.NF = g.OW.extend({
- jm: function () {
- var a = this.get('size'),
- b = this.get('centerCoords'),
- c = parseInt(this.get('rotation')) % 360,
- d = this.get('zoom', null, !0),
- e = Math.pow(2, 20 - d),
- c = (Math.PI * c) / 180,
- a = new g.H((Math.abs(a.width * Math.cos(c)) + Math.abs(a.height * Math.sin(c))) / 2, (Math.abs(a.width * Math.sin(c)) + Math.abs(a.height * Math.cos(c))) / 2),
- e = new g.Wf(b.ab(a.Nd(e)), b.add(a.Nd(e))),
- c = this.map.get('targetLevel')
- if (c > d - 1) {
- var f = Math.pow(2, 20 - c)
- e.N$ = new g.Wf(b.ab(a.Nd(f)), b.add(a.Nd(f)))
- }
- e.F9 = c || d
- e.Ac = a
- return e
- },
- nqa: function (a) {
- var b = this.get('size'),
- c = this.get('centerCoords'),
- d = parseInt(this.get('rotation')) % 360,
- d = (Math.PI * d) / 180,
- b = new g.H((Math.abs(b.width * Math.cos(d)) + Math.abs(b.height * Math.sin(d))) / 2, (Math.abs(b.width * Math.sin(d)) + Math.abs(b.height * Math.cos(d))) / 2)
- a = Math.pow(2, 20 - a)
- return new g.Wf(c.ab(b.Nd(a)), c.add(b.Nd(a)))
- },
- Kd: function () {
- var a = this.jm(),
- b = a.Vd.x,
- c = a.hc.y,
- a = new g.H(a.hc.x, a.Vd.y),
- b = new g.H(b, c)
- return new g.oe(this.map.Od(a), this.map.Od(b))
- },
- zoomChanged: function () {},
- Xd: function (a, b) {
- this.get('size')
- var c = a.cb(),
- d = this.get('centerCoords'),
- e = c.ab(d)
- e.x < -g.a.Fa / 2 ? (e.x += g.a.Fa) : e.x > g.a.Fa / 2 && (e.x -= g.a.Fa)
- var c = this.get('size').PE().ld(2),
- f = (this.get('rotation') * Math.PI) / 180,
- d = e.x * Math.cos(f) - Math.sin(f) * e.y,
- e = Math.sin(f) * e.x + Math.cos(f) * e.y
- return c.add(new g.H(d, e).Nd(Math.pow(2, (b || this.get('zoom')) - 20)))
- },
- yg: function (a, b) {
- var c = this.get('size').PE().ld(2),
- d = a.ab(c),
- e = (this.get('rotation') * Math.PI) / 180,
- c = d.x * Math.cos(e) + Math.sin(e) * d.y,
- d = -Math.sin(e) * d.x + Math.cos(e) * d.y,
- c = this.get('centerCoords').add(new g.H(c, d).Nd(Math.pow(2, 20 - (b || this.get('zoom')))))
- c.x = (c.x + 268435456) % 268435456
- return c
- },
- })
- g.qM = g.OW.extend({
- A: function (a, b) {
- this.Le = new g.Cc()
- this.cc = new g.Cc([1, 0, 0, 0, 0, -1, 0, 0, 0, 0, -1, 0, 0, 0, 0, 1])
- arguments.callee.ma.apply(this, arguments)
- this.scale = 1
- this.type = '3D'
- this.mA = null
- this.T7 = ''
- this.P = ['', 0, 0, '', 0]
- this.mA = {}
- },
- refreshChanged: function () {
- this.ir()
- },
- zoomChanged: function (a) {
- this.ir()
- this.P[4] = a
- },
- centerChanged: function (a) {
- arguments.callee.ma.apply(this, arguments)
- this.ir()
- },
- centerCoordsChanged: function (a) {
- arguments.callee.ma.apply(this, arguments)
- this.ir()
- this.P[0] = a.toString()
- },
- rotationChanged: function (a) {
- this.ir()
- this.P[2] = a
- },
- pitchChanged: function (a) {
- this.Ce.pitch = Math.min(this.get('maxPitch'), Math.max(a, 0))
- this.ir()
- this.P[1] = a
- },
- ir: function () {
- if (!this.Bza() && (this.sL(), this.Toa(), this.map)) {
- var a = this,
- b = function () {
- a.map.camera = a.R3()
- a.map.q('camerachange', { map: a.map, camera: a.map.camera })
- }
- a.map.Ra ? b() : this.map.h('complete', b, this)
- }
- },
- R3: function () {
- return { height: this.pn, fov: this.bqa, aspect: this.uC, near: this.sz, far: this.LI, position: this.Yma, rotation: this.Ce.rotation, pitch: this.Ce.pitch }
- },
- Toa: function () {
- this.Rga = g.a.dg()
- },
- Uo: function () {
- var a = 0 < arguments.length && void 0 !== arguments[0] ? arguments[0] : 300
- return g.a.dg() - this.Rga > a
- },
- sL: function () {
- var a = this.get('centerCoords'),
- b = this.get('pitch'),
- c = this.get('rotation'),
- d = new g.Cc().c9(-a.x + g.a.dc.x, -a.y + g.a.dc.y, 0)
- this.Yma = { x: a.x - g.a.dc.x, y: a.y - g.a.dc.y }
- a = new g.Cc().Rz(180 - b, 1, 0, 0)
- this.I7 = new g.Cc().set(a)
- c = new g.Cc().Rz(c, 0, 0, 1)
- this.Tq = new g.Cc().set(c)
- this.$pa = d.Dg()
- this.cc = new g.Cc()
- .c9(0, 0, -this.pn)
- .multiply(a.multiply(c.multiply(d)))
- .toFixed(8)
- this.cc.df = this.cc.Dg()
- },
- Bza: function (a) {
- a = a || this.get('zoom')
- var b = this.get('size'),
- c = b.width,
- b = b.height
- if (!c || !b) return !0
- this.uC = c /= b
- b = (b / 2) * Math.pow(2, 20 - a)
- a = g.a.wb(((56 - a) * Math.PI) / 180, 2)
- var d = g.a.wb(b / Math.tan(a / 2), 0)
- 2400 > d && ((d = 2400), (a = 2 * Math.atan(b / d)))
- this.bqa = a
- this.pn = d
- this.sz = this.pn / 10
- this.LI = 50 * this.pn
- this.Coa = (this.pn - this.sz) / (this.LI - this.sz)
- this.Le.Z8(a, c, this.sz, this.LI)
- this.Le.df = this.Le.Dg()
- a = this.Le
- var c = new g.eW(),
- b = c.iE,
- e = this.Le.elements,
- d = e[0],
- f = e[1],
- h = e[2],
- k = e[3],
- l = e[4],
- m = e[5],
- n = e[6],
- p = e[7],
- q = e[8],
- r = e[9],
- s = e[10],
- u = e[11],
- v = e[12],
- w = e[13],
- t = e[14],
- e = e[15]
- xc(b[0], k - d, p - l, u - q, e - v).normalize()
- xc(b[1], k + d, p + l, u + q, e + v).normalize()
- xc(b[2], k + f, p + m, u + r, e + w).normalize()
- xc(b[3], k - f, p - m, u - r, e - w).normalize()
- xc(b[4], k - h, p - n, u - s, e - t).normalize()
- xc(b[5], k + h, p + n, u + s, e + t).normalize()
- a.mR = c
- },
- rD: function () {
- var a = this.map
- a.map.ht && (this.ir(), (this.P[3] = a.get('size').toString()))
- var b = this.P.toString()
- if (b !== this.T7) {
- var c = this.get('zoom'),
- d = this.mA
- d.zoom = c
- d.uC = this.uC
- d.top = this.top
- d.Ha = this.jm()
- d.lb = this.get('centerCoords')
- d.rotation = (a.get('rotateEnable') && parseInt(this.get('rotation'))) || 0
- d.pitch = this.get('pitch') || 0
- d.BIa = this.get('yaw')
- d.Pf = a.get('crs')
- d.T = Math.pow(2, 20 - c)
- d.ne = Math.round(c)
- d.q7 = Math.floor(c)
- d.Gg = Math.pow(2, 20 - d.ne)
- d.cva = Math.pow(2, 20 - d.q7)
- d.Le = this.Le
- d.cc = this.cc
- this.T7 = d.key = b
- }
- this.mA.oh = this.get('center')
- this.mA.gr = g.a.dg()
- this.mA.Uo = this.Uo()
- return this.mA
- },
- jm: function () {
- var a = this.get('size'),
- b = a.width,
- a = a.height
- if (!b || !a) return null
- var c, d
- d = 0
- var e = new g.H(0, d)
- c = this.yg(e, !0)
- if (55 < this.Ce.pitch || !c) for (; !c; ) (d += a / 40), (e.y = d), (c = this.yg(e, !0))
- this.top = d / a
- e.x = b
- d = this.yg(e, !0)
- var f = 0,
- h = this.Ce.zoom
- 50 <= this.Ce.pitch && 18 <= h && (f = 0)
- e.y = a + f
- f = this.yg(e, !0)
- e.x = 0
- h = this.yg(e, !0)
- c = [c.wl(), d.wl(), f.wl(), h.wl(), c.wl()]
- c = new g.daa(c)
- e.x = b / 2
- e.y = a + 256
- c.YP = this.yg(e, !0)
- return c
- },
- Kd: function () {
- var a = this.jm()
- if (a) {
- for (var b = [], c = 0; c < a.path.length; c += 1) {
- var d = this.map.Od(new g.H(a.path[c][0], a.path[c][1]))
- b.push(d)
- }
- return new g.tp(b)
- }
- },
- Xd: function (a, b, c) {
- a.z = c || 0
- a = this.J6([a])
- a = a[0]
- return new g.H(a.x, a.y)
- },
- V3: function (a) {
- var b = this.get('size')
- a = new g.Fl([(a.x / b.width) * 2 - 1, 1 - (a.y / b.height) * 2, -1, 1])
- a.multiply(this.sz)
- return this.Le.df.Ah(a)
- },
- yg: function (a, b, c) {
- var d
- this.map ? ((this.map.C = !0), (d = this.map.getSize(!0)), (this.map.C = !1)) : (d = this.get('size'))
- var e = (a.x / d.width) * 2 - 1
- d = 1 - (a.y / d.height) * 2
- a = new g.Fl([e, d, -1, 1])
- a.multiply(this.sz)
- if (!this.Le.df) return null
- a = this.Le.df.Ah(a)
- e = new g.Fl([e, d, 1, 1])
- e.multiply(this.LI)
- d = this.Le.df.Ah(e)
- var f = this.cc.df,
- e = f.Ah(a).elements
- a = f.Ah(d).elements
- c = (e[2] - (-c || 0)) / (e[2] - a[2])
- if (0 > a[2] || 0 > c || (b && c > 2.5 * this.Coa)) return null
- b = e[0] - c * (e[0] - a[0])
- c = e[1] - c * (e[1] - a[1])
- return isNaN(b) || isNaN(c) ? null : new g.H(b, c).add(g.a.dc)
- },
- J6: function (a) {
- for (
- var b = this.get('centerCoords'),
- c = g.a.dc.x,
- d = g.a.dc.y,
- e = this.get('size'),
- f = g.a.Fa,
- h = b.x + f / 2,
- b = b.x - f / 2,
- k = [],
- l = new g.Fl([0, 0, 0, 1]),
- m = l.elements,
- n = new g.H(0, 0),
- p = g.Cc.multiply(this.Le, this.cc),
- q = 0,
- r = a.length;
- q < r;
- q++
- )
- if (a[q]) {
- a[q].concat ? ((n.x = a[q][0]), (n.y = a[q][1]), (n.z = -a[q][2] || 0)) : ((n.x = a[q].x), (n.y = a[q].y), (n.z = -a[q].z || 0))
- h < n.x ? (n.x -= f) : b > n.x && (n.x += f)
- m[0] = n.x - c
- m[1] = n.y - d
- m[2] = n.z
- var s = p.Ah(l)
- s.multiply(1 / s.elements[3])
- k[q] = { x: ((s.elements[0] + 1) / 2) * e.width, y: ((-s.elements[1] + 1) / 2) * e.height, z: s.elements[2] }
- }
- return k
- },
- cAa: function (a) {
- var b = this.get('size')
- a = this.Le.Ah(this.cc.Ah(new g.Fl().copy(a)))
- a.multiply(1 / a.elements[3])
- b = new g.H(((a.elements[0] + 1) / 2) * b.width, ((-a.elements[1] + 1) / 2) * b.height)
- b.z = a.elements[2]
- return b
- },
- })
- g.a.dc = new g.H(215440491, 106744817)
- g.Rb.Hb({
- s2: function (a, b, c) {
- var d = this
- d.iF ? (clearTimeout(d.iF), (d.iF = null)) : (d.qa('zoomstart', { zoom: a }), d.q('zoomstart'))
- d.iF = setTimeout(function () {
- d.iF = null
- d.qa('zoomend', { zoom: a })
- d.qa('zoomchange', { zoom: a })
- d.q('zoomend')
- }, 150)
- a = g.a.wb(a, 2)
- d.qA(a, !0, b, c)
- },
- qA: function (a, b, c, d) {
- var e = this.get('zoom')
- if (e !== a) {
- var f = this.get('zooms')
- '3D' !== this.D.view.type && (g.l.ba || g.l.Ue) && (b = !0)
- a = a || e
- a = Math.min(Math.max(a, f[0]), f[1])
- var h = a !== e,
- k = !!c
- this.He && (this.He.stop(), (this.He = null))
- c = c || this.get('centerCoords')
- var l = this.Xd(c)
- c = function (c) {
- b || (c = g.a.wb(c, 2))
- var d = this.yg(l)
- this.set('zoom', c)
- var e = this.yg(l),
- d = e && e ? e.ab(d) : new g.H(0, 0)
- this.set('centerCoords', this.get('centerCoords').ab(d).toFixed(3))
- d.x && d.y && this.qa('mapmove')
- c === a &&
- a << 0 === a &&
- (this.set('targetLevel', null), h && !this.iF && (this.qa('zoomchange'), this.qa('zoomend')), this.q('zoomend'), k && this.q('moveend'), (this.Vf = null))
- }
- var m
- this.Fd && this.Fd.Zv && (this.Fd.stop(), this.Fd.eS && (d = !0), this.Fd.sD && (m = !0), (this.Fd = null), this.set('targetLevel', null))
- this.Vf && this.Vf.Zv && (this.Vf.stop(), (d = !0), this.Vf.sD && (m = !0), (this.Vf = null), this.set('targetLevel', null))
- h && !d && this.qa('zoomstart')
- k && !m && this.qa('movestart')
- this.q('zoomstart')
- b
- ? c.call(this, a)
- : ((this.Vf = new g.Kj(e, a, null, 0.04)),
- (this.Vf.eS = h),
- (this.Vf.sD = k),
- (this.Vf.transition = function (a, b, c) {
- return c >= g.r.QH ? b : (b - a) * (1 - Math.pow(1 - c / g.r.QH, 4)) + a
- }),
- (this.Vf.Jq = c),
- this.Vf.Nn(this, !0),
- this.set('targetLevel', a))
- }
- },
- VK: function (a, b, c, d) {
- var e = null
- a || (a = this.Fd ? this.Fd.kya : this.get('targetLevel') || this.get('zoom'))
- var e = b ? this.Bb(b).toFixed(3) : this.Fd ? this.Fd.E9 : this.get('centerCoords'),
- f = a !== this.get('zoom'),
- h = !e.gb(this.get('centerCoords')),
- k = (b = !1)
- this.Vf && this.Vf.Zv && (this.Vf.stop(), (b = !0), this.Vf.sD && (k = !0), (this.Vf = null), this.set('targetLevel', null))
- this.Fd && this.Fd.Zv && (this.Fd.stop(), this.Fd.eS && (b = !0), this.Fd.sD && (k = !0), (this.Fd = null), this.set('targetLevel', null))
- this.He && (this.He.stop(), (this.He = null))
- if (f || h) {
- if (!this.D.view.jm().contains(e) || (f && '3D' !== this.D.view.type && (g.l.ba || g.l.Ue))) c = !0
- if (c)
- f && (b || (this.q('zoomstart'), this.qa('zoomstart')), this.set('zoom', a), this.qa('zoomchange'), this.qa('zoomend'), this.q('zoomend')),
- h && (k || d || (this.qa('movestart'), this.q('movestart')), this.set('centerCoords', e), this.qa('mapmove'), this.q('moveend', { N5: d })),
- this.set('targetLevel', null)
- else {
- this.set('targetLevel', a)
- var l = a - this.get('zoom'),
- m = e.ab(this.get('centerCoords')).toFixed(3)
- this.Fd = new g.Kj(1, 0, null, 0.001)
- this.Fd.eS = f
- this.Fd.sD = h
- this.Fd.E9 = e
- this.Fd.kya = a
- this.Fd.transition = function (a, b, c) {
- return Math.pow(1 - Math.min(g.r.QH, c) / g.r.QH, 2)
- }
- this.Fd.Jq = function (b) {
- 0.02 > b
- ? (this.Fd && (this.Fd.stop(), (this.Fd = null)),
- f && (this.set('zoom', a), this.qa('zoomchange'), this.qa('zoomend'), (f = !1), this.q('zoomend')),
- h && (this.set('centerCoords', e), this.q('mapmove'), this.q('moveend', { N5: d })),
- this.set('targetLevel', null))
- : (f && this.set('zoom', a - l * b), h && ((b = e.ab(m.Nd(b)).toFixed(3)), this.set('centerCoords', b), this.qa('mapmove')))
- this.set('display', 1)
- }
- this.Fd.Nn(this)
- f && !b && (this.q('zoomstart'), this.qa('zoomstart'))
- !h || k || d || (this.q('movestart'), this.qa('movestart'))
- }
- }
- },
- })
- g.o = {}
- g.o.Yb = g.da.extend({
- ka: [g.va, g.Ze],
- A: function (a, b) {
- this.S = a
- this.Ya = [3, 18]
- this.ex = g.a.yb(this)
- a && this.af(['opacity', 'visible', 'zIndex', 'zooms'], a)
- a.Uf = b.D.view.type
- this.e = b
- this.X('display', b)
- },
- gg: function () {
- this.Di && this.iQ()
- if (g.Ca && g.Ca.kr && g.Ca.kr.length) {
- var a = g.a.indexOf(g.Ca.kr, this)
- ;-1 !== a && (g.Ca.kr = g.a.Fo(g.Ca.kr, a))
- }
- if ((a = this.Nb)) {
- if (a.length) for (var b = 0; b < a.length; b += 1) a[b].parentNode && a[b].parentNode.removeChild(a[b])
- else a.parentNode && a.parentNode.removeChild(a)
- this.Nb = null
- }
- this.S.gg && this.S.gg()
- this.S.qi = !1
- this.S.o = null
- this.yl()
- var c
- this.M && (this.M.$j(), (this.M = null), (c = '-' + this.lc))
- this.Bf && (this.Bf.$j(), (this.Bf = null), (c = '-' + this.lc))
- if (c) for (var d in g.Ca.Fj) g.a.cD(d, c) && delete g.Ca.Fj[d]
- },
- qa: function (a, b) {
- this.S.q(a, b)
- },
- visibleChanged: function () {
- this.set('display', 0)
- },
- zIndexChanged: function () {
- this.set('display', 0)
- },
- EU: function (a) {
- g.f.Xq(a, this.opacity)
- },
- opacityChanged: function () {
- var a = this.get('opacity')
- this.opacity = Math.min(Math.max(0, a), 1)
- if ((a = this.Nb))
- if (a.length) for (var b = 0; b < a.length; b += 1) this.EU(a[b])
- else this.EU(a)
- this.e && this.e.D && '3D' == this.e.D.view.type && this.set('display', 0)
- },
- yn: function () {
- return this.e.Nc && !this.S.get('rejectMapMask')
- },
- aJ: function () {
- var a = this.get('bounds')
- if (a) {
- if (a instanceof g.oe) {
- var b = a.dk(),
- a = a.Oo(),
- c = this.e.Bb(new g.U(180, 0)).x,
- d = this.e.Bb(b),
- e = this.e.Bb(a),
- f = this.e.get('center')
- b.R > a.R && (0 < f.R ? (e.x += c) : (d.x -= c))
- this.I = [d.x, d.y, e.x, e.y]
- } else
- a instanceof g.Wf
- ? (this.I = [a.hc.x, a.hc.y, a.Vd.x, a.Vd.y])
- : a instanceof g.OF && '3D' === this.S.Uf && ((b = a.path[1]), (d = this.e.Bb(a.path[0])), (e = this.e.Bb(b)), (this.I = [d.x, d.y, e.x, e.y, a.O8, a.height]))
- return this.I
- }
- return null
- },
- })
- var Oc = (function () {
- function a(a) {
- this.RF[g.a.yb(a)] = a
- return this
- }
- function b(a) {
- this.RF[g.a.yb(a)] = null
- return this
- }
- return function () {
- function c() {
- var a = c.RF,
- b,
- f = [],
- h
- for (h in a) a.hasOwnProperty(h) && f.push(a[h])
- for (a = f.length - 1; 0 <= a; a -= 1) (h = f[a].apply(this, arguments)), void 0 !== h && (b = h)
- return b
- }
- c.RF = {}
- c.K1 = a
- c.QGa = b
- return c
- }
- })()
- g.og = g.da.extend({
- ka: [g.va],
- A: function (a, b) {
- this.Ip = a | 0
- this.UF = !!b
- this.count = 0
- this.iK = Oc()
- this.clear()
- this.CB = []
- },
- uh: function () {
- return !this.count
- },
- hFa: function () {
- return this.count >= this.Ip
- },
- yHa: function (a) {
- this.Ip !== a && (this.Ip = a | 0) && this.u1(this.Ip)
- },
- Ld: function (a) {
- return !!this.e[a]
- },
- get: function (a, b) {
- var c = this.wY(a)
- return c ? c.value : b
- },
- set: function (a, b) {
- var c = this.wY(a)
- c ? (c.value = b) : ((c = new g.og.tr(a, b)), (this.e[a] = c), this.tB(c), (this.count += 1), this.count > this.Ip && this.u1(this.Ip))
- },
- yw: function (a) {
- this.remove(a)
- },
- remove: function (a) {
- return this.e.hasOwnProperty(a) && this.UB(this.e[a]) ? !0 : !1
- },
- forEach: function (a, b) {
- for (var c = this.cd.next; c !== this.cd; c = c.next) a.call(b, c.value, c.key, this)
- },
- pK: function (a, b) {
- return this.e.hasOwnProperty(a) ? this.e[a].value : b
- },
- tGa: function () {
- return this.cd.next.value
- },
- uGa: function () {
- return this.cd.Ia.value
- },
- shift: function () {
- return this.n0(this.cd.next)
- },
- C2: function () {
- this.CB.length = 0
- },
- t6: function (a) {
- this.CB.push(a)
- },
- push: function (a) {
- a = new g.og.tr('', a)
- 0 === this.count ? ((this.cd.Ia = null), (a.Ia = this.cd), (this.cd.next = a)) : ((this.iC.next = a), (a.Ia = this.iC))
- this.count += 1
- this.iC = a
- },
- qza: function (a) {
- a = new g.og.tr('', a)
- 0 === this.count ? ((this.cd.Ia = null), (a.Ia = this.cd), (this.iC = this.cd.next = a)) : ((this.cd.next.Ia = a), (a.next = this.cd.next), (a.Ia = this.cd), (this.cd.next = a))
- this.count += 1
- },
- uua: function () {
- if (this.count) {
- this.count -= 1
- var a = this.cd.next
- a.next ? ((a.next.Ia = this.cd), (this.cd.next = a.next)) : ((this.cd.next = null), (this.iC = this.cd.Ia = null))
- a.next = null
- a.Ia = null
- return a.value
- }
- return null
- },
- pop: function () {
- return this.n0(this.cd.Ia)
- },
- wY: function (a) {
- if (this.e.hasOwnProperty(a)) return (a = this.e[a]), this.UF && (a.remove(), this.tB(a)), a
- },
- tB: function (a) {
- this.UF ? ((a.next = this.cd.next), (a.Ia = this.cd), (this.cd.next = a), (a.next.Ia = a)) : ((a.Ia = this.cd.Ia), (a.next = this.cd), (this.cd.Ia = a), (a.Ia.next = a))
- },
- u1: function (a) {
- if (!(this.count <= a || this.count < 2 * this.CB.length)) {
- for (var b = this.UF ? this.cd.Ia : this.cd.next, c = {}, d = 0, e = this.CB.length; d < e; d++) c[this.CB[d]] = !0
- for (
- a = Math.ceil((2 * a) / 3);
- b && this.count > a && ((d = this.UF ? b.Ia : b.next), b.key && !c[b.key] && this.UB(b) && this.iK(b.value), (b = d), b !== this.cd && b !== this.iC);
- );
- }
- },
- UB: function (a) {
- if (this.xC && !1 == this.xC(a.value)) return !1
- a.remove()
- delete this.e[a.key]
- this.count -= 1
- return !0
- },
- n0: function (a) {
- this.cd !== a && (this.xC && console.log('Warnning!!!'), this.UB(a))
- return a.value
- },
- clear: function () {
- this.e = {}
- this.cd = new g.og.tr('', null)
- this.cd.Ia = this.cd.next = this.cd
- this.count = 0
- },
- })
- g.og.tr = function (a, b) {
- this.key = a
- this.value = b
- }
- g.og.tr.prototype.Ia = null
- g.og.tr.prototype.next = null
- g.og.tr.prototype.remove = function () {
- this.Ia.next = this.next
- this.next.Ia = this.Ia
- this.next = this.Ia = null
- }
- function Pc(a, b, c) {
- this.url = a
- this.Mc = b
- this.gR = c
- this.qn = this.MK = !1
- }
- function Qc(a, b, c) {
- var d = Rc
- return function () {
- return d.call(this, a, b, c)
- }
- }
- function Rc(a, b, c) {
- a.KDa = +new Date()
- a.loaded = b
- clearTimeout(a.yya)
- var d = a.Hta
- d.Ln.remove(a.url) && d.Sga()
- d = a.Msa ? a.ga : a.Ba
- a.ga = null
- ;(c || b || a.gR) && a.Mc(b ? d : null, a)
- a.V5 ? (a.V5.ti(), (a.V5 = null)) : d && ((d.onload = null), (d.onerror = null), (d.onabort = null), (a.Ba = null))
- }
- g.wF = g.da.extend({
- KBa: 'assets/image/blank.gif',
- A: function (a, b, c) {
- this.timeout = b || 15e3
- this.Oq = new g.og(1024)
- this.Ln = new g.og(1024)
- this.M2 = a
- this.UQ = c
- },
- NM: function (a) {
- a && this.Ln.count >= this.M2 && ((a = this.Ln.cd.Ia.value), a.qn && (this.Ln.remove(a.url), this.fX(a)))
- for (; this.Oq.count && !(this.Ln.count >= this.M2); ) this.eea(this.Oq.shift())
- },
- Sga: function () {
- if (!this.PX) {
- this.PX = !0
- var a = this
- setTimeout(function () {
- a.PX = !1
- a.NM()
- }, 0)
- }
- },
- eea: function (a) {
- var b = document.createElement('img')
- a.dqa && (b.crossOrigin = 'anonymous')
- b.src = a.url
- a.Ba = b
- a.Hta = this
- a.startTime = +new Date()
- a.MK = !0
- b.complete ? Rc(a, !0) : (this.Ln.set(a.url, a), (b.onload = Qc(a, !0)), (b.onerror = Qc(a, !1, !0)), (b.onabort = Qc(a, !1)), (a.yya = setTimeout(Qc(a, !1, !0), this.timeout)))
- },
- fX: function (a) {
- a.MK && (Rc(a, !1), (a.qn = !0), (a.GCa = !0))
- },
- GFa: function (a, b, c) {
- return this.mz(a.url, b, c, !0, a.ta.z + '_' + a.ta.x + '_' + a.ta.y)
- },
- mz: function (a, b, c, d, e) {
- var f = this.Ln.get(a)
- if (f && f.qn) (f.qn = !1), (f.Mc = b), (f.gR = c)
- else {
- f = new Pc(a, b, c)
- f.Msa = d
- f.key = e
- if (this.Oq.get(g.a.yb(f))) return
- this.Oq.set(g.a.yb(f), f)
- this.NM(!0)
- }
- return f
- },
- wta: function (a, b, c) {
- var d = this.Ln.get(a)
- if (d && d.qn) (d.qn = !1), (d.Mc = b), (d.gR = c)
- else {
- d = new Pc(a, b, c)
- d.dqa = !0
- if (this.Oq.get(g.a.yb(d))) return
- this.Oq.set(g.a.yb(d), d)
- this.NM(!0)
- }
- return d
- },
- q2: function (a) {
- a.qn || ((a.qn = !0), this.Oq.remove(g.a.yb(a)))
- },
- clear: function (a) {
- this.Oq.forEach(function (a) {
- a.qn = !0
- })
- this.Oq.clear()
- if (a) for (; 0 < this.Ln.length; ) (a = this.Ln.pop()), this.fX(a)
- else
- this.Ln.forEach(function (a) {
- a.qn = !0
- })
- },
- })
- function Sc(a, b, c) {
- this.z = a
- this.x = b
- this.y = c
- }
- Sc.prototype.cb = function () {
- return new Sc(this.z, this.x, this.y)
- }
- Sc.prototype.toString = function () {
- return this.z + '/' + this.x + '/' + this.y
- }
- g.rb = function (a) {
- var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1
- this.ta = a
- this.key = a.toString()
- this.Ie = b
- }
- g.pr = Sc
- g.o.rb = g.o.Yb.extend({
- A: function (a, b, c, d, e) {
- arguments.callee.ma.apply(this, arguments)
- this.X('tileSize', a)
- this.X('tiles', a)
- this.af(['zooms', 'type', 'detectRetina', 'errorUrl'], a)
- a.FG && (this.X('lang', b, !0), this.X('mapStyle', b, !0), this.X('style', b, !0), this.X('features', b, !0))
- var f = 'overlayer' === a.get('type') || !1 === a.get('blend')
- this.Il = !1
- var h = b.get('size'),
- h = (h.width * h.height) / 65536
- this.ja = g.l.ba && g.l.ja && this.get('detectRetina')
- g.l.Jc && g.l.ba && 9 < h && (this.Il = !1)
- this.Yi = !f && !a.Sv
- this.Zi = !f && !a.Sv
- this.gL = c
- this.X('reload', a)
- a.Isa ? this.X('createTile', a) : this.X('tileFun', a)
- this.ff = d
- this.nS = e
- },
- langChanged: function () {
- this.set('reload')
- this.S.$s()
- },
- styleChanged: function () {
- this.e.Bd || (this.set('reload'), this.S.$s())
- },
- featuresChanged: function () {
- this.set('reload')
- this.S.$s()
- },
- reloadChanged: function () {
- this.set('display', 0)
- },
- tileFunChanged: function () {
- var a = this.gL || this.get('tileFun')
- this.Bo = function (b, c, d) {
- var e = a(b.ta.x, b.ta.y, b.ta.z)
- if (!b.Is || b.Is.qn)
- (b.loaded = !1),
- (b.Is = ('3D' === this.e.D.view.type ? g.pm.wta : g.pm.mz).call(
- g.pm,
- e,
- function (a) {
- b.Is = null
- a ? c(a) : d()
- },
- !1
- ))
- }
- },
- createTileChanged: function () {
- this.S.C = !0
- var a = this.S.getCreateTile()
- this.S.C = !1
- this.Bo = function (b, c, d) {
- a.call(this.g.S, b.ta.x, b.ta.y, b.ta.z, c, d, b)
- }
- this.set('reload')
- },
- me: function () {
- var a = this.S.get('zooms', null, !0)
- this.S.Hsa && (a = [Math.min(a[0], 18), Math.min(a[1], 18)])
- return {
- Dd: this.S.get('tileSize'),
- visible: this.S.get('visible'),
- I: this.aJ(),
- Ya: a,
- ZH: this.Il,
- Yi: this.Yi,
- Zi: this.Zi,
- opacity: this.S.get('opacity'),
- Bo: this.S.get('createTile'),
- Po: this.gL || this.S.get('tileFun'),
- Jc: this.S.Gq ? !1 : this.S.get('detectRetina') && g.l.ja && g.l.ba,
- Nc: this.yn(),
- }
- },
- $l: function (a) {
- if (g.M.be.Ti) return new g.M.be.Ti(this, a)
- },
- })
- g.pm = new g.wF(6, null)
- g.o.fd = g.o.Yb.extend({
- A: function (a, b) {
- this.Ua = Math.min(2, window.devicePixelRatio || 1)
- this.Jc = g.l.ja
- this.map = b
- this.er = 0
- this.mm = !1
- this.ig = this.Af = 0
- this.ah = []
- arguments.callee.ma.apply(this, arguments)
- this.Jv = []
- this.em = new g.o.laa()
- a && (this.X('style', a), this.X('cursor', a, !0), (this.Xxa = a.get('stable') || !1), this.X('dataSources', a), this.X('bubble', a))
- this.X('display', b)
- this.zca()
- },
- me: function () {
- return { visible: this.get('visible'), Ya: this.get('zooms'), opacity: this.get('opacity'), zIndex: this.get('zIndex'), ey: this.S.get('alwaysRender') || !1, Nc: this.yn() }
- },
- dataSourcesChanged: function () {
- var a = this.get('dataSources')
- a && a.length
- ? 'string' === typeof a
- ? new g.jb.zb(a).h(
- 'complete',
- function (a) {
- this.y7(a.data)
- this.ls = a.data
- this.mm = !0
- this.set('display')
- this.Ra = !0
- this.S.q('complete')
- },
- this
- )
- : a.length && (this.y7(a), (this.ls = a), (this.mm = !0), this.set('display'), (this.Ra = !0), this.S.q('complete'))
- : this.clear()
- },
- getDatas: function () {
- return this.ls
- },
- vza: function () {
- if (this.S.zj) {
- var a = this.Cm
- this.Af = a.Af
- this.ig = a.ig
- }
- },
- qa: function (a, b) {
- var c = { type: a, data: 'mouseout' === a ? this.Pga || null : b.su.hb, target: this.S, originEvent: b.vT }
- this.Pga = 'mouseout' === a ? null : b.su.hb
- this.S.q(a, c)
- },
- rc: function (a) {
- this.qa(a.type, a)
- },
- zca: function () {
- this.h('click', this.rc)
- this.h('dblclick', this.rc)
- this.h('mousedown', this.rc)
- this.h('mouseup', this.rc)
- this.h('mouseover', this.rc)
- this.h('mouseout', this.rc)
- this.h('touchstart', this.rc)
- this.h('touchend', this.rc)
- },
- DCa: function () {
- this.G('click', this.rc)
- this.G('dblclick', this.rc)
- this.G('mousedown', this.rc)
- this.G('mouseup', this.rc)
- this.G('mouseover', this.rc)
- this.G('mouseout', this.rc)
- this.G('touchstart', this.rc)
- this.G('touchend', this.rc)
- },
- styleChanged: function () {
- this.Cm = this.get('style')
- this.vza()
- this.set('display', 0)
- },
- y7: function (a) {
- if (a) {
- this.clear()
- for (var b = 0; b < a.length; b += 1) {
- var c = a[b].lnglat
- a[b].lnglat = g.a.Ka(c)
- c = this.map.Bb(c)
- c = new g.ai({ name: 'point-' + g.a.yb(this), W: new g.Aa.Mg([c.x, c.y], !0) })
- c.uo = this
- c.hb = a[b]
- this.OH(c)
- }
- }
- },
- bra: function (a) {
- if ('geojson' === a) return new g.raa({ map: this.map })
- if ('topjson' === a) return new g.fBa({ map: this.map })
- if ('subway' === a) return new g.aBa({ map: this.map })
- },
- Iva: function (a) {
- if (a) {
- var b = [],
- b = [],
- c = {}
- if (a.rules) {
- for (var b = a.rules, d = 0, e = b.length; d < e; d += 1) {
- for (var f = [], h = b[d].symbolizers, k = 0, l = h.length; k < l; k += 1)
- h[k].fill && (f[k] = new g.style.Ng.cW(h[k].fill)), h[k].stroke && (f[k] = new g.style.Ng.HW(h[k].stroke))
- h = f
- b[d].dL = h
- b[d] = new g.style.jba(b[d])
- }
- c.rules = b
- }
- if (a.symbolizers) {
- b = a.symbolizers
- a = 0
- for (d = b.length; a < d; a += 1) b[a].fill && (b[a] = new g.style.Ng.cW(b[a].fill)), b[a].stroke && (b[a] = new g.style.Ng.HW(b[a].stroke))
- c.dL = b
- }
- a = new g.lM(c)
- } else a = new g.lM({})
- this.set('style', a)
- return a
- },
- zCa: function (a, b) {
- var c = new g.jb.zb(a)
- c.h(
- 'complete',
- function (c) {
- c = this.ga[a] = this.bra(b).RT(c)
- this.ay(c)
- this.qa('complete')
- },
- this
- )
- c.h('error', this.mc, this)
- },
- jwa: function (a) {
- 'px' === a.target.get('unit')
- ? ((this.Af = Math.max(a.tl, this.Af)), (this.ig = Math.max(a.tl, this.ig)))
- : a.tl > this.Ns && ((this.Ns = a.tl), (this.pz = this.Ns / this.map.D.mj.nq(20)))
- },
- OH: function (a) {
- this.em.add(a)
- if (!this.WC && !this.S.zj) {
- if (0 === a.name.indexOf('circle') || 0 === a.name.indexOf('ellipse')) {
- a.h('rad', this.jwa, this)
- var b = a.get('radius')
- b.length && (b = Math.max.apply(null, b))
- 'px' === a.get('unit')
- ? ((this.Af = Math.max(b, this.Af)), (this.ig = Math.max(b, this.ig)))
- : this.Ns
- ? b > this.Ns && ((this.Ns = b), (this.pz = this.Ns / this.map.D.mj.nq(20)))
- : ((this.Ns = b), (this.pz = this.Ns / this.map.D.mj.nq(20)))
- }
- b = a.get('strokeWeight') || 0
- if (!this.qz || b > this.qz) this.qz = b
- }
- this.Xxa || a.X('feature', this, !0)
- },
- ay: function (a) {
- this.mm = !0
- for (var b = 0, c = a.length; b < c; b += 1) this.OH(a[b])
- },
- clear: function () {
- this.mm = !0
- this.ls = []
- this.em.clear()
- this.set('display', 0)
- },
- xn: function (a) {
- var b, c
- b = this.em.xn([a[0] + g.a.Fa, a[1], a[2] + g.a.Fa, a[3]])
- c = this.em.xn([a[0] - g.a.Fa, a[1], a[2] - g.a.Fa, a[3]])
- a = this.em.xn(a)
- return g.extend(a, g.extend(b, c))
- },
- zEa: function (a) {
- var b,
- c = this.get('style'),
- d = a.ul
- c instanceof g.lM || (c = this.Iva(c))
- if (d && 0 < d.length) b = c.Q2(d, a)
- else {
- if (c.I8.length || c.ul.length) b = c.poa(a)
- b || (b = a.Eqa())
- }
- return b
- },
- UR: function (a) {
- function b(a, b) {
- return a.fm - b.fm
- }
- var c = [],
- d,
- e,
- f,
- h,
- k,
- l = {}
- for (d in a)
- if (a.hasOwnProperty(d)) {
- f = a[d]
- h = f.get('zIndex')
- for (e in l) if (l.hasOwnProperty(e) && ((k = c[l[e]][2]), k === h)) break
- 'undefined' === typeof l[h] && (c.push([[], [], h]), (l[h] = c.length - 1))
- h = c[l[h]]
- h[0].push(f)
- }
- c.sort(this.Txa)
- a = 0
- for (d = c.length; a < d; a += 1) c[a][0].sort(b)
- return c
- },
- featureChanged: function (a) {
- this.mm = !0
- var b = a.target,
- c = b.ec()
- 0 !== this.em.Jqa([g.a.yb(b)]).length && (this.em.remove(b, a.Lv), c && !a.Ioa && this.em.add(b))
- },
- k8: function (a) {
- this.mm = !0
- for (var b, c = 0, d = a.length; c < d; c += 1) (b = a[c]), (b.W.Lv = null), b.ss(!0), b.xl('feature')
- },
- DHa: function (a, b) {
- return a[1].zIndex === b[1].zIndex ? g.a.yb(a[1]) - g.a.yb(b[1]) : a[1].zIndex - b[1].zIndex
- },
- Txa: function (a, b) {
- return a[2] - b[2]
- },
- qHa: function (a) {
- return a.FEa() === g.o.kBa.UAa
- },
- $l: function (a) {
- return this.WC
- ? new g.M.Ke.Gl(this, a)
- : 'c' === this.map.get('overlayRender') && g.M.canvas.Gl
- ? new g.M.canvas.Gl(this, a)
- : g.M.be.Gl && 'd' === this.map.get('overlayRender')
- ? new g.M.be.Gl(this, a)
- : null
- },
- })
- g.o.fd.Hb({
- am: function (a) {
- return this.WC ? new g.Ea.Ke.Gl(this, a) : this.S.zj ? new g.Ea.Saa(this, a) : new g.Ea.Gl(this, a)
- },
- })
- g.o.laa = g.da.extend({
- A: function () {
- this.clear()
- },
- clear: function () {
- this.rq = []
- this.NT = new g.Kk()
- },
- add: function (a) {
- var b = g.a.yb(a),
- c = a.ec()
- this.rq[b] || ((this.count += 1), (this.rq[b] = a), c && !g.I.gb(c.Kd(), [Infinity, Infinity, -Infinity, -Infinity]) && this.NT.Gs(c.Kd(), a))
- },
- tEa: function () {
- return this.rq
- },
- xn: function (a) {
- return this.NT.gxa(a)
- },
- Jqa: function (a) {
- var b = a.length,
- c = [],
- d
- for (d = 0; d < b; d += 1) this.rq[a[d]] && c.push(this.rq[a[d]])
- return c
- },
- remove: function (a, b) {
- var c = g.a.yb(a).toString(),
- d = a.ec()
- this.rq[c] && ((this.rq[c] = null), d && ((c = 'undefined' !== typeof b ? b : d.Kd()), this.NT.remove(c, a)))
- },
- })
- g.Kk = g.da.extend({
- A: function (a) {
- this.z6 = 'undefined' !== typeof a ? a : 6
- this.VJ = Math.floor(this.z6 / 2)
- this.QK = { I: [Infinity, Infinity, -Infinity, -Infinity], Jb: [] }
- this.count = 0
- },
- rna: function (a, b) {
- var c = -1,
- d = [],
- e
- d.push(b)
- var f = b.Jb
- do {
- ;-1 !== c && (d.push(f[c]), (f = f[c].Jb), (c = -1))
- for (var h = f.length - 1; 0 <= h; h -= 1) {
- var k = f[h]
- if ('undefined' !== typeof k.Ve) {
- c = -1
- break
- }
- var l = g.Kk.Tz(k.I[2] - k.I[0], k.I[3] - k.I[1], k.Jb.length + 1),
- k = g.Kk.Tz(
- (k.I[2] > a.I[2] ? k.I[2] : a.I[2]) - (k.I[0] < a.I[0] ? k.I[0] : a.I[0]),
- (k.I[3] > a.I[3] ? k.I[3] : a.I[3]) - (k.I[1] < a.I[1] ? k.I[1] : a.I[1]),
- k.Jb.length + 2
- )
- if (0 > c || Math.abs(k - l) < e) (e = Math.abs(k - l)), (c = h)
- }
- } while (-1 !== c)
- return d
- },
- Gs: function (a, b, c) {
- a = { I: a, Ve: b }
- 'undefined' !== typeof c && (a.type = c)
- this.x5(a, this.QK)
- this.count += 1
- },
- x5: function (a, b) {
- var c
- if (0 === b.Jb.length) (b.I = g.I.cb(a.I)), b.Jb.push(a)
- else {
- var d = this.rna(a, b),
- e = a
- do {
- if (c && 'undefined' !== typeof c.Jb && 0 === c.Jb.length) {
- var f = c
- c = d.pop()
- for (var h = 0, k = c.Jb.length; h < k; h += 1)
- if (c.Jb[h] === f || 0 === c.Jb[h].Jb.length) {
- c.Jb.splice(h, 1)
- break
- }
- } else c = d.pop()
- f = e instanceof Array
- if ('undefined' !== typeof e.Ve || 'undefined' !== typeof e.Jb || f) {
- if (f) {
- f = 0
- for (h = e.length; f < h; f += 1) g.I.extend(c.I, e[f].I)
- c.Jb = c.Jb.concat(e)
- } else g.I.extend(c.I, e.I), c.Jb.push(e)
- if (c.Jb.length <= this.z6)
- if (0 < d.length) e = { I: g.I.cb(c.I) }
- else break
- else (e = f = this.lta(c.Jb)), 1 > d.length && (c.Jb.push(f[0]), d.push(c), (e = f[1]))
- } else g.I.extend(c.I, e.I), (e = { I: g.I.cb(c.I) })
- } while (0 < d.length)
- }
- },
- lta: function (a) {
- for (var b = this.Nva(a); 0 < a.length; ) this.Ova(a, b[0], b[1])
- return b
- },
- Nva: function (a) {
- for (var b = a.length - 1, c = 0, d = a.length - 1, e = 0, f = a.length - 2; 0 <= f; f -= 1) {
- var h = a[f]
- h.I[0] > a[c].I[0] ? (c = f) : h.I[2] < a[b].I[1] && (b = f)
- h.I[1] > a[e].I[1] ? (e = f) : h.I[3] < a[d].I[3] && (d = f)
- }
- Math.abs(a[b].I[2] - a[c].I[0]) > Math.abs(a[d].I[3] - a[e].I[1])
- ? b > c
- ? ((b = a.splice(b, 1)[0]), (c = a.splice(c, 1)[0]))
- : ((c = a.splice(c, 1)[0]), (b = a.splice(b, 1)[0]))
- : d > e
- ? ((b = a.splice(d, 1)[0]), (c = a.splice(e, 1)[0]))
- : ((c = a.splice(e, 1)[0]), (b = a.splice(d, 1)[0]))
- return [
- { I: g.I.cb(b.I), Jb: [b] },
- { I: g.I.cb(c.I), Jb: [c] },
- ]
- },
- Ova: function (a, b, c) {
- for (var d = g.Kk.Tz(b.I[2] - b.I[0], b.I[3] - b.I[1], b.Jb.length + 1), e = g.Kk.Tz(c.I[2] - c.I[0], c.I[3] - c.I[1], c.Jb.length + 1), f, h, k, l = a.length - 1; 0 <= l; l -= 1) {
- var m = a[l],
- n = [b.I[0] < m.I[0] ? b.I[0] : m.I[0], b.I[2] > m.I[2] ? b.I[2] : m.I[2], b.I[1] < m.I[1] ? b.I[1] : m.I[1], b.I[3] > m.I[3] ? b.I[3] : m.I[3]],
- n = Math.abs(g.Kk.Tz(n[1] - n[0], n[3] - n[2], b.Jb.length + 2) - d),
- m = [c.I[0] < m.I[0] ? c.I[0] : m.I[0], c.I[2] > m.I[2] ? c.I[2] : m.I[2], c.I[1] < m.I[1] ? c.I[1] : m.I[1], c.I[3] > m.I[3] ? c.I[3] : m.I[3]],
- m = Math.abs(g.Kk.Tz(m[1] - m[0], m[3] - m[2], c.Jb.length + 2) - e),
- p = Math.abs(m - n)
- if (!h || !f || p < f) (h = l), (f = p), (k = m < n ? c : b)
- }
- d = a.splice(h, 1)[0]
- b.Jb.length + a.length + 1 <= this.VJ
- ? (b.Jb.push(d), g.I.extend(b.I, d.I))
- : c.Jb.length + a.length + 1 <= this.VJ
- ? (c.Jb.push(d), g.I.extend(c.I, d.I))
- : (k.Jb.push(d), g.I.extend(k.I, d.I))
- },
- remove: function (a, b) {
- var c = []
- c[0] = { I: a }
- ;(c[1] = b) || (c[1] = !1)
- c[2] = this.QK
- this.count -= 1
- if (!1 === c[1]) {
- var d = 0,
- e = []
- do (d = e.length), (e = e.concat(this.n8.apply(this, c)))
- while (d !== e.length)
- return e
- }
- return this.n8.apply(this, c)
- },
- n8: function (a, b, c) {
- var d = [],
- e = [],
- f = []
- if (!a || !g.I.Zg(a.I, c.I)) return f
- a = g.I.cb(a.I)
- var h
- e.push(c.Jb.length)
- d.push(c)
- do {
- c = d.pop()
- var k = e.pop() - 1
- if ('undefined' !== typeof b)
- for (; 0 <= k; ) {
- var l = c.Jb[k]
- if (g.I.Zg(a, l.I))
- if ((b && 'undefined' !== typeof l.Ve && l.Ve === b) || (!b && ('undefined' !== typeof l.Ve || g.I.N2(a, l.I)))) {
- 'undefined' !== typeof l.Jb ? ((f = this.Nz(l, !0, [], l)), c.Jb.splice(k, 1)) : (f = c.Jb.splice(k, 1))
- g.Kk.XT(c)
- b = void 0
- c.Jb.length < this.VJ && (h = this.Nz(c, !0, [], c))
- break
- } else 'undefined' !== typeof l.Jb && (e.push(k), d.push(c), (c = l), (k = l.Jb.length))
- k -= 1
- }
- else if ('undefined' !== typeof h) {
- c.Jb.splice(k + 1, 1)
- 0 < c.Jb.length && g.Kk.XT(c)
- k = 0
- for (l = h.length; k < l; k += 1) this.x5(h[k], c)
- h.length = 0
- 0 === d.length && 1 >= c.Jb.length
- ? ((h = this.Nz(c, !0, h, c)), (c.Jb.length = 0), d.push(c), e.push(1))
- : 0 < d.length && c.Jb.length < this.VJ
- ? ((h = this.Nz(c, !0, h, c)), (c.Jb.length = 0))
- : (h = void 0)
- } else g.Kk.XT(c)
- } while (0 < d.length)
- return f
- },
- search: function (a, b) {
- return this.Nz({ I: a }, !1, [], this.QK, b)
- },
- gxa: function (a, b) {
- return this.Nz({ I: a }, !1, [], this.QK, b, !0)
- },
- Nz: function (a, b, c, d, e, f) {
- var h = {},
- k = []
- if (!g.I.Zg(a.I, d.I)) return f ? h : c
- k.push(d.Jb)
- do {
- d = k.pop()
- for (var l = d.length - 1; 0 <= l; l -= 1) {
- var m = d[l]
- if (g.I.Zg(a.I, m.I))
- if ('undefined' !== typeof m.Jb) k.push(m.Jb)
- else if ('undefined' !== typeof m.Ve)
- if (b) c.push(m)
- else if ('undefined' === typeof e || m.type === e) (m = m.Ve), 'undefined' !== typeof f ? (h[g.a.yb(m)] = m) : c.push(m)
- }
- } while (0 < k.length)
- return 'undefined' !== typeof f ? h : c
- },
- })
- g.Kk.XT = function (a) {
- var b = a.Jb.length,
- c = a.I
- if (0 === b) g.I.empty(c)
- else {
- var d = a.Jb[0].I
- c[0] = d[0]
- c[2] = d[2]
- c[1] = d[1]
- c[3] = d[3]
- for (d = 1; d < b; d += 1) g.I.extend(c, a.Jb[d].I)
- }
- }
- g.Kk.Tz = function (a, b, c) {
- var d = (a + b) / 2
- a *= b
- return (a * c) / (a / (d * d))
- }
- g.B = g.B || {}
- g.B.Eh = g.da.extend({
- ka: [g.va, g.Ze],
- sva: ['position', 'altitude', 'visible', 'clickable', 'bubble'],
- A: function (a, b) {
- this.map = b
- this.af(this.sva, a)
- this.X('zIndex', a)
- this.X('draggable', a)
- g.l.Tf && this.Gca()
- g.l.ba || this.GM()
- this.Lb = a
- this.Lb.B = this
- },
- draggableChanged: function () {
- this.get('draggable') ? this.FM() : this.yO()
- },
- qa: function (a, b) {
- var c
- c = b ? { type: a, pixel: b.Cb, target: this.Lb, lnglat: b.Nf, originEvent: b.vT } : { type: a }
- this.Lb && this.Lb.q(a, c)
- },
- rc: function (a) {
- ;(('click' !== a.type && 'rightclick' !== a.type && 'dblclick' !== a.type && 'longclick' !== a.type) || this.get('clickable')) && this.qa(a.type, a)
- },
- EM: function () {
- this.h('click', this.rc)
- this.h('rightclick', this.rc)
- this.h('longclick', this.rc)
- this.h('longpress', this.rc)
- this.h('dblclick', this.rc)
- },
- w1: function () {
- this.G('click', this.rc)
- this.G('rightclick', this.rc)
- this.G('longclick', this.rc)
- this.G('longpress', this.rc)
- this.G('dblclick', this.rc)
- },
- GM: function () {
- this.get('clickable') && this.EM()
- this.h('mousemove', this.rc)
- this.h('mouseout', this.rc)
- this.h('mouseover', this.rc)
- this.h('mousedown', this.rc)
- this.h('mouseup', this.rc)
- },
- ECa: function () {
- this.w1()
- this.G('mousemove', this.rc)
- this.G('mouseout', this.rc)
- this.G('mouseover', this.rc)
- this.G('mousedown', this.rc)
- this.G('mouseup', this.rc)
- },
- clickableChanged: function () {
- this.get('clickable') ? this.EM() : this.w1()
- },
- Gca: function () {
- this.get('clickable') && this.EM()
- this.h('touchstart', this.rc, this)
- this.h('touchmove', this.rc, this)
- this.h('touchend', this.rc, this)
- },
- FM: function () {
- this.h('dragstart', this.eu)
- this.h('dragging', this.cu)
- this.h('dragend', this.du)
- },
- eu: function (a) {
- this.map.WS(a)
- this.fg = a.Cb
- this.Z5 = a.Ta
- this.Y5 = a.Nf
- this.qa('dragstart', a)
- },
- cu: function (a) {
- var b = this.map.D.view.type
- if ('2D' == b) {
- var c = a.Cb.ab(this.fg),
- b = c.x,
- c = c.y
- this.fg = a.Cb
- var d = (this.map.get('rotation') * Math.PI) / 180,
- e = b * Math.cos(d) + Math.sin(d) * c,
- b = -Math.sin(d) * b + Math.cos(d) * c
- this.Zo(new g.H(e, b))
- this.qa('dragging', a)
- } else
- '3D' == b &&
- a.Ta &&
- ((c = a.Cb.ab(this.fg)),
- (b = c.x),
- (c = c.y),
- (e = a.Ta.ab(this.Z5)),
- a.Nf.ab(this.Y5),
- (this.fg = a.Cb),
- 'function' === typeof this.rz && this.rz(b, c, e),
- (this.Z5 = a.Ta),
- (this.Y5 = a.Nf),
- this.qa('dragging', a))
- },
- du: function (a) {
- this.map.ww()
- '3D' == this.map.D.view.type && this.Lb.reset && this.Lb.reset()
- this.qa('dragend', a)
- },
- yO: function () {
- this.G('dragstart', this.eu)
- this.G('dragging', this.cu)
- this.G('dragend', this.du)
- },
- yN: function (a) {
- var b,
- c,
- d = []
- if (a) for (b = 0, c = a.length; b < c; b += 1) d.push(this.zN(a[b]))
- return d
- },
- zN: function (a) {
- a = this.map.Bb(a)
- return [a.x, a.y]
- },
- hg: function (a) {
- var b = this.L.mb || this.map.get('centerCoords'),
- c = Math.pow(2, 20 - this.map.get('zoom'))
- return [(a[0] - b.x) / c, (a[1] - b.y) / c]
- },
- St: function (a, b) {
- var c = this.map.D,
- d = [],
- e = !1
- a[0] instanceof Array && 'number' !== typeof a[0][0] && (e = !0)
- if (e)
- for (var e = 0, f = a.length; e < f; e++) {
- for (var h = [], k = 0, l = a[e].length; k < l; k++) {
- var m = c.Bb(a[e][k])
- m.x += b[0]
- m.y += b[1]
- h.push(c.Od(m))
- }
- d.push(h)
- }
- else for (e = 0, f = a.length; e < f; e++) (h = c.Bb(a[e])), (h.x += b[0]), (h.y += b[1]), d.push(c.Od(h))
- return d
- },
- })
- g.B.vb = g.B.Eh.extend({
- fE: 'content contentDom icon opacity angle autoRotation offset textAlign verticalAlign shadow title label isTop shape topWhenClick topWhenMouseOver noSelect anchor'.split(' '),
- dma: { AMAP_ANIMATION_NONE: !1, AMAP_ANIMATION_DROP: g.Kj.Easing.Bounce, AMAP_ANIMATION_BOUNCE: g.Kj.Easing.Cubic },
- A: function (a, b) {
- arguments.callee.ma.apply(this, arguments)
- this.af(this.fE, a)
- this.X('move', a)
- this.Tma()
- this.Fu()
- this.set('AnimationOffset', new g.H(0, 0), !0)
- this.X('raiseOnDrag', a)
- this.X('animation', a)
- },
- QN: function (a, b, c) {
- var d = this.get('animation')
- if (d && 'AMAP_ANIMATION_NONE' !== d) {
- var e = this
- this.Gn = new g.Kj()
- this.Gn.transition = function (c, h, k) {
- if ('AMAP_ANIMATION_NONE' === d) return 0
- if (a && 600 <= k) return e.Gn.stop(), 0
- c = 0 === Math.floor(k / 600) % 2 ? 'Out' : 'In'
- 'out' === b ? (c = 'Out') : 'in' === b && (c = 'In')
- return e.dma[d][c]((k % 600) / 600)
- }
- c = c || 40
- this.Gn.Jq = function (a) {
- e.set('AnimationOffset', e.BO.add(new g.H(0, -1 * c * a)))
- }
- this.BO = new g.H(0, 0)
- this.Gn.Nn()
- }
- },
- AnimationOffsetChanged: function () {
- this.positionChanged()
- },
- y0: function () {
- this.Gn && (this.Gn.stop(), this.set('AnimationOffset', this.BO))
- this.set('AnimationOffset', new g.H(0, -40))
- if (this.nr) this.nr.set('position', this.get('position'))
- else {
- var a = new z.B.vb({
- zIndex: this.get('zIndex') - 1,
- icon: new z.B.ci({ image: g.r.Gb + '/theme/v1.3/dragCross.png', size: new g.xd(14, 11), innerOverlay: !0 }),
- offset: new g.H(-4, -5),
- position: this.get('position'),
- innerOverlay: !0,
- })
- a.Da = !0
- this.nr = a
- }
- this.nr.C = !0
- this.nr.setMap(this.map.D)
- this.nr.C = !1
- },
- kY: function () {
- this.set('animation', 'AMAP_ANIMATION_DROP', !0)
- this.QN(!0, 'in')
- this.nr.C = !0
- this.nr.C = !1
- },
- animationChanged: function () {
- this.Gn && (this.Gn.stop(), this.set('AnimationOffset', this.BO), (this.Gn = null))
- var a = this.get('animation')
- a && 'AMAP_ANIMATION_NONE' !== a && ('AMAP_ANIMATION_DROP' === a ? this.QN(!0, 'in', 100) : this.QN())
- },
- rg: function () {
- this.nr && this.nr.set('position', this.get('position'))
- },
- raiseOnDragChanged: function () {
- this.get('raiseOnDrag')
- ? (this.h('dragstart', this.y0, this), this.h('dragging', this.rg, this), this.h('dragend', this.kY, this))
- : (this.G('dragstart', this.y0, this), this.G('dragging', this.rg, this), this.G('dragend', this.kY, this))
- },
- Zo: function (a) {
- var b = this.get('position')
- a = this.map.Bb(b).add(a.Nd(Math.pow(2, 20 - this.map.get('zoom'))))
- b instanceof g.U ? this.set('position', this.map.Od(a)) : this.set('position', a)
- },
- rz: function (a, b) {
- var c = this.get('position'),
- d = this.get('altitude'),
- c = this.map.Ls(c, d),
- d = this.map.$p(new g.H(c.x + a, c.y + b), null, d)
- this.set('position', d)
- },
- Tma: function () {
- var a = this.get('content'),
- b = this.get('shadow'),
- c = this.get('offset'),
- d = this.get('label'),
- e,
- f = this
- e = a
- ? this.d2(a, c)
- : this.TP(this.get('icon'), function () {
- f.L && f.L.fa ? (g.l.zi && g.a.iepngFix(e), f.offsetChanged(), f.rL()) : f.map && f.map.set('display')
- })
- this.set('contentDom', e, !0)
- b && ((a = this.j2(b, c)), this.set('shadowDom', a, !0))
- d && d.content && this.set('labelDom', this.UP(d.content), !0)
- },
- UP: function (a) {
- var b = document.createElement('div')
- b.className = 'amap-marker-label'
- b.innerHTML = a
- return b
- },
- Fu: function () {
- var a = this.get('position')
- if (this.map && a && !this.L) {
- var b = this.map,
- a = this.map.Bb(a),
- a = (this.L = new g.ai({ name: 'marker-' + g.a.yb(this), map: b, W: new g.Aa.Mg([a.x, a.y]) }))
- a.Tp = this.Lb.CLASS_NAME
- a.uo = this
- this.X('coords', a, !0)
- a.af('offset textAlign verticalAlign isTop zIndex params noSelect'.split(' '), this)
- }
- },
- getParams: function () {
- return {
- zIndex: this.get('zIndex'),
- Rp: this.get('angle'),
- Ug: this.get('contentDom'),
- IJ: this.get('labelDom'),
- e9: this.get('shadowDom'),
- opacity: this.get('opacity'),
- altitude: this.get('altitude'),
- title: this.get('title'),
- label: this.get('label'),
- nF: this.get('AnimationOffset'),
- verticalAlign: this.get('verticalAlign'),
- textAlign: this.get('textAlign'),
- offset: this.get('offset'),
- S5: this.get('isTop'),
- shape: this.get('shape'),
- visible: this.get('visible') && !this.Lb.get('outOfZooms'),
- anchor: this.get('anchor'),
- }
- },
- offsetChanged: function () {
- function a(a) {
- var c = b.get('offset'),
- f = b.get('AnimationOffset'),
- h = b.get('verticalAlign'),
- k = b.get('textAlign'),
- l = Math.round(a.x) + c.x + f.x
- a = Math.round(a.y) + c.y + f.y
- var f = b.get('anchor'),
- m = b.L.Wj || g.f.Lo(b.L.Ug)
- b.L.Wj = m
- c = m[0]
- m = m[1]
- f && ((f = f.split('-')), 2 === f.length ? ((k = f[1]), (h = f[0])) : 1 === f.length && 'center' === f[0] && ((k = 'center'), (h = 'middle')))
- switch (k) {
- case 'center':
- l -= c / 2
- break
- case 'right':
- l -= c
- }
- switch (h) {
- case 'middle':
- a -= m / 2
- break
- case 'bottom':
- a -= m
- }
- b.L.fa.style.left = l + 'px'
- b.L.fa.style.top = a + 'px'
- }
- if (this.map)
- if (this.L && this.L.fa) {
- var b = this,
- c = this.map.D.view.type
- '2D' == c
- ? ((c = this.map.Bb(this.get('position'))),
- (c = c.ab(this.L.Na).ld(Math.pow(2, 20 - this.map.get('zoom')))),
- this.L.fa && (this.L.fa.LB && this.L.fa.parentNode !== this.L.fa.LB ? this.map.set('display') : a(c)))
- : '3D' == c &&
- ((c = this.get('position')),
- (c = this.map.Ls(c, this.get('altitude'))),
- this.L.fa && (this.L.fa.LB && this.L.fa.parentNode !== this.L.fa.LB ? this.map.set('display') : a(c)))
- } else this.map.set('display')
- },
- altitudeChanged: function () {
- this.offsetChanged()
- },
- positionChanged: function () {
- if (this.L) {
- var a = this.map.Bb(this.get('position'))
- this.set('coords', [a.x, a.y])
- this.map && ((this.L.cba = !0), this.offsetChanged())
- }
- },
- anchorChanged: function () {
- this.SF()
- },
- textAlignChanged: function () {
- this.SF()
- },
- verticalAlignChanged: function () {
- this.SF()
- },
- SF: function () {
- this.L && ((this.L.Wj = null), (this.L.re = !0), this.map && ((this.map.td.lm = !0), this.map.set('display')))
- },
- contentChanged: function () {
- if (this.L) {
- this.L.Wj = null
- this.map.td.lm = !0
- ;-1 === g.a.indexOf(this.map.td.ah, this.L) && this.map.td.ah.push(this.L)
- var a = this.get('contentDom')
- this.L.fa && this.L.fa === a.parentNode && this.L.fa.removeChild(a)
- var a = this.get('content'),
- b = this.get('offset'),
- a = this.d2(a, b)
- this.set('contentDom', a)
- this.L.fa ? (g.l.zi && g.a.iepngFix(a), this.L.fa.appendChild(a), (this.L.Ug = a), this.offsetChanged(), this.rL()) : this.map && this.map.set('display')
- this.titleChanged()
- }
- },
- iconChanged: function () {
- if (this.L && !this.get('content')) {
- this.L.Wj = null
- this.map.td.lm = !0
- ;-1 === g.a.indexOf(this.map.td.ah, this.L) && this.map.td.ah.push(this.L)
- this.L.fa && this.get('contentDom') && this.L.fa.removeChild(this.get('contentDom'))
- var a = this.get('icon')
- this.get('offset')
- var b = this,
- c = this.TP(a, function () {
- b.L && b.L.fa ? (g.l.zi && g.a.iepngFix(c), b.offsetChanged(), b.rL()) : b.map && b.map.set('display')
- })
- this.set('contentDom', c)
- this.L.fa && (this.L.fa.appendChild(c), (this.L.Ug = c))
- this.titleChanged()
- }
- },
- shadowChanged: function () {
- if (this.L) {
- var a = this.get('shadowDom')
- this.L.fa && a && a.parentNode === this.L.fa && this.L.fa.removeChild(a)
- if ((a = this.get('shadow'))) {
- var b = this.get('offset'),
- a = this.j2(a, b)
- this.set('shadowDom', a)
- this.L.fa && this.L.fa.appendChild(a)
- }
- }
- },
- titleChanged: function () {
- this.L && this.L.Ug && 'string' === typeof this.get('title') && this.L.Ug && this.get('title') && (this.L.Ug.title = this.get('title'))
- },
- rL: function (a, b) {
- a = a || this.get('label')
- b = b || this.get('labelDom')
- if (a && b) {
- var c = a.direction,
- d = this.L.Wj || g.f.Lo(this.L.Ug),
- e = d[0],
- d = d[1],
- f = g.f.Lo(b),
- h = f[0],
- k = f[1]
- this.L.Cv = f
- var l = (f = 0)
- switch (c) {
- case 'top':
- f = -k
- l = (e - h) / 2
- break
- case 'right':
- f = (d - k) / 2
- l = e
- break
- case 'bottom':
- f = d
- l = (e - h) / 2
- break
- case 'left':
- f = (d - k) / 2
- l = -h
- break
- case 'center':
- ;(f = (d - k) / 2), (l = (e - h) / 2)
- }
- a.offset && ((f += a.offset.y), (l += a.offset.x))
- b.style.top = f + 'px'
- b.style.left = l + 'px'
- }
- },
- labelChanged: function (a) {
- a = a || this.get('label')
- if (this.L && this.L.fa) {
- this.L.Cv = null
- var b = this.L.fa,
- c = this.get('labelDom')
- c && c.parentNode === b && b.removeChild(c)
- a && a.content && ((c = ''), a.content && ((c = this.UP(a.content)), b.appendChild(c), this.rL(a, c)), this.set('labelDom', c))
- } else a && a.content ? this.set('labelDom', this.UP(a.content), !0) : this.set('labelDom', null)
- },
- isTopChanged: function () {
- var a = this.map.td.iL,
- b = this.get('isTop'),
- c = this.get('zIndex')
- a
- ? a === this
- ? this.L && this.L.fa && ((this.L.fa.style.zIndex = b ? this.map.td.er + 10 : c), (this.map.td.iL = b ? this : null))
- : (a.L && a.L.fa && (a.L.fa.style.zIndex = b ? a.get('zIndex') : this.map.td.er + 10),
- this.L && this.L.fa && (this.L.fa.style.zIndex = b ? this.map.td.er + 10 : c),
- (this.map.td.iL = b ? this : a))
- : ((this.map.td.iL = this), this.L && this.L.fa && (this.L.fa.style.zIndex = b ? this.map.td.er + 10 : c))
- },
- visibleChanged: function () {
- this.L && this.L.fa && (this.get('visible') && !this.Lb.get('outOfZooms') ? (this.L.fa.style.display = 'block') : (this.L.fa.style.display = 'none'))
- },
- jva: function () {
- this.visibleChanged()
- },
- angleChanged: function () {
- if (!g.l.Ue && this.L && this.L.fa) {
- var a = this.L,
- b = a.get('params'),
- c = b.textAlign,
- d = b.verticalAlign,
- e = b.offset,
- b = e.x,
- e = e.y
- this.SF()
- if ('AMap.Text' == a.Tp) {
- var e = (b = 0),
- f = a.Wj || g.f.Lo(a.Ug),
- h = f[0],
- k = f[1]
- a.Wj = f
- switch (c) {
- case 'center':
- b = h / 2
- break
- case 'right':
- b = h
- }
- switch (d) {
- case 'middle':
- e = k / 2
- break
- case 'bottom':
- e = k
- }
- } else (b = -b), (e = -e)
- g.f.rotate(this.L.fa, this.get('angle') || 0, { x: b, y: e })
- }
- },
- zIndexChanged: function () {
- var a = this.get('zIndex')
- if (a > this.map.td.er) {
- this.map.td.er = a
- var b = this.map.td.iL
- b && b.L && b.L.fa && (b.L.fa.style.zIndex = a + 10)
- }
- this.L && this.L.fa && (this.L.fa.style.zIndex = this.get('isTop') ? this.map.td.er + 10 : this.get('zIndex'))
- },
- opacityChanged: function () {
- var a = this.get('contentDom'),
- b = this.get('shadowDom')
- a && g.f.Xq(a, this.get('opacity'))
- b && g.f.Xq(b, this.get('opacity'))
- },
- d2: function (a) {
- var b
- b = document.createElement('div')
- b.className = 'amap-marker-content'
- 'string' !== typeof a ? b.appendChild(a) : ((b.innerHTML = a), b.childNodes[0] && !b.childNodes[0].style && (b.style['white-space'] = 'pre'))
- g.f.Xq(b, this.get('opacity'))
- return b
- },
- TP: function (a, b) {
- var c,
- d = 0,
- e = 0,
- f,
- h,
- k,
- l,
- m,
- n
- a
- ? ('string' === typeof a
- ? ((c = a), (n = !0))
- : ((c = a.get('image')), (e = a.get('size')), (f = a.get('imageSize')), (d = e.width), (e = e.height), f && ((l = f.width), (m = f.height))),
- (f = 'string' !== typeof a ? a.get('imageOffset') : { x: 0, y: 0 }))
- : ((c = g.r.Hi + '/mark_bs.png'), (f = { x: 0, y: 0 }), (d = 19), (e = 33), (l = 19), (m = 33))
- h = document.createElement('div')
- h.className = 'amap-icon'
- h.style.position = 'absolute'
- h.style.overflow = n ? 'inherit' : 'hidden'
- d && (h.style.width = d + 'px')
- e && (h.style.height = e + 'px')
- k = document.createElement('img')
- l && m && ((k.style.width = l + 'px'), (k.style.height = m + 'px'))
- k.style.top = f.y + 'px'
- k.style.left = f.x + 'px'
- h.appendChild(k)
- g.f.Xq(g.l.Ue && n ? k : h, this.get('opacity'))
- ;(d && e) || (h.yM = !1)
- g.F.h(
- k,
- 'load',
- function q() {
- this.L && (this.L.Wj = null)
- this.map && this.map.td && (this.map.td.lm = !0)
- g.F.G(k, 'load', q, this)
- if (this.L && this.L.fa) {
- var a = this.get('labelDom')
- a && this.L.fa.appendChild(a)
- }
- h.yM = !0
- b && b()
- },
- this
- )
- k.src = c
- return h
- },
- j2: function (a) {
- a = this.TP(a)
- a.style.zIndex = -1
- return a
- },
- moveChanged: function () {
- var a = this.get('move')
- if (!1 === a) return this.dya()
- void 0 !== a &&
- ('pause' === a.action
- ? this.Lva()
- : '[object Array]' === Object.prototype.toString.call(a.Nf)
- ? a.Nf &&
- ('resume' === a.action && this.NG
- ? this.moveTo(a.Nf[a.Nf.Kp || 0], a.speed, a.xb)
- : (this.NG && this.q('movestop'), (a.Nf.Kp = 0), this.set('position', a.Nf[0]), this.nua(a.Nf, a.speed, a.xb, a.vna)))
- : this.moveTo(a.Nf, a.speed, a.xb, !0))
- },
- moveTo: function (a, b, c, d) {
- if (!(0 >= b)) {
- var e = this.get('position')
- a.ab(e)
- var f = Math.round((a.Ge(e) / 1e3 / b) * 36e5)
- if (0 === f) return this.q('moveend')
- this.yh && (this.yh.stop(), (this.yh = null))
- this.yh = new g.Kj(e, a)
- c =
- c ||
- function (a) {
- return a
- }
- this.yh.transition = function (a, b, d) {
- if (d >= f) return b
- var e = (b.R - a.R) * c(d / f) + a.R
- a = (b.Q - a.Q) * c(d / f) + a.Q
- return new g.U(e, a)
- }
- this.yh.Jq = function (b) {
- this.set('position', b)
- d && this.Lb.q('moving', { target: this.Lb, passedPath: [this.yh.start, this.get('position')] })
- this.q('moving')
- b.gb(a) && (this.yh && (this.yh.stop(), (this.yh = null)), this.Lb.q('moveend', { target: this.Lb }), this.q('moveend'))
- }
- this.get('autoRotation') && !g.l.Ue && ((b = '2D' == (this.map.D.view.type || '2D') ? this.Yea(e, a) : this.Zea(e, a)), this.set('angle', b))
- this.yh.Nn(this)
- }
- },
- dya: function () {
- this.yh && (this.yh.stop(), (this.yh = null), this.q('movestop'))
- },
- Lva: function () {
- this.yh && (this.yh.stop(), (this.yh = null), this.q('movepause'))
- },
- nua: function (a, b, c, d) {
- function e() {
- var b = a.slice(0, a.Kp || 0)
- b.push(this.get('position'))
- this.Lb.q('moving', { target: this.Lb, passedPath: b })
- }
- function f() {
- a.Kp < a.length - 1 ? ((a.Kp += 1), this.moveTo(a[a.Kp], b, c)) : (this.qa('movealong'), d ? ((a.Kp = 0), this.set('position', a[0]), this.moveTo(a[a.Kp], b, c)) : this.q('movestop'))
- }
- var h = Math.min(a.Kp || 0, a.length - 1)
- this.NG ||
- ((this.NG = !0),
- this.h('moving', e, this),
- this.h('moveend', f, this),
- this.h(
- 'movestop',
- function l() {
- this.NG = !1
- this.G('moveend', f, this)
- this.G('moving', e, this)
- this.G('movestop', l, this)
- },
- this
- ))
- this.moveTo(a[h], b, c)
- },
- Zea: function (a, b) {
- var c = this.map,
- d = c.Ls(a),
- c = c.Ls(b),
- e = 0
- c.Ge(d)
- var f = c.y - d.y,
- h = c.x - d.x
- 0 !== c.x - d.x
- ? ((e = Math.atan((c.y - d.y) / (c.x - d.x))), 0 <= f && 0 > h ? (e = Math.PI + e) : 0 > f && 0 >= h ? (e = Math.PI + e) : 0 > f && 0 <= h && (e = 2 * Math.PI + e))
- : (e = c.y > d.y ? Math.PI / 2 : (3 * Math.PI) / 2)
- return g.a.wb((180 * e) / Math.PI, 1)
- },
- Yea: function (a, b) {
- var c = this.map,
- d = c.Bb(a),
- c = c.Bb(b),
- e = 0
- c.Ge(d)
- var f = c.y - d.y,
- h = c.x - d.x
- 0 !== c.x - d.x
- ? ((e = Math.atan((c.y - d.y) / (c.x - d.x))), 0 <= f && 0 > h ? (e = Math.PI + e) : 0 > f && 0 >= h ? (e = Math.PI + e) : 0 > f && 0 <= h && (e = 2 * Math.PI + e))
- : (e = c.y > d.y ? Math.PI / 2 : (3 * Math.PI) / 2)
- return g.a.wb((180 * e) / Math.PI, 1)
- },
- })
- g.B.Tn = g.B.Eh.extend({
- A: function (a, b) {
- arguments.callee.ma.apply(this, arguments)
- this.X('items', a, !0)
- this.X('content', a, !0)
- this.X('resolution', b)
- this.X('centerCoords', b)
- this.Sp = a
- },
- Ts: function (a) {
- this.Yg()
- this.tt()
- this.Em()
- this.xl('resolution')
- this.xl('centerCoords')
- this.xl('render')
- this.X('resolution', a)
- this.X('centerCoords', a)
- this.X('render', a)
- this.map.h('movestart', this.$m, this)
- this.map.h('mapmove', this.$m, this)
- this.map.h('zoomstart', this.$m, this)
- this.map.h('click', this.$m, this)
- this.map.h('closeOverlays', this.$m, this)
- this.map.h('rotate', this.$m, this)
- },
- $m: function () {
- this.Sp.map && ((this.Sp.C = !0), this.Sp.close(), (this.Sp.C = !1))
- },
- mapChanged: function () {},
- positionChanged: function () {
- this.Em()
- },
- renderChanged: function () {
- this.Em()
- },
- Yg: function () {
- this.K && (this.K.parentNode && this.K.parentNode.removeChild(this.K), (this.K = null))
- var a = g.f.create('div', null, 'amap-menu')
- g.F.h(
- a,
- 'mousedown',
- function (a) {
- g.F.stopPropagation(a)
- },
- this
- )
- this.K = a
- this.map.Xa.B.appendChild(this.K)
- },
- tt: function () {
- var a = this,
- b = this.K
- b.innerHTML = ''
- var c = this.get('content')
- if ('object' === typeof c) b.appendChild(c)
- else if ('string' === typeof c) b.innerHTML = c
- else if ((c = this.get('items')) && c.length) {
- var d = g.f.create('ul', b, 'amap-menu-outer')
- c.sort(function (a, b) {
- return isNaN(a.jK) || isNaN(b.jK) ? 0 : a.jK - b.jK
- })
- for (b = 0; b < c.length; b += 1)
- (function (b) {
- var c = b.Qn,
- h = b.xb,
- k = g.f.create('li', d)
- k.innerHTML = c
- g.F.h(
- k,
- 'click',
- function () {
- h.call(k)
- a.Sp.C = !0
- a.Sp.close()
- a.Sp.C = !1
- },
- k
- )
- })(c[b])
- } else this.K.innerHTML = ''
- },
- Em: function () {
- var a = this.map,
- b = this.K
- a &&
- b &&
- (this.map.get('zoom'),
- (b = this.get('position')),
- (b = a.Ls(b)),
- (a = b.y),
- (b = b.x),
- (this.K.style.right = ''),
- (this.K.style.bottom = ''),
- (this.K.style.left = b + 'px'),
- (this.K.style.top = a + 'px'))
- },
- gg: function () {
- this.K &&
- (this.map.G('click', this.QBa, this),
- this.map.Xa.B.removeChild(this.K),
- (this.Sp.qi = !1),
- (this.K = this.Sp.Ce.map = null),
- this.map.G('movestart', this.$m, this),
- this.map.G('zoomstart', this.$m, this),
- this.map.G('click', this.$m, this),
- this.map.G('closeOverlays', this.$m, this),
- this.map.G('rotate', this.$m, this))
- },
- visibleChanged: function () {
- this.K && (this.get('visible') ? (this.K.style.display = 'block') : (this.K.style.display = 'none'))
- },
- itemsChanged: function () {
- this.K && this.tt()
- },
- })
- g.B.Ye = g.B.Eh.extend({
- A: function (a, b) {
- arguments.callee.ma.apply(this, arguments)
- this.af('content contentDom position contentU altitude isCustom autoMove showShadow closeWhenClickMap size offset anchor'.split(' '), a)
- this.X('retainWhenClose', a, !0)
- a.X('toBeClose', this)
- this.rf = a
- },
- Ts: function (a) {
- this.Yna || (this.Yg(), this.tt())
- this.xl('resolution')
- this.xl('centerCoords')
- this.xl('render')
- this.X('resolution', a)
- this.X('centerCoords', a)
- this.X('render', a)
- this.map = a
- a.Xa.B.appendChild(this.Qc)
- this.zV()
- this.Em()
- this.nX()
- this.Yna = !0
- this.Nna()
- this.Lb.q('onAdd', { type: 'onAdd', target: this.Lb })
- },
- Yg: function () {
- var a = g.f.create('div')
- a.className = 'amap-info'
- var b = g.f.create('div', a, 'amap-info-shadowContainer'),
- c = g.f.create('div', a),
- d = this.get('anchor'),
- e = 'amap-info-contentContainer'
- d && (e = d + ' amap-info-contentContainer')
- d = g.f.create('div', c, e)
- a.style.position = 'absolute'
- c.style.position = 'absolute'
- c.style.bottom = '0px'
- c.style.left = '0px'
- b.style.position = 'absolute'
- this.Qc = a
- this.Oh = c
- this.JU = b
- this.ph = d
- this.set('contentDom', this.ph, !0)
- },
- tt: function () {
- var a = this.get('contentU')
- if (a) {
- var b = this.get('isCustom'),
- c = this.ph,
- d = this.JU
- c.innerHTML = ''
- var e = null
- if (b) {
- if ('string' === typeof a) c.innerHTML = a
- else if (a instanceof Array) for (e = 0; e < a.length; e += 1) c.appendChild(a[e])
- else c.appendChild(a)
- e = c
- d.parentNode && d.parentNode.removeChild(d)
- } else {
- e = 'amap-info-content amap-info-outer'
- g.l.Ue && (e += ' amap-info-content-ie8')
- e = this.ksa = d = g.f.create('div', c, e)
- 'string' === typeof a ? (d.innerHTML = a) : d.appendChild(a)
- this.$na = d
- a = g.f.create('a', this.ksa, 'amap-info-close')
- a.innerHTML = '\u00d7'
- this.hQ = a
- a.href = 'javascript: void(0)'
- g.l.Tf &&
- (g.F.h(
- a,
- 'touchstart',
- function (a) {
- g.F.stop(a)
- },
- this
- ),
- g.F.h(
- a,
- 'touchend',
- function (a) {
- g.F.stop(a)
- this.rf.C = !0
- this.rf.close()
- this.rf.C = !1
- },
- this
- ),
- g.F.h(
- a,
- 'click',
- function (a) {
- g.F.stop(a)
- this.rf.C = !0
- this.rf.close()
- this.rf.C = !1
- },
- this
- ))
- g.l.ba ||
- (g.F.h(
- a,
- 'mousedown',
- function (a) {
- g.F.stop(a)
- },
- this
- ),
- g.F.h(
- a,
- 'click',
- function (a) {
- g.F.stop(a)
- this.rf.C = !0
- this.rf.close()
- this.rf.C = !1
- },
- this
- ))
- if ((a = this.get('size', !0))) 0 !== a.width && (d.style.width = a.width + 'px'), 0 !== a.height && (d.style.height = a.height + 'px')
- this.get('anchor')
- g.f.create('div', c, g.l.Ue ? 'amap-info-sharp-old' : 'amap-info-sharp')
- this.JU.style.display = 'block'
- }
- g.F.bya(e)
- }
- },
- zV: function () {
- var a = this.get('isCustom'),
- b = this.get('showShadow')
- if (!a && b) {
- var a = this.JU,
- b = g.f.lJ(this.ph),
- c = b.height - 23,
- d = b.width
- if (g.l.zi || g.l.sv) (c = this.ph.childNodes[0].offsetHeight), (d = this.ph.childNodes[0].offsetWidth + 26)
- b = 'background-image:url(' + g.r.Gb + (g.l.zi ? '/theme/v1.3/iws.gif);' : '/theme/v1.3/iws.png);')
- a.innerHTML = ''
- var e = [],
- f
- f = e[1] = {}
- f.height = 0.5 * c + 4
- f.width = d
- f.offsetX = 400
- f.offsetY = 16
- f.top = -f.height - 10 - 15
- f.left = 23
- f = e[2] = {}
- f.height = e[1].height
- f.width = e[1].height
- f.offsetX = 1075 - f.width
- f.offsetY = e[1].offsetY
- f.top = e[1].top
- f.left = 23 + e[1].width
- f = e[3] = {}
- f.height = 10
- f.width = 22
- f.offsetX = 30
- f.offsetY = 445
- f.top = -25
- f.left = 23 + (g.l.sv || g.l.zi ? 5 : 0)
- f = e[4] = {}
- f.height = 10
- f.width = d / 2 - 15 - e[3].left - e[3].width
- f.offsetX = 132
- f.offsetY = 445
- f.top = -25
- f.left = e[3].left + e[3].width
- f = e[5] = {}
- f.height = 10
- f.width = 70
- f.offsetX = 80
- f.offsetY = 445
- f.top = -25
- f.left = e[4].left + e[4].width
- f = e[6] = {}
- f.height = 10
- f.width = d - e[5].left - e[5].width
- f.offsetX = 132
- f.offsetY = 445
- f.top = -25
- f.left = e[5].left + e[5].width
- f = e[7] = {}
- f.height = 10
- f.width = 30
- f.offsetX = 621
- f.offsetY = 445
- f.top = -25
- f.left = d
- f = e[8] = {}
- f.height = 15
- f.width = 70
- f.offsetX = 47
- f.offsetY = 470
- f.top = -15
- f.left = d / 2 - 15
- for (c = 1; 8 >= c; c += 1)
- (d = g.f.create('div', a)),
- (f = []),
- f.push('position:absolute;'),
- f.push(b),
- f.push('top:' + e[c].top + 'px;'),
- f.push('left:' + e[c].left + 'px;'),
- f.push('width:' + e[c].width + 'px;'),
- f.push('height:' + e[c].height + 'px;'),
- f.push('background-position:' + -e[c].offsetX + 'px ' + -e[c].offsetY + 'px;'),
- (d.style.cssText = f.join(''))
- }
- },
- hIa: function () {},
- Em: function () {
- var a = this.map,
- b = this.Qc,
- c = this.get('position'),
- d = this.get('anchor')
- if (a && b && c) {
- a = a.Ls(c, this.get('altitude'))
- d && (this.ph.className = d + ' amap-info-contentContainer')
- var e = g.f.lJ(this.ph)
- if (g.l.zi || g.l.sv) e.width = this.ph.childNodes[0].offsetWidth + 14
- b = e.height
- c = this.get('offset')
- this.get('isCustom')
- e = e.width
- this.Qc.style.left = Math.round(a.x - e / 2 + (c.x || 0)) + 'px'
- this.Qc.style.top = Math.round(a.y + (c.y || 0)) + 'px'
- if (d) {
- var f
- 'center' == d ? ((d = 'center'), (f = 'middle')) : ((f = d.split('-')), (d = f[1]), (f = f[0]))
- switch (f) {
- case 'middle':
- this.Qc.style.top = Math.round(a.y + b / 2 + (c.y || 0)) + 'px'
- break
- case 'top':
- this.Qc.style.top = Math.round(a.y + b + (c.y || 0)) + 'px'
- }
- switch (d) {
- case 'left':
- this.Qc.style.left = Math.round(a.x + (c.x || 0)) + 'px'
- break
- case 'right':
- this.Qc.style.left = Math.round(a.x - e + (c.x || 0)) + 'px'
- }
- }
- d = this.$na
- if (this.hQ && d.childNodes[0]) {
- for (b = a = 0; b < d.childNodes.length; b += 1) a += d.childNodes[0].clientHeight || 0
- a > (this.get('size').height || d.clientHeight) ? (this.hQ.style.right = '20px') : (this.hQ.style.right = '5px')
- }
- }
- },
- Bda: function () {
- var a = new g.H(2 - this.ph.offsetWidth / 2, 2 - this.ph.offsetHeight),
- b = this.get('offset') || new g.H(0, 0),
- c = this.get('anchor')
- if (c) {
- var a = this.ph.offsetWidth,
- d = this.ph.offsetHeight,
- e,
- f,
- h = 2 - a / 2,
- k = 2 - d
- c && ((c = c.split('-')), 2 === c.length ? ((e = c[1]), (f = c[0])) : 1 === c.length && 'center' === c[0] && ((e = 'center'), (f = 'middle')))
- switch (e) {
- case 'left':
- h = 2
- break
- case 'right':
- h = -a
- }
- switch (f) {
- case 'middle':
- k = -d / 2
- break
- case 'top':
- k = -2
- }
- a = new g.H(h, k)
- }
- this.get('isCustom') || (a = a.add(new g.H(0, -23)))
- return a.add(b)
- },
- altitudeChanged: function () {
- this.Em()
- },
- nX: function () {
- if (this.get('position') && this.get('autoMove') && this.ph) {
- for (
- var a = this.map,
- b = new g.xd(this.ph.offsetWidth, this.ph.offsetHeight),
- c = a.Ls(this.get('position'), this.get('altitude')).add(this.Bda()),
- d = c.add(b.PE()),
- e = a.get('size'),
- f = a.wqa(),
- h = 0,
- k = 0,
- l = 0;
- l < f.length;
- l += 1
- ) {
- var m = f[l],
- n = 0,
- p = 0
- 0 === m[1] && 0 === m[2]
- ? ((n = m[3] - (c.x + h)), (p = m[0] - (c.y + k)), 0 < n && 0 < p && (Math.abs(n) < Math.abs(p) ? (h += n) : (k += p)))
- : 0 === m[2] && 0 === m[3]
- ? ((n = e.vj() - m[1] - (d.x + h)), (p = m[0] - (c.y + k)), 0 > n && 0 < p && (Math.abs(n) < Math.abs(p) ? (h += n) : (k += p)))
- : 0 === m[0] && 0 === m[3]
- ? ((n = e.vj() - m[1] - (d.x + h)), (p = e.tj() - m[2] - (d.y + k)), 0 > n && 0 > p && (Math.abs(n) < Math.abs(p) ? (h += n) : (k += p)))
- : 0 === m[0] && 0 === m[1] && ((n = m[3] - (c.x + h)), (p = e.tj() - m[2] - (d.y + k)), 0 < n && 0 > p && (Math.abs(n) < Math.abs(p) ? (h += n) : (k += p)))
- }
- c = c.add(new g.H(h, k))
- d = d.add(new g.H(h, k))
- l = f = 0
- 0 > c.x || b.vj() > e.vj() ? (f = 20 - c.x) : e.vj() < d.x && (f = e.vj() - d.x - 25)
- 0 > c.y || b.tj() > e.tj() ? (l = 5 - c.y) : e.tj() < d.y && (l = e.tj() - d.y - 15)
- f += h
- l += k
- if (f || l) (a.D.C = !0), a.D.panBy(f, l), (a.D.C = !1)
- }
- },
- Nna: function () {
- this.get('closeWhenClickMap') && (this.map.h('clickstart', this.A_, this, !1), this.map.h('clickend', this.z_, this, !1))
- },
- A_: function () {
- this.rf.qi && ((this.rf.C = !0), this.rf.getIsOpen() && (this.rf.hL = !0), (this.rf.C = !1))
- },
- z_: function () {
- this.rf.qi && (this.rf.hL && ((this.rf.C = !0), this.rf.close(), (this.rf.C = !1)), (this.rf.hL = !1))
- },
- gg: function () {
- this.Qc &&
- this.map &&
- ((this.rf.hL = !1),
- this.get('closeWhenClickMap') && (this.map.G('clickstart', this.A_, this), this.map.G('clickend', this.z_, this)),
- this.get('retainWhenClose') ? this.map.Ml.appendChild(this.Qc) : (this.Qc.parentNode === this.map.Xa.B && this.map.Xa.B.removeChild(this.Qc), (this.rf.B = null)),
- (this.map = null),
- (this.rf.qi = !1),
- this.Lb.q('close', { type: 'close', target: this.Lb }))
- },
- $Ba: function () {
- if (!this.get('isCustom')) return this.ph.offsetWidth
- for (var a = this.gi, b = a.firstChild, c = a.lastChild; b && c && b.style && c.style && b === c; ) (a = b), (b = a.firstChild), (c = a.lastChild)
- a = g.f.Zc(a, 'width')
- return (a = parseInt(a.replace('px', ''), 10))
- },
- renderChanged: function () {
- this.Em()
- },
- positionChanged: function () {
- this.map && this.Qc && (this.Em(), this.nX())
- },
- anchorChanged: function () {
- this.positionChanged()
- },
- offsetChanged: function () {
- this.positionChanged()
- },
- contentChanged: function () {
- this.tt()
- this.zV()
- this.Em()
- },
- sizeChanged: function () {
- this.tt()
- this.zV()
- this.Em()
- },
- })
- g.Aa = {}
- g.Aa.Oe = g.da.extend({
- ka: [g.va, g.Ze],
- A: function () {},
- ev: function () {
- var a = this.Kd()
- a.oh || (a.oh = g.I.xi(a))
- return a.oh
- },
- cb: function () {
- return new this.A(this.za)
- },
- rR: function () {
- return this.za
- },
- setCoords: function (a) {
- this.S8(a)
- },
- S8: function (a) {
- this.Lv = this.Kd()
- this.xg = null
- if (g.Aa.xp && this instanceof g.Aa.xp) {
- var b = a.length
- this.je = this.je.slice(0, b)
- for (var c = 0; c < b; c += 1)
- if (this.je[c]) this.je[c].S8(a[c])
- else {
- var d = new g.Aa.Dc(a[c])
- this.je[c] = d
- }
- } else if (g.Aa.Dc && this instanceof g.Aa.Dc) {
- b = a.length
- this.Qf = Array(b)
- for (var e, c = 0; c < b; c += 1)
- if (((d = a[c]), (e = new g.Aa.SL(d)), (this.Qf[c] = e), 0 === c)) {
- if (0 === d.length) break
- e.uq(d) || d.reverse()
- } else 0 !== d.length && e.uq(d) && d.reverse()
- } else this.za = a
- },
- })
- g.Aa.Pe = g.extend({}, { Uw: 'point', OL: 'linestring', oW: 'linearring', EF: 'polygon', $L: 'multipoint', ZL: 'multilinestring', AF: 'multipolygon', EAa: 'geometrycollection' })
- g.ai = g.da.extend({
- ka: [g.va, g.Ze],
- A: function (a) {
- a = a || {}
- a.wB && (this.wB = a.wB)
- a.SN && (this.SN = a.SN)
- a.JZ && (this.JZ = a.JZ)
- this.map = a.map
- this.fm = a.tN || g.a.yb(this)
- this.name = a.name || ''
- this.re = !1
- this.set('visible', !0, !0)
- this.BU(a.W)
- this.ul = a.dL
- this.style = a.style
- },
- Soa: function () {
- this.name = this.map = null
- this.style = this.ul = this.uo = this.g6 = this.W = this.W.Oa = null
- this.yl()
- this.ti()
- },
- qra: function () {
- return this.ul
- },
- Hxa: function (a) {
- this.ul = a
- this.zIndex = this.ul[0].Hk || this.zIndex
- },
- ec: function () {
- return this.W
- },
- BU: function (a) {
- a && ((this.W = a), this.X('coords', a, !0), this.wB || this.SN) && (a.X('radius', this), a.X('center', this), a.X('resolution', this), a.X('strokeWeight', this))
- },
- setStyle: function (a) {
- this.Hxa(a)
- this.ss()
- },
- coordsChanged: function () {
- this.ss()
- },
- radiusChanged: function () {
- this.W.Lv = this.W.Kd()
- this.W.xg = null
- this.ss()
- },
- ss: function (a) {
- this.set('feature', { target: this, Ioa: a, Lv: this.W.Lv || this.W.Kd(), tua: this.W.Kd() })
- this.W.Lv = this.W.Kd()
- },
- visibleChanged: function () {
- this.ss()
- },
- LEa: function (a) {
- for (var b = 0; b < this.ul.length; b += 1) {
- var c = this.ul[b]
- if (a.gb(c.ty(this))) return c
- }
- },
- Eqa: function () {
- var a = this.ec(),
- b = []
- a.yi() === g.Aa.Pe.EF || a.yi() === g.Aa.Pe.AF
- ? b.push(new g.style.Be.Dc({ fillColor: '#78cdd1', le: 0.2, strokeColor: '#122e29', pb: 0.5, pc: 1 }))
- : a.yi() === g.Aa.Pe.OL || a.yi() === g.Aa.Pe.oW || a.yi() === g.Aa.Pe.ZL
- ? b.push(new g.style.Be.wp({ color: '#888888', width: 1, zIndex: 10 }))
- : (a.yi() !== g.Aa.Pe.Uw && a.yi() !== g.Aa.Pe.$L) ||
- b.push(new g.style.Be.ci({ url: g.r.Gb + '/theme/v1.3/markers/0.png', width: 36, height: 36, rotation: 0, yIa: -12, AIa: -36, zIndex: 100 }))
- return b
- },
- })
- g.ai.zAa = 'geometry'
- g.Aa.Mg = g.Aa.Oe.extend({
- A: function (a, b) {
- this.za = a
- this.zj = b
- this.xg = null
- },
- Kd: function () {
- if (!this.xg) {
- var a = this.za[0],
- b = this.za[1]
- if (this.zj) this.xg = [a, b, a, b]
- else {
- var c = this.get('radius'),
- d = this.get('resolution') * this.get('strokeWeight') || 0,
- c = c ? c / Math.cos((Math.PI * this.get('center').Q) / 180) : 0
- this.xg = [a - c - d, b - c - d, a + c + d, b + c + d]
- }
- }
- return this.xg
- },
- yi: function () {
- return g.Aa.Pe.Uw
- },
- })
- g.M = { canvas: {}, be: {}, Xe: {}, Ke: {} }
- g.M.Yb = g.da.extend({
- ka: [g.va, g.Ze],
- A: function (a, b) {
- this.g = a
- this.zj = a.S.zj
- this.J = b
- this.e = b.e
- this.X('display', b)
- },
- $j: function () {
- this.Iq && this.Iq()
- this.yl()
- this.e = this.J = this.g = null
- },
- mq: function (a, b, c, d) {
- var e = this.zoom
- c = []
- var f = this.g
- if (Math.floor(e) !== e) b(c, f)
- else {
- a = [a.x, a.y]
- if (f.lm) {
- for (var e = f.ah, h = !0, k = [], l = 0; l < e.length; l += 1) {
- var m = e[l].Ug
- if (m)
- if (m.parentNode && m.parentNode.parentNode && this.J && m.parentNode.parentNode !== this.J.Ml && 'none' !== m.parentNode.style.display) {
- var n = g.f.Lo(m),
- m = n[0],
- n = n[1]
- if (m && n) {
- var p = Math.max(Math.abs(e[l].get('offset').x), Math.abs(e[l].get('offset').y)) + Math.max(m, n)
- f.Af = Math.max(f.Af, p)
- f.ig = Math.max(f.ig, p)
- e[l].width = m
- e[l].height = n
- } else (h = !1), k.push(e[l])
- } else (h = !1), k.push(e[l])
- }
- h ? ((f.lm = !1), (f.ah = [])) : (f.ah = k)
- }
- e = Math.max(f.Af, f.qz || 0) * this.T
- h = Math.max(f.ig, f.qz || 0) * this.T
- k = 0
- f.pz && (k = f.pz / Math.cos((Math.PI * this.e.get('center').Q) / 180))
- h = Math.max(h, k || 0)
- e = Math.max(e, k || 0)
- if ((e = f.xn([a[0] - e, a[1] - h, a[0] + e, a[1] + h]))) {
- for (var q in e)
- if (e.hasOwnProperty(q) && ((h = e[q]), h.get('visible') && !h.get('noSelect')))
- if (((k = h.ec()), k instanceof g.Aa.Mg))
- if (this.zj) {
- l = this.g.Cm
- l instanceof Array && (l = 'number' === typeof h.hb.style && l[h.hb.style] ? l[h.hb.style] : l[0])
- var m = l.size.width * this.T,
- n = l.size.height * this.T,
- p = l.anchor.x * this.T,
- r = l.anchor.y * this.T,
- k = k.za,
- s = l.rotation_,
- u = [a[0], a[1]]
- if (s) {
- var v = (a[0] - k[0]) / this.T,
- w = (a[1] - k[1]) / this.T,
- t = s,
- s = Math.cos(-t),
- x = Math.sin(-t),
- t = v * s - w * x,
- v = v * x + w * s
- u[0] = k[0] + t * this.T
- u[1] = k[1] + v * this.T
- }
- m = g.I.QP([
- [u[0] - m + p, u[1] - n + r],
- [u[0] + p, u[1] + r],
- ])
- g.I.Sd(m, k) && c.push(h)
- } else if ('undefined' !== typeof k.get('radius'))
- (l = k.za),
- (l = new g.H(l[0], l[1])),
- (m = new g.H(a[0], a[1])),
- (k = k.get('radius')),
- 'px' === h.get('unit')
- ? m.Ge(l) / Math.pow(2, 20 - this.zoom) < k && c.push(h)
- : m.Ge(l) * Math.cos((h.get('center').Q * Math.PI) / 180) <= (k / this.Cq) * Math.pow(2, 20 - this.zoom) && c.push(h)
- else if ('AMap.Text' == h.Tp) (l = h.get('params')), l.visible && h.fa && g.f.HD(d, h.fa, 'amap-markers') && c.push(h)
- else {
- if (((l = h.get('params')), l.visible && h.fa))
- if (l.shape)
- for (
- k = k.za,
- s = l.Rp % 360,
- u = [a[0], a[1]],
- s &&
- ((v = (a[0] - k[0]) / this.T),
- (w = (a[1] - k[1]) / this.T),
- (t = (Math.PI * s) / 180),
- (s = Math.cos(-t)),
- (x = Math.sin(-t)),
- (t = v * s - w * x),
- (v = v * x + w * s),
- (u[0] = k[0] + t * this.T),
- (u[1] = k[1] + v * this.T)),
- m = h.width * this.T,
- n = h.height * this.T,
- p = l.offset.x * this.T,
- r = l.offset.y * this.T,
- m = g.I.QP([
- [u[0] - m - p, u[1] - n - r],
- [u[0] - p, u[1] - r],
- ]),
- k[0] instanceof Array || (k = [k]),
- n = k.length - 1;
- 0 <= n;
- n -= 1
- ) {
- if (g.I.Sd(m, k[n])) {
- l.shape ? this.GD(h, u, k) && c.push(h) : c.push(h)
- break
- }
- }
- else g.f.HD(d, h.fa, 'amap-markers') && c.push(h)
- }
- else k.Sd ? k.Sd(a) && c.push(h) : k.Cy && 1.8 * k.Cy(a) <= h.get('strokeWeight') * this.T && c.push(h)
- this.zj
- ? c.sort(function (a, b) {
- return a.fm > b.fm ? -1 : 1
- })
- : c.sort(function (a, b) {
- return a.get('isTop') ? -1 : b.get('isTop') ? 1 : a.get('zIndex') > b.get('zIndex') || (a.get('zIndex') === b.get('zIndex') && a.fm > b.fm) ? -1 : 1
- })
- b(c, f)
- } else b([], f)
- }
- },
- GD: function (a, b, c) {
- var d = (b[0] - c[0][0]) / this.T
- b = (b[1] - c[0][1]) / this.T
- a = a.get('params')
- c = a.offset
- var d = [d - c.x, b - c.y],
- e
- a = a.shape
- if ('circle' === a.w.type) {
- if (((b = a.w.coords[0]), (c = a.w.coords[1]), Math.sqrt((d[0] - b) * (d[0] - b) + (d[1] - c) * (d[1] - c)) <= a.w.coords[2])) return !0
- } else {
- if ('poly' === a.w.type) return (e = a.w.coords), (e = this.gI(e)), g.wd.Sd(d, e)
- if ('rect' === a.w.type)
- return (
- (e = a.w.coords),
- (a = e[0]),
- (b = e[1]),
- (c = e[2]),
- (e = e[3]),
- (e = [
- [a, b],
- [c, b],
- [c, e],
- [a, e],
- ]),
- g.wd.Sd(d, e)
- )
- }
- return !1
- },
- gI: function (a) {
- for (var b = [], c = 0; c / 2 < a.length / 2; c += 2) b.push([a[c], a[c + 1]])
- return b
- },
- g4: function (a, b, c, d, e, f, h) {
- var k = ['position:absolute;']
- k.push('top:' + Math.round(c) + 'px;')
- k.push('left:' + Math.round(b) + 'px;')
- k.push('width:' + Math.round(d) + 'px;')
- k.push('height:' + Math.round(e) + 'px;')
- 1 > f &&
- ('opacity' in a.style
- ? (k.push('opacity'), k.push(':'), k.push(f), k.push(';'))
- : 8 <= document.documentMode
- ? (k.push("-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(opacity="), k.push(Math.ceil(100 * f)), k.push(")';"))
- : (k.push('filter:alpha(opacity='), k.push(Math.ceil(100 * f)), k.push(');')))
- k.push('z-index:' + h + ';')
- k.join('')
- g.f.T8(a, k.join(''))
- },
- })
- g.M.Rb = g.da.extend({
- ka: [g.va, g.Ze],
- A: function (a) {
- this.e = a
- this.type = '2D'
- this.Gj = g.a.wb(a.get('zoom'), 1)
- this.Ml = a.Ml
- this.K = a.Xa.o
- this.X('display', a)
- this.X('rotateEnable', a)
- this.X('style', a)
- this.X('zoom', a)
- this.X('hightlight', a)
- },
- jT: function (a) {
- this.De = a || g.a.Xk('ff' + this.e.De.slice(1))
- },
- mq: function (a, b, c, d, e) {
- function f(a, d) {
- a.length && (k[g.a.indexOf(b, d)] = a)
- l -= 1
- 0 >= l && (c(k), (l = 0))
- }
- for (var h = b.length, k = [], l = 0, m, n = [], p = 0; p < h; p += 1)
- (m = b[p]), (m instanceof g.o.fd || 'AMap.LabelLayer' === m.CLASS_NAME) && m.get('visible') && (n.push(this.zs(m)), (l += 1))
- for (h = 0; h < n.length; h += 1) n[h].mq(a, f, d, e)
- },
- })
- g.T2 = {
- kD: function (a, b, c) {
- for (var d = null, e = null, f = 0, h = 0, k = 0, l = b.length; k < l; k++) {
- var m = b[k]
- if (m < a) (d = c[m]), (f = m)
- else {
- e = c[m]
- h = m
- break
- }
- }
- null === d ? ((d = e), (f = h)) : null === e && ((e = d), (h = f))
- return { Gz: f, aK: h, Mq: d, WD: e }
- },
- tra: function (a) {
- var b = this,
- c = g.a,
- d = [],
- e = {}
- c.Tb(a.nodes, function (a) {
- !1 !== a.value && null !== a.value && ((e[a.zoom] = g.r.tc + '://' + a.value), d.push(a.zoom))
- })
- return function (a) {
- a = c.wb(a, 1)
- void 0 === e[a] && (e[a] = b.kD(a, d, e).Mq)
- return e[a]
- }
- },
- ara: function (a) {
- var b = this,
- c = g.a,
- d = [],
- e = {},
- f = a.transitional
- c.Tb(a.nodes, function (a) {
- null !== a.value && !1 !== a.value && ((e[a.zoom] = a.value), d.push(a.zoom))
- })
- return function (a) {
- a = c.wb(a, 1)
- if (void 0 === e[a]) {
- var k = b.kD(a, d, e)
- e[a] = f && 'none' !== f && k.aK !== k.Gz && k.Mq !== k.WD ? c.F4(k.Mq, k.WD, (a - k.Gz) / (k.aK - k.Gz), f) : k.Mq
- }
- return e[a]
- }
- },
- mqa: function (a) {
- var b = this,
- c = g.a,
- d = [],
- e = {}
- c.Tb(a.nodes, function (a) {
- null !== a.value && ((e[a.zoom] = a.value), d.push(a.zoom))
- })
- return function (a) {
- a = c.wb(a, 1)
- void 0 === e[a] && (e[a] = b.kD(a, d, e).Mq)
- return e[a]
- }
- },
- n4: function (a) {
- var b = this,
- c = g.a,
- d = [],
- e = {}
- c.Tb(a.nodes, function (a) {
- null !== a.value && ((e[a.zoom] = a.value), d.push(a.zoom))
- })
- return function (a) {
- a = c.wb(a, 1)
- void 0 === e[a] && (e[a] = b.kD(a, d, e).Mq)
- return e[a]
- }
- },
- uqa: function (a, b, c) {
- var d = this,
- e = g.a,
- f = [],
- h = {},
- k = a.transitional
- e.Tb(a.nodes, function (a) {
- a.value && ((h[a.zoom] = e.gma(a.value, c ? 'rgba' : 'webgl')), f.push(a.zoom))
- })
- return function (a) {
- var b = null
- a = e.wb(a, 1)
- if (void 0 === h[a]) {
- var b = d.kD(a, f, h),
- n = b.Mq
- if (k && 'none' !== k && b.Gz !== b.aK && b.Mq.join('') !== b.WD.join(''))
- for (var n = n.slice(0), p = (a - b.Gz) / (b.aK - b.Gz), q = 0, r = b.WD.length; q < r; q++) n[q] = e.F4(b.Mq[q], b.WD[q], p, k)
- h[a] = n
- }
- b = h[a]
- return c && b ? 'rgba(' + b.join(',') + ')' : b || ''
- }
- },
- Bz: function (a, b, c, d) {
- var e = 4 < arguments.length && void 0 !== arguments[4] ? arguments[4] : {},
- f
- for (f in c)
- if (c.hasOwnProperty(f)) {
- var h = c[f]
- void 0 !== b[h]
- ? (b[h].nodes &&
- 1 < b[h].nodes.length &&
- b[h].nodes.sort(function (a, b) {
- return a.zoom - b.zoom
- }),
- (a[f] = e.Csa ? { Xe: d.call(this, b[h], c[f]), canvas: d.call(this, b[h], c[f], !0) } : d.call(this, b[h], c[f])))
- : e.Bsa && (a[f] = !0)
- }
- },
- Rr: function (a, b) {
- for (var c = [], d = 0, e = a.length; d < e; d += 2) {
- var f = 0,
- f = 'str' === b ? g.a.wb(parseInt(a.substr(d, 2), 16) / (0 === d ? 255 : 1), 3) : g.a.wb(parseInt(a.substr(d, 2), 16) / 255, 3)
- c.push(f)
- }
- return c.length ? (c.push(c.shift()), 'str' === b ? 'rgba(' + c.join(',') + ')' : c) : ''
- },
- B7: function (a, b, c, d) {
- var e = {},
- f = { visible: 'visible', LU: 'showLabel', vk: 'showIcon' },
- h = [
- ['color', { color: 'color' }, { opacity: 'opacity' }],
- ['fillColor', { fillColor: 'fillColor' }, { le: 'fillOpacity' }],
- ['strokeColor', { strokeColor: 'strokeColor' }, { pb: 'strokeOpacity' }],
- ['textFillColor', { nya: 'textFillColor' }, { oya: 'textFillOpacity' }],
- ['textStrokeColor', { qya: 'textStrokeColor' }, { rya: 'textStrokeOpacity' }],
- ['backgroundColor', { backgroundColor: 'backgroundColor' }, { pma: 'backgroundOpacity' }],
- ],
- k = { fontSize: 'fontSize' },
- l = { fillWidth: 'fillWidth', strokeWidth: 'strokeWidth' }
- if (a.styles) {
- a = a.styles
- this.Bz(e, a, f, this.mqa, { Bsa: !0 })
- this.Bz(e, a, k, this.n4, { Qsa: !0 })
- this.Bz(e, a, l, this.n4, { Qsa: !0 })
- k = 0
- for (l = h.length; k < l; k++) {
- var m = h[k]
- a[m[0]] ? this.Bz(e, a, m[1], this.uqa, { Csa: !0 }) : this.Bz(e, a, m[2], this.ara)
- }
- a.texture &&
- (this.Bz(e, a, { Ja: 'texture' }, this.tra),
- (e.ed = []),
- g.a.Tb(a.texture.nodes, function (a) {
- a.value && e.ed.push(g.r.tc + '://' + a.value)
- }))
- } else {
- for (var n in f)
- if (f.hasOwnProperty(n)) {
- var p = f[n]
- e[n] = void 0 === a[p] ? !0 : a[p]
- }
- f = 0
- for (n = h.length; f < n; f++) {
- var q = h[f],
- p = g.a.keys(q[1])[0],
- r = q[1][p],
- s = g.a.keys(q[2])[0],
- q = q[2][s]
- void 0 !== a[r] ? (e[p] = { canvas: this.Rr(a[r], 'str'), Xe: this.Rr(a[r]) }) : (e[s] = a[q])
- }
- for (m in k) k.hasOwnProperty(m) && void 0 !== a[m] && (e[m] = a[m])
- for (var u in l) l.hasOwnProperty(u) && void 0 !== a[u] && (e[u] = a[u])
- a.texture && (e.Ja = g.r.tc + '://' + a.texture)
- }
- b[c] || (b[c] = {})
- b[c][d] = e
- },
- AT: function (a, b) {
- if (a)
- for (var c = Object.keys(a), d = 0; d < c.length; d++)
- for (var e = c[d], f = Object.keys(a[e]), h = 0; h < f.length; h++) {
- var k = f[h]
- a[e][k] && this.B7(a[e][k], b, e, k)
- }
- },
- oGa: function (a, b, c, d) {
- if (a)
- for (var e in a)
- if (a.hasOwnProperty(e) && g.a.jk(a[e], 'object')) {
- var f = a[e]
- console.log(e + '--')
- var h = e
- c && (h = c + ':' + e)
- if (f.detailedType) this.B7(f, b, h), this.AT(f.detailedType, b, h, f)
- else if (f.subType) this.AT(f.subType, b, h)
- else if (void 0 !== f.code) for (var k in d) d.hasOwnProperty(k) && !g.a.ka(['isDetailed', 'detailedType', 'styles'], k) && void 0 === f[k] && void 0 !== d[k] && (f[k] = d[k])
- }
- },
- wV: function (a) {
- if (!this.cm || this.cm.zoom != a) {
- var b = g.a.Ph,
- c = { zoom: a },
- d
- for (d in this.ae)
- if (this.ae.hasOwnProperty(d)) {
- var e = this.ae[d]
- c[d] = {}
- for (var f in e)
- if (e.hasOwnProperty(f)) {
- var h = e[f]
- if (h) {
- c[d][f] = {}
- for (var k in h)
- h.hasOwnProperty(k) &&
- void 0 !== h[k] &&
- ((c[d][f][k] = {}),
- h[k].Xe
- ? (b(h[k].Xe) ? (c[d][f][k].Xe = h[k].Xe(a)) : (c[d][f][k].Xe = h[k].Xe),
- b(h[k].canvas) ? (c[d][f][k].canvas = h[k].canvas(a)) : (c[d][f][k].canvas = h[k].canvas))
- : b(h[k])
- ? (c[d][f][k] = h[k](a))
- : (c[d][f][k] = h[k]))
- } else c[d][f] = h
- }
- }
- this.cm = c
- }
- },
- styleChanged: function () {
- if (this.e.D.Bi) {
- var a = this.get('style')
- this.el.QA || ((this.el = g.a.bind(this.el, this)), (this.kq = g.a.bind(this.kq, this)), (this.el.QA = !0))
- var b = g.a
- if (a) {
- var c = {}
- this.AT(a, c)
- this.ae = c
- } else this.ae = null
- var d, e, f, h, k
- this.ae &&
- ((d = this.ae[30001] && this.ae[30001][1]),
- (e = this.ae[30001] && this.ae[30001][2]),
- (f = this.ae['00001'] && this.ae['00001'][1]),
- (h = this.ae['00001'] && this.ae['00001'][2]),
- (k = this.ae[50001] && this.ae[50001][1]))
- var l,
- m,
- n,
- p,
- q,
- r,
- a = this.Gj
- if (d) {
- c = 'rgba(0, 0, 0, 0)'
- if (d.visible) {
- var s = this.kq(b.B8(this.e.De.substr(1)), d.opacity, d.color, !0, a)
- s && ((c = this.Bt(s, d.visible, 'rgba(0, 0, 0, 0)')), (s = this.el(b.op(this.e.De.substr(1)), d.opacity, d.color, !0, a)), (l = this.Bt(s, d.visible)))
- }
- this.e.Nu = c
- } else this.e.Nu = ''
- e && e.visible && ((m = this.el(b.op(this.e.KH.substr(1)), e.opacity, e.color, !0, a)), (m = this.Bt(m, e.visible)))
- f && f.visible && ((n = this.el(b.op(this.e.ou.substr(1)), void 0, f.color, !0, a)), (n = this.Bt(n, f.visible)), (p = this.Bt(n, f.visible)))
- h && h.visible && ((d = h.color), !d && f && f.color && (d = f.color), (p = this.el(b.op(this.e.ou.substr(1)), void 0, d, !0, a)), (p = this.Bt(p, h.visible)))
- k &&
- (k.visible
- ? ((q = this.el(b.Xk(this.e.VF[0]), void 0, k.fillColor, !0, a)),
- (q = this.Bt(q, k.visible)),
- (r = this.el(b.Xk(this.e.VF[1]), void 0, k.strokeColor, !0, a)),
- (r = this.Bt(r, k.visible)))
- : ((q = [1, 1, 1, 0]), (r = [1, 1, 1, 0])))
- this.jT && this.jT(l, m, n, [q, r], p)
- this.r$ ? this.r$(this.ae) : this.set('display')
- delete this.cm
- this.wV(a)
- }
- },
- Bt: function (a, b) {
- var c = 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : [0, 0, 0, 0],
- d = g.a.Ph
- if (d(a) && d(b)) {
- var e = a
- a = function (a) {
- return b(a) ? e(a) : c
- }
- }
- return a
- },
- kq: function (a, b, c, d, e) {
- if (a) {
- if (void 0 !== b) return (a = a.split(',')), (c = b), 'function' === typeof b && (c = b(e)), (a[3] = g.a.wb(c, 3) + ')'), a.join(',')
- if (c) return 'function' === typeof c.canvas ? (d ? c.canvas : c.canvas(e)) : c.canvas
- }
- return a
- },
- el: function (a, b, c, d, e) {
- if (a) {
- if (b) return (c = b), 'function' === typeof b && (c = b(e)), [a[0], a[1], a[2], g.a.wb(c, 3)]
- if (c) return 'function' === typeof c.Xe ? (d ? c.Xe : c.Xe(e)) : c.Xe
- }
- return a
- },
- qD: function (a, b) {
- var c = this.ae
- if (c && a) {
- var d = a.split(':'),
- e = d[0],
- d = d[1]
- if (c[e]) {
- this.cm && b && b == this.cm.zoom && (c = this.cm)
- if (c[e][d]) return c[e][d]
- if (c[e].all) return c[e].all
- }
- }
- },
- JEa: function (a, b, c) {
- var d = this.ae
- if (d) {
- this.cm && c && c == this.cm.zoom && (d = this.cm)
- if (b || 0 === b) if ((b = d[a + ':' + b])) return b
- return d[a]
- }
- },
- im: function (a, b, c, d, e) {
- var f = null,
- h = a
- d = d ? this.kq : this.el
- e = e || this.Gj
- if ((f = this.qD(b, e)))
- if (('function' === typeof f.visible && !f.visible(e)) || !1 === f.visible) h = ''
- else {
- var h = 1,
- k = ''
- if (c)
- if (f.fillColor || f.le) (h = f.le), (k = f.fillColor)
- else {
- if (f.color || f.opacity) (h = f.opacity), (k = f.color)
- }
- else if (f.strokeColor || f.pb) (h = f.pb), (k = f.strokeColor)
- else if (f.color || f.opacity) (h = f.opacity), (k = f.color)
- h = d(a, h, k, !1, e)
- }
- this.Cs === b && (h = this.gv(h || a))
- return h
- },
- Zc: function (a, b, c) {
- var d = this.ae
- if (d) {
- this.cm && c && c == this.cm.zoom && (d = this.cm)
- if (b || 0 === b) if ((b = d[a + ':' + b])) return b
- return d[a]
- }
- },
- kv: function (a, b) {
- var c = null
- return (c = this.qD(a, b || this.Gj))
- },
- xs: function (a, b, c, d) {
- c = c ? this.kq : this.el
- var e = null,
- f = a
- d = d || this.Gj
- ;(e = this.qD(b, d)) && (f = ('function' === typeof e.visible && !e.visible(d)) || !1 === e.visible ? '' : c(a, e.opacity, e.color, !1, d))
- this.Cs === b && (f = this.gv(f || a))
- return f
- },
- My: function (a, b, c, d, e, f) {
- var h = a,
- k = b,
- l = c,
- m = !0,
- n = !0,
- p,
- q = 1
- f = f || this.Gj
- var r = this.qD(d, f)
- r &&
- (('function' === typeof r.visible && !r.visible(f)) || !1 === r.visible || ('function' === typeof r.LU && !r.LU(f)) || !1 === r.LU
- ? ((n = m = !1), (h = k = l = ''))
- : ((h = this.kq(a, r.oya, r.nya, !1, f)),
- (k = this.kq(b, r.rya, r.qya, !1, f)),
- (l = this.kq(c, r.pma, r.backgroundColor, !1, f)),
- (m = 'function' === typeof r.vk ? r.vk(f) : r.vk),
- r.fontSize && ((p = 'function' === typeof r.fontSize ? r.fontSize(f) : r.fontSize), (p = 12 <= p ? p : 12), (p = 22 >= p ? p : 22)),
- p && g.l.Jc && (p *= 2)))
- f = !1
- this.Cs === d ? (f = !0) : void 0 !== e && this.Cs === d + '-' + e && (f = !0)
- f && ((h = this.gv(h || a)), (k = this.gv(k || b)), (l = this.gv(l || c)), (q = 1 - 1.6 * this.yD), (n = m = !0))
- return [h, k, l, m, n, q, p]
- },
- Ly: function (a, b, c, d, e) {
- var f = null,
- h = a,
- k = b
- d = d ? this.kq : this.el
- var l = e || this.Gj
- if ((f = this.qD(c, e)))
- ('function' === typeof f.visible && !f.visible(l)) || !1 === f.visible ? (h = k = '') : ((h = d(a, f.le, f.fillColor, !1, l)), (k = d(b, f.pb, f.strokeColor, !1, l)))
- this.Cs === c && ((b = k || b), (h = this.gv(h || a)), (k = this.gv(b)))
- return [h, k]
- },
- }
- g.M.Rb.Hb(g.T2)
- g.M.canvas.Rb = g.M.Rb.extend({
- A: function (a) {
- arguments.callee.ma.apply(this, arguments)
- },
- zs: function (a) {
- if (!a.M) {
- var b = a.$l(this)
- b && !b.koa && (a.M = b)
- }
- return a.M
- },
- oc: function (a) {
- var b = this.e.N3()
- b && this.VT !== b && this.e.D.Bi && (this.e.R8(b), (this.VT = b))
- this.e.Xa.Xr.style.cssText = ''
- var c = a.la,
- b = a.P,
- d = this.e.D.get('features'),
- e = a.size.width,
- f = a.size.height
- this.Gj = 'vw' === this.e.D.Ce.baseRender ? g.a.wb(b.zoom, 1) : a.P.ne
- this.T = b.T
- if (!this.Na || 1e4 < Math.abs(b.lb.x - this.Na.x) / this.T || 1e4 < Math.abs(b.lb.y - this.Na.y) / this.T) this.Na = b.lb
- this.Na.x - b.lb.x < -g.a.Fa / 2 ? (this.Na = new g.H(this.Na.x + g.a.Fa, this.Na.y)) : this.Na.x - b.lb.x > g.a.Fa / 2 && (this.Na = new g.H(this.Na.x - g.a.Fa, this.Na.y))
- for (var h = 0; h < c.length; h += 1) {
- var k = c[h],
- l = this.zs(k),
- m = c[h].me()
- if (l && l.g)
- if (!m.visible || k.XD || m.Ya[0] > b.zoom || m.Ya[1] < b.zoom || (k.ga && 0 === k.ga.length)) {
- if ((l = l.uj()))
- if (l.length) for (m = 0; m < l.length; m += 1) l[m].parentNode === this.K && this.K.removeChild(l[m])
- else l.parentNode === this.K && this.K.removeChild(l)
- } else if (this.GJ(k, d)) {
- l.oc(a, m)
- l.kk && (a.te = l.te)
- var k = l.uj(),
- n,
- p,
- q = l.transform
- if (!q || !k || (l.Ci && !this.e.D.Ra)) c[h].yj && k.parentNode !== this.K && (this.K.appendChild(k), (c[h].Nb = k))
- else {
- c[h].Nb = k
- k.length || ((k = [k]), (q = [q]))
- for (var r = 0; r < k.length; r += 1)
- if (((n = k[r]), (p = q[r]), !p.Zy)) {
- var s = p.translate.x,
- u = p.translate.y
- c[h].FJ || ((s = g.a.wb(s, 2)), (u = g.a.wb(u, 2)))
- var v = p.scale
- 1e-5 > Math.abs(s) && (s = 0)
- 1e-5 > Math.abs(u) && (u = 0)
- var w = []
- w.push('position:absolute')
- w.push('z-index:' + (p.Hk || c[h].get('zIndex')))
- c[h].WC
- ? (w.push('top:' + Math.floor(f / 2 + u) + 'px'), w.push('left:' + Math.floor(e / 2 + s) + 'px'))
- : n.L5
- ? (w.push('height:' + n.height * v + 'px'),
- w.push('width:' + n.width * v + 'px'),
- w.push('top:' + (f / 2 - u * v) + 'px'),
- w.push('left:' + (e / 2 - s * v) + 'px'))
- : (1 !== v && (w.push(g.f.ot[g.f.pg] + '-origin:' + s + 'px ' + u + 'px'), w.push(g.f.ot[g.f.pg] + ':scale3d(' + v + ',' + v + ',1)')),
- w.push('top:' + Math.floor(f / 2 - u) + 'px'),
- w.push('left:' + Math.floor(e / 2 - s) + 'px'),
- w.push('display:block'),
- l.jl && (w.push('height:' + n.height + 'px'), w.push('width:' + n.width + 'px')))
- l.FJ || 1 === m.opacity || 'number' !== typeof m.opacity || w.push(g.f.p4(n, m.opacity))
- n.parentNode !== this.K && this.K.appendChild(n)
- g.f.T8(n, w.join(';'))
- }
- }
- }
- }
- a = this.e.Xa.Xr
- k = this.e.Xa.o
- c = this.e.Xa.B
- g.f.pg && 'number' === typeof b.rotation && 0 !== b.rotation
- ? ((a.style[g.f.pg + 'Origin'] = e / 2 + 'px ' + f / 2 + 'px'),
- (a.style[g.f.pg] = 'rotate(' + b.rotation + 'deg)'),
- (a.style.overflow = 'visible'),
- (k.style.overflow = 'visible'),
- (c.style.overflow = 'visible'))
- : ((a.style.cssText = ''), (k.style.cssText = '-webkit-transform: translateZ(0);'), (c.style.cssText = ''))
- this.e.ht = !1
- },
- GJ: function (a, b) {
- if ('all' === b || void 0 === a.Wl) return !0
- for (var c = 0, d = a.Wl.length; c < d; c++) if (g.a.ka(b, 'region' === a.Wl[c] ? 'bg' : a.Wl[c])) return !0
- return !1
- },
- zoomChanged: function () {
- var a = this.e.get('zoom')
- this.Gj = 'vw' === this.e.D.Ce.baseRender ? g.a.wb(a, 1) : Math.round(a)
- this.ae && this.wV(this.Gj)
- },
- })
- g.M.Ti = g.M.Yb.extend({
- A: function (a, b) {
- arguments.callee.ma.apply(this, arguments)
- this.X('reload', a, !0)
- var c = a.S.get('cacheSize')
- if (this.e && this.e.D) {
- var d = this.e.D.get('tileCacheSize')
- d && 0 < d && (c = d)
- }
- this.oa = new g.og(c)
- var e = this
- this.oa.iK.K1(function (a) {
- e.bB(a)
- })
- this.oa.xC = function (a) {
- return a.ob ? ((a.ob.Sg -= 1), 0 == a.ob.Sg && (a.zv = !1), delete a.ob, !0) : a.zv ? (a.Sg ? !1 : !0) : !0
- }
- this.gd = 1
- this.$n = 50
- this.pX = !0
- this.g.oa = this.oa
- this.pm = new g.wF(6, null, a.UQ)
- new g.wF(5, null, a.UQ)
- },
- Iq: function () {
- this.clear()
- this.Ig = null
- this.oa.clear()
- this.oa.xC = null
- this.oa = this.oa.iK.RF = null
- this.Kc && (this.Kc.G('tiles', this.bE, this), this.Kc.G('ack', this.aE, this), this.Kc.G('disable', this.ZD, this), (this.Kc = null))
- this.e.G('zoomend', this.ck, this)
- this.e.G('moveend', this.ck, this)
- },
- reloadChanged: function () {
- this.g && (this.g.Ra = !1)
- this.oa.clear()
- this.reload = !0
- this.set('display')
- },
- xh: function (a, b, c) {
- function d(b) {
- a.loaded = !0
- e.g && ((a.status = 'loaded'), (a.Ba = !0), (a.jd = b), e.set('display', 0), 'function' === typeof c && c())
- }
- var e = this
- a.status = 'loading'
- this.g.Bo &&
- this.g.Bo.call(this, a, d, function () {
- a.loaded = !0
- e.g && ((a.status = 'loaded'), (a.Ba = !0), e.set('display', 0), 'function' === typeof c && c())
- })
- },
- ZHa: function (a, b, c, d) {
- var e = []
- c = c || 18
- b = Math.pow(2, b - c)
- for (var f = 0; f < a.length; f += 1) {
- var h = a[f].ta,
- k = Math.floor(h.x / b),
- h = Math.floor(h.y / b)
- if (d) {
- if (((k = c + '/' + k + '/' + h), (h = this.oa.get(k)) && 'loaded' == h.status)) continue
- } else (h = new g.pr(c, k, h)), (k = h + ''), (h = new g.rb(h))
- !e[k] && h && (e.push(h), (e[k] = 1))
- }
- return e
- },
- MI: function (a, b) {
- var c = this,
- d = this
- if (this.g.uH) {
- var e,
- f,
- h,
- k,
- l,
- m,
- n,
- p = (function () {
- var p = 0
- for (e = a.length - 1; 0 <= e; e -= 1) (f = a[e]), (p += f.length)
- if (0 == p) return b.call(c, a), { tL: void 0 }
- d.eV = a
- for (e = a.length - 1; 0 <= e; e -= 1)
- for (f = a[e], h = [], k = [], f.WT = h, f.Kv = k, l = f.length - 1; 0 <= l; l -= 1)
- (m = f[l]),
- (n = m.ta),
- c.g.e.Re.NE(
- n.x,
- n.y,
- n.z,
- (function () {
- var c = l
- return function (e) {
- e ? h.push(f[c]) : k.push(f[c])
- p -= 1
- if (0 == p) {
- for (e = a.length - 1; 0 <= e; e -= 1) {
- var l = a[e]
- a[e] = l.WT
- if (l.Kv)
- for (var m = l.Kv.length - 1; 0 <= m; m -= 1) {
- var n = l.Kv[m]
- n.status = 'loaded'
- n.loaded = !0
- n.Ba = !0
- }
- }
- b.call(d, a)
- }
- }
- })()
- )
- })()
- if ('object' === typeof p) return p.tL
- } else b.call(this, a)
- },
- qw: function (a, b, c) {
- if ((a = this.oa.get(a + '/' + b + '/' + c))) {
- if (a.zv) return a
- if (a.ob) return a.ob
- a.zv = !0
- a.Sg = 0
- return a
- }
- },
- jJ: function (a) {
- var b = a.ta
- a = b.x
- var c = b.y,
- b = b.z,
- d = Math.pow(2, b),
- e = (a + d) % d,
- f = e + d,
- d = e - d,
- h = null
- e !== a && (h = this.qw(b, e, c))
- h || d === a || (h = this.qw(b, d, c))
- h || f === a || (h = this.qw(b, f, c))
- return h
- },
- Fn: function (a) {
- var b = 1 < arguments.length && void 0 !== arguments[1] ? arguments[1] : !1
- if ((!this.kk || (!this.gf && !this.ge)) && a.length)
- if (this.HK) this.ZJ = !0
- else {
- for (var c = a.length - 1; 0 <= c; c -= 1) {
- var d = a[c]
- if (d.length)
- for (var e = Math.pow(2, 20 - d[0].ta.z), c = d.length - 1; 0 <= c; c--) {
- var f = d[c],
- h = f.ta
- h.T = e
- f.ra = {}
- f.al = 0
- if (10 > h.z) {
- var k = this.jJ(f)
- k && ((f.ob = k), (f.status = 'loaded'), (f.Ba = !0), (k.Sg += 1), (f.al = (h.x - k.ta.x) / Math.pow(2, h.z)), d.splice(c, 1), this.set('display', 0))
- }
- this.oa.set(f.key, f)
- !b && f.Ie ? (f.Ie = !1) : (f.status = 'loading')
- }
- }
- var l = this
- this.MI(a, function (a) {
- for (var c = a.length - 1; 0 <= c; c -= 1) {
- var d = a[c]
- if (d.length)
- if (l.Di) {
- if (l.e.hA) break
- var e = d[0].ta.z
- l.ew(d, l.jl ? 1 : 0)
- for (var f = 0, h = 0; f < d.length; ) l.US(d.slice(10 * h, 10 * h + 10), e, b), (f += 10), (h += 1)
- } else
- for (
- e = (function () {
- var a = d.length
- return function () {
- --a
- }
- })(),
- l.ew(d),
- l.zq += d.length,
- f = d.length - 1;
- 0 <= f;
- f -= 1
- )
- l.xh(d[f], l.pm, e)
- }
- })
- }
- },
- Sy: function (a, b) {
- var c = this.oa.get(a + '')
- c || b || (c = new g.rb(a.cb()))
- return c
- },
- ZK: function (a, b) {
- return this.Dd * Math.pow(2, a - b)
- },
- bB: function (a) {
- a.Is && this.pm.q2(a.Is)
- a.MK = !1
- a.loaded = !1
- this.Kf && this.Kf(a)
- },
- qy: function (a, b) {
- var c = (2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : 0) || this.fb,
- d = a.Vd.x,
- e = a.Vd.y,
- f = a.hc.x,
- h = a.hc.y
- new g.H(0, 0)
- var k = this.ZK(20, c)
- b && ((f = Math.max(b[0], f) - b[0]), (h = Math.max(b[1], h) - b[1]), (d = Math.min(b[2], d) - b[0]), (e = Math.min(b[3], e) - b[1]), new g.H(Math.floor(b[0] / k), Math.floor(b[1] / k)))
- d /= k
- e /= k
- d = { Hc: 0 === d % 1 ? d - 1 : Math.floor(d), sc: 0 === e % 1 ? e - 1 : Math.floor(e), Ic: Math.floor(f / k), fc: Math.floor(h / k) }
- d.rE = d.Hc - d.Ic + 1
- d.zK = d.sc - d.fc + 1
- d.z = c
- d.T = this.T * Math.pow(2, this.zoom - c)
- d.Uy = Math.ceil(d.rE / 2)
- return d
- },
- uv: function (a, b, c) {
- return b < a.Ic || b > a.Hc || c < a.fc || c > a.sc ? !1 : !0
- },
- ew: function (a, b) {
- if (a.length) {
- var c = this.lb.ld(this.Dd << (20 - a[0].ta.z)),
- d = Math.floor(c.x),
- e = Math.floor(c.y)
- a.sort(function (a, c) {
- var k = a.ta,
- l = c.ta,
- m = k.x - d,
- k = k.y - e,
- n = l.x - d,
- l = l.y - e
- return (b ? -1 : 1) * (n * n + l * l - (m * m + k * k))
- })
- }
- },
- clear: function () {
- this.pm.clear()
- },
- gp: function (a, b) {
- this.vg = !1
- this.clear()
- this.Zi = b.Zi
- this.Yi = b.Yi
- this.Dd = b.Dd
- var c = a.P
- this.Pf = b.Pf || a.P.Pf
- this.oh = c.oh
- this.size = a.size
- this.rotation = c.rotation
- this.lb = c.lb
- this.Ha = a.P.Ha
- this.Gf = a.Gf
- this.ge = a.ge
- this.gf = a.gf
- this.zoom = c.zoom
- this.ne = c.ne
- this.fb = 'AMap.MapBox' == this.g.S.CLASS_NAME ? Math.max(2, this.ne - g.r.Vn) : !1 === this.Di && !this.g.nS && this.g.ja ? this.ne + 1 : this.ne
- this.ff && this.fb > this.ff && (this.fb = this.ff)
- this.Yo && this.fb < this.Yo && (this.fb = this.Yo)
- this.T = c.T
- this.Gg = c.Gg
- c = a.P.Ha
- this.pk = this.qy(c, b.I)
- this.Gw = c.N$ ? this.qy(c.N$, b.I) : null
- var c = this.pk,
- d = this.Ha.F9,
- e = null,
- e = d < this.zoom && this.Gw ? this.Gw : c,
- f = [],
- h = [],
- k,
- l = [],
- m = [],
- n = [],
- p = new g.pr(0, 0, 0),
- q,
- r = this.zoom,
- m = this.Nk || '',
- s = {},
- u = {},
- v,
- w,
- t,
- x,
- y,
- E
- this.ee = (1e6 * Math.random()) << 0
- for (q = m.length - 1; 0 <= q; q -= 1)
- if (((k = m[q]), !(k.hx < b.opacity)))
- if (((p.z = k.ta.z), (p.x = k.ta.x), (p.y = k.ta.y), p.z === this.fb)) s[p + ''] |= 16
- else if (p.z < this.fb) {
- if (((s[p + ''] |= 64), this.Zi))
- for (
- x = this.fb - p.z,
- v = Math.max(c.Ic, p.x << x),
- r = Math.min(c.Hc, ((p.x + 1) << x) - 1),
- w = Math.max(c.fc, p.y << x),
- t = Math.min(c.sc, ((p.y + 1) << x) - 1),
- p.z = this.fb,
- x = v;
- x <= r;
- x += 1
- )
- for (p.x = x, y = w; y <= t; y += 1) (p.y = y), (E = p + ''), (s[E] |= 32), (u[E] = u[E] ? Math.max(k.ta.z, u[E]) : k.ta.z)
- } else if (this.Yi)
- for (v = 1; p.z >= this.fb; ) {
- s[p + ''] |= v
- v = p.x >> 1
- w = p.y >> 1
- r = v << 1
- t = w << 1
- k = 0
- for (x = 2; 0 < x; x -= 1) for (p.x = r + x, y = 2; 0 < y; y -= 1) (p.y = t + y), s[p + ''] & 5 && (k += 1)
- p.z -= 1
- p.x = v
- p.y = w
- v = 4 === k ? 4 : 2
- }
- m = []
- p.z = this.fb
- q = !0
- this.oa.C2()
- for (x = e.Ic; x <= e.Hc; x += 1)
- for (p.x = x, y = e.fc; y <= e.sc; y += 1)
- (p.y = y),
- (k = this.Sy(p)),
- this.au(k),
- (v = !1),
- k.Ba
- ? ((k.ee = this.ee), this.uv(c, x, y) && (m.push(k), this.Il && (k.gd !== this.gd || 1 > k.hx) && (v = !0)))
- : ((q = !1), this.uv(c, x, y) && (v = !0), (k.status && !k.Ie) || this.ne !== d || (this.Gw && !this.uv(this.Gw, x, y)) || l.push(k)),
- v && n.push(k)
- q ? this.fD || (this.fD = !0) : (this.g.Ra = !1)
- this.vg = q
- m.length && this.fD && (f.push(m), (m.vg = q))
- h.push(l)
- e = !1
- if (this.Yi) {
- n = n.slice(0)
- l = []
- for (q = n.length - 1; 0 <= q; q -= 1) (k = n[q]), s[k.key] & 4 || l.push(k)
- k = b.Ya[1]
- for (r = this.fb + 1; n.length && r <= k; r += 1) {
- m = []
- d = n
- n = []
- p.z = r
- for (q = d.length - 1; 0 <= q; q -= 1)
- if (((x = d[q]), (v = s[x.key]), v & 7))
- for (v = x.ta.x << 1, w = x.ta.y << 1, x = 1; 0 <= x; x -= 1)
- for (p.x = v + x, y = 1; 0 <= y; y -= 1)
- (p.y = w + y), (E = p + ''), (t = this.oa.pK(E)), s[E] & 5 && t && t.Ba ? ((t.IB = !0), (t.ee = this.ee), m.push(t), this.au(t)) : n.push(new g.rb(p.cb()))
- m.length && ((e = !0), f.push(m))
- }
- n = l
- }
- if (!e && this.Zi)
- for (x = !f.length || this.jl ? b.Ya[0] : Math.max(b.Ya[0], this.fb - 2), Math.max(x, this.fb - this.cha), r = this.fb - 1; n.length && r >= x; r -= 1) {
- m = []
- y = {}
- d = n
- n = []
- for (q = d.length - 1; 0 <= q; q -= 1)
- (k = d[q]),
- (p.z = r),
- (p.x = k.ta.x >> 1),
- (p.y = k.ta.y >> 1),
- (k = this.Sy(p)),
- y[k.key] ||
- ((y[k.key] = 1),
- (v = !1),
- k.Ba && (!this.cja || s[k.key] & 64)
- ? ((p.x = Math.min(c.Hc, Math.max(c.Ic, p.x << (this.fb - r)))),
- (p.y = Math.min(c.sc, Math.max(c.fc, p.y << (this.fb - r)))),
- (p.z = this.fb),
- (E = p + ''),
- 'number' === typeof u[E] && k.ta.z > u[E] ? (v = !0) : (k.IB = !0),
- (k.ee = this.ee),
- m.push(k),
- this.au(k))
- : (v = !0),
- v && n.push(k))
- m.length && f.push(m)
- }
- this.eV = h
- this.Fv = this.zq = 0
- this.Fn(h)
- this.Ig = f
- this.g.set('tiles', f)
- },
- au: function (a) {
- this.oa.t6(a.CFa)
- },
- HR: function (a, b) {
- for (var c = [], d = this.e.D.getCoordsBoundByZoom(a), d = this.qy(d, b, a), e = d.Ic; e < d.Hc; e++)
- for (var f = d.fc; f < d.sc; f++) {
- var h = [a, e, f].join('/')
- this.oa.Ld(h) || c.push(new g.rb(new g.pr(a, e, f), !0))
- }
- return c
- },
- MX: function () {
- var a = this.e.D
- return a.W7 && a.get('preloadMode') && 200 <= this.oa.Ip && this.g.S.vq() && 'stable' != this.Gf && this.Yx && this.Yx() && this.zoom !== this.fb
- },
- mE: function (a, b) {
- var c = b.I,
- d = b.Ya
- if (this.MX() && this.fb >= d[0] + 1) {
- var d = [],
- e = null,
- e = 'zoomOut' === this.Gf ? Math.floor(this.zoom) : Math.ceil(this.zoom),
- e = this.HR(e, c)
- e.length && d.push(e)
- d.length && this.Fn(d, !0)
- }
- },
- })
- g.M.be.Ti = g.M.Ti.extend({
- A: function (a, b) {
- arguments.callee.ma.apply(this, arguments)
- this.$n = 120
- this.Di = !1
- this.Yg()
- this.ff = a.ff
- this.Yo = a.Yo
- },
- uj: function () {
- return this.Nb
- },
- Yg: function () {
- this.Nb = document.createElement('div')
- this.Nb.className = this.g.S.get('className') || 'amap-layer'
- this.bv = document.createDocumentFragment()
- },
- Wv: function (a) {
- var b = Math.pow(2, a.P.zoom - this.Cf),
- c = a.P.lb.ab(this.Js).ld(this.wm)
- this.transform = { translate: this.transform.translate.add(c), scale: b, rotate: 0 }
- this.lb = a.P.lb
- },
- OP: function (a, b) {
- this.Na = this.J.Na
- this.Cf = this.ne
- this.wm = this.Gg
- this.ye = !1
- this.currentTime = +new Date()
- this.BV = b.BV
- var c = this.pk
- this.Il = this.$n && b.ZH
- var d = this.Ig,
- e = 256 * c.rE,
- c = 256 * c.zK
- this.ge = this.zoom << 0 !== this.zoom
- var f = this.lb.ab(this.Na)
- f.x < -g.a.Fa / 2 ? (f.x += g.a.Fa) : f.x > g.a.Fa / 2 && (f.x -= g.a.Fa)
- this.aQ = f.ld(this.Gg)
- return [d, e, c, b]
- },
- Lz: function (a, b) {
- var c = this.OP(a, b)
- this.at.apply(this, c)
- this.Ne(a)
- this.vg && !this.g.Ra && ((c = this.g), (c.Ra = !0), c.Jd ? c.qa('renderComplete') : ((c.Jd = !0), c.qa('complete')))
- },
- oc: function (a, b) {
- this.sp = a.sp
- this.gf = a.gf
- this.gp(a, b)
- this.Js && g.l.Xl && (a.ge || a.gf) ? this.Wv(a, b) : this.Lz(a, b)
- this.Js = this.lb
- this.ye && this.set('display', 0)
- },
- Vv: function () {
- for (var a = this.Nb.childNodes, b = a.length - 1; 0 <= b; b -= 1) a[b] && a[b].gd !== this.gd && this.Nb.removeChild(a[b])
- },
- qE: function (a, b) {
- return a.fc === b.fc && a.Ic === b.Ic && a.sc === b.sc && a.Hc === b.Hc
- },
- at: function (a) {
- var b = this.gd
- this.gd += 1
- var c = !1,
- d,
- e,
- f
- e = !1
- var h = [],
- k,
- l
- for (d = a.length - 1; 0 <= d; d -= 1)
- if (((f = a[d]), f.length)) {
- e = f[0].ta.z
- var m,
- n,
- p = this.ZK(this.ne, e),
- q = !1
- this.kk && f.vg && f[0].ta.z == this.fb && ((k = []), (l = []), (q = !0))
- for (var r = f.length - 1; 0 <= r; r -= 1) {
- n = f[r]
- q && n.ga && (k.push.apply(k, n.ga), l.push(n.ta + ''))
- this.mU(n)
- if (this.Na === n.Na && n.Cf === this.Cf) {
- var s = n.jd
- if (s && s.parentNode === this.Nb && 1 === n.hx) {
- h.push(n)
- s.gd = this.gd
- n.gd = this.gd
- continue
- }
- }
- n.Na = this.Na
- n.Cf = this.Cf
- m = n.ta
- var c = !0,
- u = new g.H((m.x << (20 - e)) * this.Dd, (m.y << (20 - e)) * this.Dd).ab(this.Na),
- u = u.ld(this.Gg)
- u.x = g.a.wb(u.x, 1)
- u.y = g.a.wb(u.y, 1)
- var v = 1
- if (!n.lY || (this.pX && n.gd !== b)) n.lY = this.currentTime
- this.Il && !n.IB
- ? ((v = Math.max(0, Math.abs(m.z - this.zoom) - 1)), (v = Math.min(1, (this.currentTime - n.lY) / ((1 / Math.pow(1.32, v)) * this.$n))), 1 !== v && (this.ye = !0))
- : (n.IB = !1)
- n.gd = this.gd
- n.hx = v
- n.Ba
- ? ((s = n.jd),
- !s &&
- n.ob &&
- n.ob.jd &&
- ('CANVAS' === n.ob.jd.tagName
- ? ((s = document.createElement('canvas')),
- (s.width = n.ob.jd.width),
- (s.height = n.ob.jd.height),
- s.getContext('2d').drawImage(n.ob.jd, 0, 0, s.width, s.height),
- (n.jd = s),
- (n.ob.Sg -= 1),
- (n.ob = null),
- (n.al = 0))
- : 'IMG' === n.ob.jd.tagName
- ? ((s = document.createElement('img')), (s.src = n.ob.jd.src), (n.jd = s), (n.ob.Sg -= 1), (n.ob = null), (n.al = 0))
- : (s = n.ob.jd)),
- 0 !== v &&
- s &&
- (this.g4(s, u.x, u.y, p, p, v, m.z),
- s.parentNode !== this.Nb && (g.l.zi && 'overlayer' === this.g.get('type') && (s.style.display = 'none'), this.bv.appendChild(s)),
- (s.gd = this.gd),
- (n.ne = this.ne),
- h.push(n)))
- : (n.ee = null)
- }
- e = !0
- }
- this.kk && k && ((r = l.sort().join(';')), (k.HS = r), r !== this.te.HS && (this.te = k))
- 1 < a.length && (this.ye = !0)
- this.Nk = h
- this.Vv()
- this.Nb.appendChild(this.bv)
- return c || !e
- },
- mU: function () {},
- Ne: function () {
- this.transform = { translate: this.aQ, scale: Math.pow(2, this.zoom - this.ne), rotate: 0 }
- },
- })
- window.CanvasRenderingContext2D &&
- ((window.CanvasRenderingContext2D.prototype.AQ = function (a, b, c, d, e) {
- 'undefined' === typeof e && (e = [10, 10])
- this.moveTo(a, b)
- var f = c - a,
- h = d - b,
- k = Math.floor(Math.sqrt(f * f + h * h))
- d = f / k
- c = h / k
- e.Eg = 0
- for (var l = [], f = this.sI, m = 0, n = 0, p = !1, q = (h = 0); q < e.length; q += 1)
- (e.Eg += e[q]), (l[q] = { aD: e[q] * d, bD: e[q] * c, ez: (h += e[q]) }), (f -= e[q]), 0 > f && !p && ((m = q), (n = -f), (p = !0))
- for (p = 0; n + p <= k; )
- n < e[m] ? ((f = n * d), (h = n * c)) : ((f = l[m].aD), (h = l[m].bD)),
- (a += f),
- (b += h),
- this.HE ? this.moveTo(a, b) : this.lineTo(a, b),
- (p += n),
- (this.HE = !this.HE),
- (n = e[(m + 1) % e.length]),
- (m = (m + 1) % e.length)
- k -= p
- a += k * d
- b += k * c
- this.HE ? this.moveTo(a, b) : this.lineTo(a, b)
- this.sI = (this.sI + p + k) % e.Eg
- }),
- (window.CanvasRenderingContext2D.prototype.yoa = function (a, b, c, d) {
- 'undefined' === typeof d && (d = [10, 10])
- var e = 2 * Math.PI * c,
- f = 0 >= d ? e : Math.round(e / (d[0] + d[1])),
- h = ((d[0] + d[1]) / e) * 2 * Math.PI
- d = (d[0] / e) * 2 * Math.PI
- for (e = 0; e < f; e += 1) this.beginPath(), this.arc(a, b, c, e * h, e * h + d), this.stroke()
- }))
- g.M.Ke.Gl = g.M.Ti.extend({
- A: function (a, b) {
- arguments.callee.ma.apply(this, arguments)
- this.Yg()
- },
- LR: function () {
- return this.Za.WU
- },
- uj: function () {
- return this.Nb
- },
- Yg: function () {
- this.Nb = document.createElement('div')
- this.Nb.className = 'amap-markers'
- this.Za = new g.M.Ke.fd(this.Nb)
- this.Za.g = this.g
- this.J.K.appendChild(this.Nb)
- },
- ut: function (a, b) {
- this.bv = b.bv
- this.hz = b
- this.Pf = a.P.Pf
- this.T = a.P.T
- this.zoom = a.P.zoom
- this.size = a.size
- this.Ha = a.P.Ha
- this.Cq = a.T
- this.mb = a.P.lb
- this.oh = a.P.oh
- var c = !1
- if (!this.Na || 500 < Math.abs(this.mb.x - this.Na.x) / this.T || 500 < Math.abs(this.mb.y - this.Na.y) / this.T) c = !0
- if (c || this.zoom << 0 !== this.zoom || this.Cf !== this.zoom) (this.Na = this.mb), (this.Cf = this.zoom)
- },
- jv: function (a) {
- var b = a.P.Ha.Ac.y * this.T
- a = a.P.Ha.Ac.x * this.T
- return [this.mb.x - a, this.mb.y - b, this.mb.x + a, this.mb.y + b]
- },
- Vv: function () {
- if (this.Sh && this.Sh)
- for (var a in this.Sh)
- if (this.Sh.hasOwnProperty(a)) {
- var b = this.Sh[a]
- b.ee !== this.ee && b.fa && this.J.Ml.appendChild(b.fa)
- }
- },
- oc: function (a, b) {
- this.ee = (1e6 * Math.random()) << 0
- this.ut(a, b)
- this.P = a.P
- this.size = a.size
- var c = this.g
- this.Dd = 256
- var d, e
- e = this.jv(a)
- var f = 0
- c.lm && (f = 50 * this.T)
- e[0] -= this.g.Af * this.T + f
- e[1] -= this.g.ig * this.T + f
- e[2] += this.g.Af * this.T + f
- e[3] += this.g.ig * this.T + f
- c = c.xn(e)
- for (d in c) c.hasOwnProperty(d) && ((c[d].ee = this.ee), (c[d].g6 = this))
- this.Vv(c)
- this.ut.call(this.Za, a, b)
- this.Za.wE(c)
- this.Sh = c
- this.Ne(a)
- },
- Ne: function () {
- var a = Math.pow(2, this.zoom - this.ne)
- this.transform = { translate: this.Na.ab(this.mb).ld(this.T), scale: a, rotate: 0 }
- },
- })
- g.M.Ke.fd = g.da.extend({
- A: function (a) {
- this.pl = a
- },
- wE: function (a, b) {
- var c = document.createDocumentFragment(),
- d = b && b.zS ? null : {},
- e = !0,
- f
- for (f in a)
- if (a.hasOwnProperty(f)) {
- var h = a[f],
- k,
- l = h.get('params')
- if (h.fa) k = h.fa
- else {
- k = g.f.create('div')
- k.className = 'amap-marker'
- var m = l.Ug,
- n = l.e9,
- p = l.IJ
- m && k.appendChild(m)
- n && k.appendChild(n)
- p && !1 !== m.yM && k.appendChild(p)
- h.fa = k
- h.Ug = m
- if ((n = l.title)) m.title = n
- this.g.lm = !0
- ;-1 === g.a.indexOf(this.g.ah, h) && this.g.ah.push(h)
- h.re = !0
- }
- var p = l.offset,
- q = p.x,
- r = p.y,
- s = l.textAlign,
- u = l.verticalAlign,
- n = l.anchor,
- m = !1,
- v,
- w
- n && ((n = n.split('-')), 2 === n.length ? ((s = n[1]), (u = n[0])) : 1 === n.length && 'center' === n[0] && ((s = 'center'), (u = 'middle')))
- var t,
- n = (t = 0)
- if ('AMap.Text' == h.Tp || 'AMap.Marker' == h.Tp) {
- if (((w = v = 0), k.parentNode !== this.pl && d && ((m = !0), (d[f] = h), (e = !1)), !m)) {
- h.re || !h.Wj ? ((t = g.f.Lo(h.Ug)), (h.Wj = t)) : (t = h.Wj)
- n = t[0]
- t = t[1]
- switch (s) {
- case 'center':
- v = n / 2
- break
- case 'right':
- v = n
- }
- switch (u) {
- case 'middle':
- w = t / 2
- break
- case 'bottom':
- w = t
- }
- q -= v
- r -= w
- }
- } else (v = -q), (w = -r)
- var x, y
- if (!m)
- if (h.re) {
- var E = []
- x = this.Ku(h.W.za)
- h.Na = this.Na
- y = l.nF
- r = Math.round(x[1] + r + y.y)
- q = Math.round(x[0] + q + y.x)
- E.push('top:' + r + 'px')
- E.push('left:' + q + 'px')
- E.push('z-index:' + (l.S5 ? this.g.er + 10 : l.zIndex))
- if (!g.l.Ue) {
- r = v
- q = w
- if ('AMap.Marker' == h.Tp) {
- r = -p.x
- q = -p.y
- switch (s) {
- case 'center':
- r = -p.x + n / 2
- q = -p.y + t / 2
- break
- case 'right':
- r = -p.x + n
- }
- switch (u) {
- case 'middle':
- q = -p.y + t / 2
- break
- case 'bottom':
- q = -p.y + t
- }
- }
- E.push(g.f.C4(k, l.Rp, { x: r, y: q }))
- }
- E.push('display:' + (l.visible ? 'block' : 'none') + ';')
- k.style.cssText = E.join(';')
- if ((p = l.label) && p.content) {
- l = l.IJ
- s = p.direction
- r = null
- h.Cv || ((r = g.f.Lo(l)), (h.Cv = r))
- u = (r = h.Cv) && r[0]
- w = r && r[1]
- q = r = 0
- if (s && u && w)
- switch (s) {
- case 'top':
- r = -w
- q = (n - u) / 2
- break
- case 'right':
- r = (t - w) / 2
- q = n
- break
- case 'bottom':
- r = t
- q = (n - u) / 2
- break
- case 'left':
- r = (t - w) / 2
- q = -u
- break
- case 'center':
- ;(r = (t - w) / 2), (q = (n - u) / 2)
- }
- p.offset ? ((r = r + p.offset.y + 'px'), (q = q + p.offset.x + 'px')) : ((r += 'px'), (q += 'px'))
- l.style.top = r
- l.style.left = q
- }
- } else if (h.cba || this.zoom << 0 !== this.zoom || h.zoom !== this.zoom || k.parentNode !== this.pl || h.Na !== this.Na)
- (x = this.Ku(h.W.za)), (h.Na = this.Na), (y = l.nF), (r = Math.round(x[1] + r + y.y)), (q = Math.round(x[0] + q + y.x)), (k.style.top = r + 'px'), (k.style.left = q + 'px')
- h.zoom = this.zoom
- k.parentNode !== this.pl && (g.l.zi && g.a.iepngFix(k), c.appendChild(k))
- h.re = m
- k.LB = this.pl
- }
- this.pl.appendChild(c)
- e || this.wE(d, { zS: !0 })
- },
- Ku: function (a) {
- var b = a[0] - this.Na.x
- b > g.a.Fa / 2 ? (b -= g.a.Fa) : b < -g.a.Fa / 2 && (b += g.a.Fa)
- return [b / this.T, (a[1] - this.Na.y) / this.T]
- },
- })
- var Nc = g.r,
- Tc = g.l,
- gc = g.da.Ru,
- Uc = g.Qva,
- fa = document,
- Vc = !0,
- Wc = []
- Tc.Tf && Wc.push('touch')
- Tc.ba || Wc.push('mouse')
- Tc.bL && (Wc.push('vectorlayer', 'overlay'), Tc.qp ? Wc.push('wgl') : Wc.push('cgl'))
- if (Uc) {
- for (var Xc = [], Yc = Uc.split(','), Jc = 0; Jc < Yc.length; Jc += 1) {
- var Zc = Yc[Jc]
- gc[Zc] && Xc.push.apply(Xc, gc[Zc])
- Xc.push(Zc)
- }
- Wc = Wc.concat(Xc)
- }
- Wc.push('sync')
- if (Tc.Gv) {
- var $c = !0,
- ad = [],
- bd = []
- try {
- for (var Jc = 0, cd = Wc.length; Jc < cd; Jc++) {
- var dd = JSON.parse(localStorage.getItem('_AMap_' + Wc[Jc]))
- if (dd && dd.version === Nc.Dk) ad.push(dd.script), dd.css && bd.push(dd.css)
- else {
- ad = void 0
- $c = !1
- break
- }
- }
- } catch (ed) {
- ;(ad = bd = void 0), ($c = !1)
- }
- if ($c)
- try {
- bd.length && fd()
- var gd = ad.join(';')
- eval(gd)
- } catch (hd) {
- Vc = !1
- }
- else Vc = !1
- } else Vc = !1
- if (Vc) for (Jc = 0; Jc < Wc.length; Jc += 1) g.tb.QC(Wc[Jc]).status = 1
- else (Nc.MJ = !1), id()
- function jd() {
- for (var a = fa.getElementsByTagName('script'), b, c = 0; c < a.length; c += 1)
- if (0 === a[c].src.indexOf(Nc.Gb + '/maps?')) {
- b = a[c]
- break
- }
- return Nc.Mc || (b && b.async)
- }
- function id() {
- var a = Nc.Gb + '/maps/modules?v=' + Nc.ln + '&key=' + Nc.key + '&vrs=' + Nc.Dk + '&m=' + Wc.join(',')
- jd()
- ? kd(a)
- : (fa.write('<script crossorigin="anonymous" id="amap_plus_js" src="' + a + '" type="text/javascript">\x3c/script>'),
- setTimeout(function () {
- fa.getElementById('amap_plus_js') || kd(a)
- }, 1))
- }
- function kd(a) {
- var b = fa.createElement('script')
- b.charset = 'utf-8'
- b.src = a
- b.id = 'amap_plus_js'
- ;(a = fa.head || fa.getElementsByTagName('head')[0] || fa.body) && a.appendChild(b)
- }
- function fd() {
- var a = bd.join('\n'),
- b = fa.createElement('style')
- b.type = 'text/css'
- ;-1 === Nc.Gb.indexOf('webapi.amap.com') && (a = a.replace(/webapi.amap.com/gi, Nc.Gb.split('://')[1]))
- 'https' === Nc.tc && (a = a.replace(/http:/gi, 'https:'))
- if (b.styleSheet) {
- var c = function () {
- try {
- b.styleSheet.cssText = a
- } catch (c) {}
- }
- b.styleSheet.disabled ? setTimeout(c, 10) : c()
- } else b.appendChild(fa.createTextNode(a))
- c = fa.head || fa.getElementsByTagName('head')[0]
- 2 > c.childNodes.length ? c.appendChild(b) : c.insertBefore(b, c.childNodes[1])
- }
- typeof _cssload_ == 'function' && _cssload_('logo', '.amap-logo{display:block!important;pointer-events:none;}', true)
- })([
- 'e661b00bdf2c44cccf71ef6070ef41b8',
- [113.084824, 21.806335, 114.325757, 22.443655, 113.553986, 22.224979],
- 'https://webapi.amap.com',
- 1,
- '1.4.17',
- null,
- '440400',
- '',
- true,
- false,
- false,
- true,
- '20211117211203-20201123-1',
- false,
- 'A',
- '3_21_11_19_00',
- 'https',
- 'webapi.amap.com',
- ])
|