text: 'use strict'
  
  const DEBUG = true
  
  const EVAC_OPTION_DRIVE = 'drive'
  const EVAC_OPTION_WALK = 'walk'
  
  const DEFAULT_ZOOM = 15
  const DEFAULT_LOCATION = {lat: -43.57643167342933, lng: 172.76022442275394}
  const OPENSTREET_TEMPLATE = {
    URL: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
    OPTIONS: {
      attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
      maxZoom: 20
    }
  }
  
  const GOOGLESTREET_TEMPLATE = {
    URL: 'http://{s}.google.com/vt/lyrs=m&x={x}&y={y}&z={z}',
    OPTIONS: {
      maxZoom: 20,
      subdomains: ['mt0', 'mt1', 'mt2', 'mt3']
    }
  }
  /*Take same coordinates's order given from GeoJSON file.ex: [172.740839757922146,-43.562543510134788 ]*/
  const INUNDATION_DATA = [
    {
      'type': 'Feature',
      'properties': {
        'OBJECTID': 1,
        'Shape_Length': 30549.762903494931,
        'Shape_Area': 18112670.1834861
      },
      'bbox': [172.734013751936772, -43.58819576178584, 172.814300743107879, -43.551334942383534],
      'geometry': {
        'type': 'MultiPolygon',
        'coordinates': [[[
          [172.814295565377051, -43.553051918507471],
          [172.814264038206545, -43.563316662268321],
          [172.814215055129779, -43.57925399088105],
          [172.81421367084377, -43.579704197255602],
          [172.814209794672394, -43.580964774914804], [172.814207025824629, -43.581865187357515], [172.814201210826923, -43.583756053023329], [172.814198718511847, -43.584566423830566], [172.81419594915107, -43.585466835703237], [172.814195672207916, -43.585556876882663], [172.814193456616636, -43.5862772062668], [172.81419317966197, -43.586367247433401], [172.814192071830405, -43.586727412085565], [172.814191794869316, -43.586817453245033], [172.814191517906949, -43.586907494403093], [172.814187640298911, -43.588168070466182], [172.813072742926323, -43.588175637141482], [172.81294886542554, -43.588176477212016], [172.812824987921772, -43.588177317148308], [172.81270111041502, -43.588178156950391], [172.810966825007569, -43.588189900084799], [172.810842947456194, -43.588190737873369], [172.810347437220827, -43.588194087685295], [172.81022355965456, -43.588194924802686], [172.810099682085337, -43.58819576178584], [172.8100997902595, -43.588161353473737], [172.810223664482265, -43.588161559166451], [172.810223947371412, -43.588071518048707], [172.810347821410886, -43.588071723606561], [172.810348104114041, -43.587981682486742], [172.810348386815917, -43.587891641365509], [172.810472260487387, -43.587891846787869], [172.8104725430033, -43.587801805664554], [172.810596416491421, -43.587802010952053], [172.810596698821399, -43.587711969826685], [172.810596981150042, -43.587621928699882], [172.810597263477376, -43.587531887571657], [172.810473390543194, -43.587531682286084], [172.810473955563225, -43.587351600026636], [172.810474238071293, -43.587261558894788], [172.810350365692329, -43.587261353476919], [172.810350648383718, -43.587171312344275], [172.810350931073827, -43.587081271210209], [172.810227059065454, -43.587081065659426], [172.810227624810977, -43.586900983388297], [172.810227907681764, -43.586810942250594], [172.810104036228608, -43.586810736567514], [172.810104319282743, -43.586720695429037], [172.810104602335542, -43.586630654289117], [172.809980731252978, -43.586630448473116], [172.809981297723965, -43.58645036619032], [172.809981580957469, -43.586360325046783], [172.809857710430123, -43.586360119098501], [172.809857993846975, -43.586270077954183], [172.809858277262464, -43.586180036808436], [172.809734407105708, -43.586179830727232], [172.809734974302074, -43.585999748432748], [172.809735257898268, -43.585909707283371], [172.80961138829673, -43.585909501069892], [172.809611672076244, -43.585819459919726], [172.80961195585445, -43.58572941876816], [172.809488086623446, -43.585729212421761], [172.809488370584972, -43.585639171269385], [172.809488654545163, -43.585549130115595], [172.80936478568475, -43.585548923636281], [172.809365069828289, -43.58545888248171], [172.809365353970463, -43.585368841325732], [172.809241485480612, -43.585368634713497], [172.809241769806135, -43.585278593556716], [172.809242054130323, -43.585188552398527], [172.809118186011005, -43.585188345653378], [172.809118470518513, -43.585098304494409], [172.809118755024684, -43.585008263334004], [172.808994887275958, -43.585008056455948], [172.808995171965421, -43.584918015294768], [172.808995456653605, -43.584827974132168], [172.808871589275412, -43.584827767121205], [172.808871874146888, -43.584737725957815], [172.808872159017, -43.584647684793005], [172.808748292009398, -43.584647477649135], [172.808748862114953, -43.584467395316537], [172.808624995477885, -43.584467188039767], [172.808625280713272, -43.584377146871972], [172.808625565947352, -43.584287105702764], [172.808501699680846, -43.58428689829308], [172.808501985098218, -43.584196857123089], [172.808502270514282, -43.584106815951678], [172.80837840461831, -43.584106608409094], [172.808378690217666, -43.584016567236894], [172.808254824507628, -43.584016359560763], [172.808255396071559, -43.583836277213393], [172.808131530732055, -43.583836069404363], [172.808132102659954, -43.583655987052609], [172.808008237690984, -43.583655779110671], [172.808008523837543, -43.583565737933299], [172.808008809982766, -43.583475696754498], [172.807884945384359, -43.583475488679667], [172.807885231712874, -43.583385447500106], [172.807761367300373, -43.583385239291736], [172.807761940322621, -43.583205156929615], [172.807638076280682, -43.583204948588353], [172.807638649666814, -43.583024866221841], [172.807514785995409, -43.583024657747679], [172.80751507287107, -43.582934616562937], [172.807515359745423, -43.582844575376775], [172.807391496444552, -43.582844366769727], [172.807391783502169, -43.582754325582783], [172.807267920387204, -43.582754116842189], [172.807268494867657, -43.582574034465331], [172.807144632123226, -43.582573825591851], [172.807145206967533, -43.582393743210602], [172.807021344593636, -43.582393534204243], [172.807021919801798, -43.58221345181861], [172.806898057798435, -43.582213242679359], [172.806898345585125, -43.582123201485054], [172.806898633370452, -43.582033160289321], [172.806774771737594, -43.58203295101719], [172.806775059706183, -43.581942909820697], [172.806775347673465, -43.581852868622768], [172.806651486411141, -43.581852659217752], [172.806651774561658, -43.581762618019049], [172.806652062710839, -43.581672576818939], [172.80652820181902, -43.581672367281051], [172.806528490151464, -43.581582326080152], [172.806528778482601, -43.581492284877832], [172.80640491796126, -43.581492075207059], [172.806405206475631, -43.581402034003972], [172.806281346140224, -43.581401824199673], [172.806281923534129, -43.581221741790543], [172.806158063569228, -43.581221531853373], [172.805910343643433, -43.581221111576468], [172.805786483682567, -43.58122090123674], [172.805538763764815, -43.58122048015472], [172.805539053567259, -43.581130438951959], [172.805291334024048, -43.581130017334516], [172.805167474254489, -43.581129806324512], [172.805043614486237, -43.581129595180329], [172.804795894953799, -43.581129172489405], [172.80454817542676, -43.58112874926173], [172.804548466704489, -43.581038708062827], [172.80430074755202, -43.581038284299737], [172.804176887977803, -43.58103807221692], [172.804053028404923, -43.5810378599999], [172.803929168833406, -43.581037647648721], [172.803929461032766, -43.580947606451694], [172.803929753230705, -43.580857565253261], [172.803930045427336, -43.580767524053392], [172.803806186410924, -43.580767311570007], [172.803806478790762, -43.580677270369371], [172.803806771169235, -43.580587229167321], [172.803807063546373, -43.580497187963843], [172.803683205085036, -43.580496975348261], [172.803683790204417, -43.580316892938356], [172.803684082762061, -43.580226851731268], [172.80368437531834, -43.580136810522745], [172.803560517596679, -43.580136597775649], [172.803560810336165, -43.58004655656638], [172.803561103074315, -43.579956515355676], [172.80356139581113, -43.579866474143543], [172.803437538644516, -43.579866261264264], [172.803438124483193, -43.579686178837065], [172.803438417400486, -43.579596137621337], [172.803438710316414, -43.57950609640416], [172.803314853889447, -43.579505883393374], [172.803190997463872, -43.579505670248388], [172.803190704178775, -43.579595711464229], [172.803066847569966, -43.57959549818441], [172.803066554098962, -43.579685539398142], [172.802942697306946, -43.579685325983476], [172.802942403649979, -43.579775367195118], [172.802818546674757, -43.579775153645613], [172.802818252831884, -43.579865194855167], [172.802694395673456, -43.579864981170807], [172.802694101644647, -43.579955022378272], [172.802570244303013, -43.579954808559066], [172.802569655872162, -43.580134890968374], [172.802445798162722, -43.580134677013646], [172.802445503760708, -43.580224718215497], [172.802321645868062, -43.58022450412593], [172.802321351280085, -43.58031454532567], [172.802197493204233, -43.580314331101249], [172.802197198430321, -43.580404372298915], [172.802073340171262, -43.580404157939633], [172.801902945909632, -43.580537210986705], [172.800098028256485, -43.57978100278708], [172.799970134708332, -43.579680163777908], [172.799846277950564, -43.579679947008778], [172.79972242119419, -43.579679730105461], [172.799722719648543, -43.579589688909891], [172.799598863078131, -43.579589471873078], [172.799475006509056, -43.579589254702093], [172.799475305331185, -43.579499213506438], [172.799351448948073, -43.579498996201949], [172.799227592566382, -43.579498778763288], [172.79922789175626, -43.579408737567576], [172.798980179366112, -43.579408302289067], [172.798980478923738, -43.579318261093292], [172.798732766908273, -43.579317825279439], [172.798733066833648, -43.579227784083592], [172.798485355192867, -43.579227347734395], [172.798485655485962, -43.579137306538492], [172.798416744902681, -43.579177215806205], [172.79829703912597, -43.580506527322143], [172.797286480203724, -43.579916039177576], [172.797121127299079, -43.579765185320504], [172.796997270388715, -43.579764965464577], [172.796254128956122, -43.579763643511257], [172.795882558258825, -43.579762980723181], [172.795882254079999, -43.579853021894692], [172.79588194989978, -43.579943063064775], [172.796005807166637, -43.579943284129691], [172.796005503169567, -43.580033325299034], [172.796005199171077, -43.58012336646695], [172.796129056808496, -43.580123587399072], [172.796128752993184, -43.580213628566256], [172.796252610816566, -43.580213849364881], [172.796252307184432, -43.580303890531333], [172.796252003550904, -43.580393931696356], [172.796375861744849, -43.580394152362189], [172.796375558294471, -43.580484193526473], [172.796375254842701, -43.580574234689337], [172.796499113407208, -43.580574455222362], [172.796498810138587, -43.580664496384486], [172.796622668889057, -43.580664716784014], [172.796622365803614, -43.580754757945414], [172.796622062716779, -43.580844799105371], [172.796782804738285, -43.580897337935639], [172.79649790032434, -43.580934619862305], [172.796002463121539, -43.580933736914069], [172.796002159109008, -43.581023778067738], [172.79525900223959, -43.581022449615702], [172.794887423823951, -43.581021783578187], [172.79488711814875, -43.581111824724189], [172.794886812472129, -43.581201865868771], [172.794762952633931, -43.581201643586503], [172.794762646771318, -43.581291684728967], [172.794762340907283, -43.581381725869988], [172.794638480701337, -43.58138150345215], [172.794638174651283, -43.581471544591061], [172.794637868599835, -43.581561585728558], [172.794514008026113, -43.58156136317514], [172.794513395549814, -43.581741445444443], [172.794389534608342, -43.581741222755447], [172.794388921757161, -43.581921305017666], [172.794265060447913, -43.581921082193091], [172.79426475383562, -43.582011123321358], [172.794140892343222, -43.582010900361901], [172.794140585544909, -43.582100941488044], [172.794140278745147, -43.582190982612772], [172.794016416885, -43.582190759517722], [172.794016109899218, -43.582280800640326], [172.794015802912071, -43.582370841761495], [172.793891940684119, -43.582370618530859], [172.793891633510924, -43.582460659649925], [172.793767771099795, -43.582460436284393], [172.793767463740608, -43.58255047740132], [172.793643601146329, -43.582550253900905], [172.793643293601093, -43.582640295015715], [172.793519430823636, -43.582640071380403], [172.7933955680476, -43.582639847610906], [172.793395260131774, -43.582729888722902], [172.79327139717256, -43.582729664818515], [172.793271089070686, -43.582819705928372], [172.793147225928323, -43.582819481889089], [172.79302336278738, -43.58281925771562], [172.793023054314887, -43.582909298822649], [172.792899190990767, -43.582909074514276], [172.792898882332224, -43.582999115619174], [172.792775018824955, -43.582998891175919], [172.792774709980392, -43.583088932278685], [172.792650846289945, -43.583088707700533], [172.792526982600918, -43.583088482988181], [172.792403118913342, -43.583088258141622], [172.792279255227157, -43.583088033160884], [172.792031527859166, -43.583087582796814], [172.792031837811351, -43.582997541698262], [172.791907974314086, -43.582997316315641], [172.79178411081827, -43.582997090798827], [172.791660247323904, -43.582996865147813], [172.791536383830959, -43.582996639362612], [172.791412520339463, -43.582996413443219], [172.791412209464283, -43.583086454538247], [172.79128834578961, -43.58308622848395], [172.79128803472841, -43.583176269576853], [172.791287412601662, -43.583356351758376], [172.791163548374641, -43.583356125567761], [172.791163237124493, -43.583446166655669], [172.791162614619907, -43.583626248827237], [172.791038749840482, -43.583626022500304], [172.791038438401443, -43.583716063583239], [172.790914138640431, -43.583841467839406], [172.790790708477743, -43.583715610525367], [172.790666843518096, -43.583715383795145], [172.79066715551096, -43.583625342714335], [172.790543290737361, -43.583625115850616], [172.790543915087994, -43.583445033686132], [172.790420050685043, -43.583444806689641], [172.790419425965155, -43.583624888852704], [172.790295561194426, -43.583624661720592], [172.790294936099571, -43.583804743876513], [172.790212315105236, -43.58411505589855], [172.790046579984931, -43.583984371354255], [172.789922714480127, -43.583984143816714], [172.78992302758499, -43.583894102744445], [172.789799162266235, -43.583893875073414], [172.789799475554275, -43.583803834000413], [172.789608921207872, -43.583845162869018], [172.789477605369001, -43.584260484042879], [172.788807925002118, -43.583982089939873], [172.788684059511837, -43.583981861060337], [172.788683744559421, -43.584071902124052], [172.788559878885991, -43.584071673109612], [172.788312147543508, -43.584071214678126], [172.788311832035816, -43.584161255738252], [172.787940234479208, -43.584160567082385], [172.787816368629962, -43.58416033726202], [172.787568636935816, -43.584159877218717], [172.787727021168564, -43.584392991176003], [172.787319954284897, -43.58442953979322], [172.787263498897715, -43.584630160076721], [172.7866372109483, -43.5848555701455], [172.786451616405429, -43.584788087686398], [172.786451298116759, -43.584878128724327], [172.786203563501118, -43.584877665717059], [172.78610200035007, -43.584984004897777], [172.785881786558349, -43.585093924289303], [172.785716400652774, -43.585557408027057], [172.785457481732522, -43.585686642699422], [172.78545716195211, -43.585776683717292], [172.785333292809156, -43.58577645119987], [172.785332972842639, -43.585866492215601], [172.785209103516536, -43.58586625956324], [172.785208783363885, -43.585956300576811], [172.785084913854632, -43.585956067789525], [172.785084593515904, -43.586046108800936], [172.784960723823531, -43.58604587587871], [172.784753975637472, -43.586262347532625], [172.784356559785294, -43.586082086256816], [172.784517314373659, -43.585631610417948], [172.784590720126801, -43.585594971250032], [172.78459104119662, -43.5855049302344], [172.784467172617923, -43.585504696779715], [172.784467815122383, -43.585324614745652], [172.784343946914447, -43.58532438115823], [172.784344268349059, -43.58523434013977], [172.784220400327229, -43.585234106418881], [172.784221686789294, -43.584873942333758], [172.784097819507423, -43.584873708481588], [172.784098784892194, -43.58460358540497], [172.784222651620212, -43.584603819254951], [172.784223294833339, -43.584423737195287], [172.784099428474576, -43.58442350334677], [172.784100715621435, -43.584063339213259], [172.784224581241773, -43.584063573058856], [172.78422490284018, -43.583973532021176], [172.784348768277368, -43.583973765731841], [172.784432417700401, -43.583854336474808], [172.784597141240937, -43.58379415066657], [172.78459778331964, -43.583614068576878], [172.784721648022895, -43.583614301882029], [172.784722289726403, -43.583434219785154], [172.784474561059824, -43.583433753043565], [172.784474239839568, -43.583523794091256], [172.784226510809731, -43.583523326811417], [172.784226189218799, -43.583613367856223], [172.784102324521484, -43.583613134014279], [172.78405855494637, -43.583675636600404], [172.7837306798599, -43.583791261506825], [172.783606865747203, -43.583612197304539], [172.783111083742966, -43.583701299484439], [172.783110760487574, -43.583791340519788], [172.782986895434505, -43.583791105468606], [172.782986571993035, -43.583881146501817], [172.782862706756845, -43.583880911315696], [172.78286238312927, -43.583970952346739], [172.782738517709987, -43.583970717025686], [172.782490786875911, -43.583970245981], [172.781995325225779, -43.58396930228124], [172.781871459817012, -43.583969066020806], [172.781499863599748, -43.583968356434312], [172.781375998197007, -43.583968119637085], [172.78117778485057, -43.584039272210653], [172.781128267396042, -43.583967645640044], [172.781004401997848, -43.583967408440223], [172.780948463478524, -43.584019818063936], [172.780508940420134, -43.583966458298953], [172.780508613283473, -43.584056499314521], [172.78001315099155, -43.584055547023105], [172.780012495236804, -43.584235629043995], [172.779517031492304, -43.584234674599443], [172.77951670287419, -43.584324715604772], [172.779268970641851, -43.5843242375758], [172.779268641653005, -43.584414278578201], [172.779020909057522, -43.584413800010942], [172.779020579697942, -43.584503841010424], [172.778896713217875, -43.584503601524744], [172.778772846739315, -43.584503361904858], [172.778772517008946, -43.584593402901426], [172.77877218727707, -43.584683443896559], [172.778648320430847, -43.584683204140987], [172.778647990512809, -43.584773245133945], [172.778524123483464, -43.584773005243413], [172.778523793379293, -43.584863046234204], [172.778399926166884, -43.584862806208719], [172.7783428118816, -43.585065684435015], [172.778027989817133, -43.584953181593768], [172.777841765119092, -43.585018833894836], [172.777656391526534, -43.58495140422167], [172.777532524140213, -43.584951163256015], [172.777233667298788, -43.585093887072667], [172.775810466286572, -43.585443885470454], [172.77542477044932, -43.585487292099863], [172.775310513423364, -43.585602499157247], [172.774608591672859, -43.585703359748351], [172.774462503268978, -43.585850685867634], [172.773787936705844, -43.585946187477404], [172.773601147351627, -43.585494796585806], [172.773666234588205, -43.585258720177301], [172.77361645787127, -43.585072954895331], [172.773764594707188, -43.584996220222926], [172.773868748784395, -43.58480148255569], [172.774064911452797, -43.584764279805931], [172.774065248201651, -43.584674238840996], [172.774065584948886, -43.584584197874626], [172.774189451553411, -43.584584442594888], [172.77419012467405, -43.584404360656364], [172.774313990910883, -43.584404605240891], [172.77431432728423, -43.58431456426873], [172.774438193338028, -43.584314808718297], [172.774438529525213, -43.58422476774394], [172.774562395395975, -43.584225012058539], [172.774562731396998, -43.584134971081994], [172.774563067396457, -43.584044930104021], [172.774686932899499, -43.584045174282906], [172.774687268712825, -43.583955133302737], [172.774811134032831, -43.583955377346655], [172.774811469659966, -43.583865336364305], [172.774935334796936, -43.583865580273269], [172.774935670237909, -43.583775539288716], [172.774936005677347, -43.583685498302756], [172.775059870446654, -43.583685742075993], [172.775060205699901, -43.583595701087845], [172.775184070286144, -43.58359594472612], [172.775240481762211, -43.583437955110298], [172.775483928378407, -43.583183103236543], [172.77568120027459, -43.583146712956101], [172.775682871863836, -43.582696507939289], [172.7756835404887, -43.58251642592257], [172.775684543414343, -43.582246302886823], [172.775684877719812, -43.582156261872058], [172.775685212023717, -43.582066220855857], [172.775809073479536, -43.58206646381025], [172.775809407597336, -43.581976422791875], [172.775933268870119, -43.581976665611307], [172.775933602801757, -43.581886624590751], [172.776057463891505, -43.581886867275244], [172.77605813138095, -43.581706785228313], [172.776058465123384, -43.581616744202719], [172.775934604587377, -43.5816165015205], [172.775934938512819, -43.581526460494224], [172.775811078162974, -43.581526217678586], [172.775812414587648, -43.581166053562292], [172.775936274199154, -43.581166296374903], [172.775936942033042, -43.580986214306691], [172.775937275947655, -43.580896173270432], [172.775937609860733, -43.580806132232759], [172.775938277682258, -43.580626050153136], [172.776062136187818, -43.580626292827006], [172.776062469911693, -43.580536251784302], [172.776111355033379, -43.580159781431824], [172.776311853308698, -43.580086531485463], [172.776435710711468, -43.580086773752249], [172.776436043872337, -43.579996732698717], [172.776559901092071, -43.579996974830564], [172.776643816936087, -43.57991837392057], [172.777736354320069, -43.580051037499345], [172.778170045088785, -43.580000110334204], [172.77817037566416, -43.579910069268685], [172.778171036810221, -43.579729987133362], [172.778294893497758, -43.579730227384445], [172.77829522388393, -43.579640186313895], [172.778419080388431, -43.579640426430046], [172.778419410588526, -43.579550385357329], [172.778543266909992, -43.579550625338548], [172.778543926936436, -43.579370543187316], [172.778667782890295, -43.579370783032864], [172.778668112716673, -43.579280741954364], [172.778669102186569, -43.579010618710306], [172.778792957403709, -43.579010858418677], [172.778793287039377, -43.578920817333717], [172.778793946306195, -43.578740735159542], [172.778917800971186, -43.578740974731488], [172.778918130417708, -43.578650933641505], [172.778918459862751, -43.578560892550101], [172.778918789306232, -43.578470851457283], [172.779042643419075, -43.578471090892812], [172.779042972676478, -43.578381049797798], [172.779414534470504, -43.57838176729711], [172.779415191873426, -43.578201685098342], [172.778795924069925, -43.578200488602768], [172.77879559444645, -43.578290529699132], [172.778424033229015, -43.578289810189482], [172.778300179492902, -43.578289570084593], [172.778237829391003, -43.57840477101], [172.77817632575838, -43.578289329845532], [172.777928618293828, -43.578288848964888], [172.777929611035319, -43.578018725687301], [172.777930603762968, -43.577748602396873], [172.777931596476861, -43.577478479093621], [172.777807744407852, -43.577478238458809], [172.777809399823042, -43.577028032928645], [172.777809730901481, -43.576937991818326], [172.777810061978386, -43.5768479507066], [172.777651604515285, -43.576802621766021], [172.777810393053755, -43.576757909593439], [172.77781072412759, -43.576667868478836], [172.777811386270656, -43.576487786245387], [172.777935236309702, -43.576488026871921], [172.777935898077601, -43.576307944631253], [172.777812048407611, -43.576307704006219], [172.777812379473801, -43.576217662884503], [172.777812710538427, -43.576127621761366], [172.777688861239085, -43.576127381003673], [172.777689192486719, -43.576037339879868], [172.777441494261694, -43.576036857963508], [172.777442157490498, -43.575856775714612], [172.77727789446908, -43.57579595856744], [172.7771951239705, -43.575676211013054], [172.777195455948601, -43.575586169885121], [172.7770716077641, -43.575585928461152], [172.77707193992515, -43.575495887332551], [172.776948091926755, -43.575495645775185], [172.776948756613365, -43.575315563515204], [172.776824908985532, -43.575315321825194], [172.77682623907836, -43.574955157291164], [172.776950085968082, -43.574955398978162], [172.776950418302903, -43.574865357840338], [172.776950750636217, -43.574775316701086], [172.777074597158418, -43.574775558252412], [172.777136945702551, -43.574660357884724], [172.777198443682181, -43.574775799669595], [172.777322290207479, -43.574776040952607], [172.777384638280495, -43.574660840448836], [172.777446136734312, -43.574776282101475], [172.777941522856992, -43.574777245355385], [172.777943507967507, -43.574236998453756], [172.777695817117319, -43.57423651710414], [172.777696148332751, -43.574146475950386], [172.777572303094473, -43.574146235075105], [172.777572634492884, -43.574056193920676], [172.777448789440683, -43.574055952911998], [172.777449121022045, -43.5739659117569], [172.7774494526019, -43.573875870600375], [172.777325607920233, -43.573875629459046], [172.777326603204102, -43.573605505983174], [172.777326934962332, -43.573515464821689], [172.777203091020226, -43.573515223549222], [172.777203422961406, -43.573425182387091], [172.777079579205378, -43.573424940981234], [172.777079911329537, -43.573334899818406], [172.776956067759556, -43.573334658279158], [172.77695673237227, -43.57315457595076], [172.77695706467631, -43.573064534784422], [172.776957729279815, -43.572884452447461], [172.776799282840955, -43.572839122317916], [172.776958061579251, -43.572794411276853], [172.776958393877152, -43.572704370104802], [172.776834551600217, -43.57270412843669], [172.776835549038168, -43.572434004914278], [172.776835881514415, -43.572343963737289], [172.776677436582958, -43.572298633437832], [172.7768362139891, -43.572253922558872], [172.776933227160981, -43.571970027205928], [172.776837876339471, -43.571803716645398], [172.776714035909094, -43.571803474850704], [172.776714368559027, -43.571713433664499], [172.776590528314671, -43.571713191736414], [172.776591526808744, -43.57144306817149], [172.776715366499644, -43.571443310097301], [172.776839206192051, -43.571443551888976], [172.776839538651359, -43.571353510696305], [172.776963378160843, -43.571353752353076], [172.776963710434131, -43.571263711158224], [172.777087549760665, -43.571263952680113], [172.777211389088706, -43.571264194067858], [172.777335228418309, -43.57126443532146], [172.777954425089376, -43.571265639577412], [172.77795475588519, -43.571175598375099], [172.778078595039517, -43.571175838823123], [172.778078925649311, -43.571085797618643], [172.778202764620687, -43.571086037931785], [172.778203425466756, -43.570905955517027], [172.778203755887489, -43.570815914307516], [172.778079917469569, -43.570815673996641], [172.777956079053183, -43.57081543355163], [172.777955748263508, -43.570905474759634], [172.777831909664144, -43.570905234179726], [172.777707609011344, -43.571030624357093], [172.777584232470105, -43.570904752617501], [172.777167541874064, -43.570856172227259], [172.777089874339055, -43.570633664270929], [172.776966036303918, -43.570633422754334], [172.776966700824289, -43.570453340340393], [172.776967033082173, -43.570363299131273], [172.776843195602027, -43.570363057482801], [172.776844525356069, -43.570002892635131], [172.77672068861537, -43.57000265085555], [172.77672135385211, -43.569822568424662], [172.776597517481918, -43.569822326512465], [172.776597850282428, -43.569732285295643], [172.776598183081433, -43.5696422440774], [172.776474347081717, -43.569642002032573], [172.776475013044006, -43.569461919593316], [172.776227341787092, -43.569461435104309], [172.776227675134862, -43.569371393884055], [172.775980004253057, -43.569370908860044], [172.775917659004136, -43.569486108710784], [172.775856168814471, -43.569370666146838], [172.775432927708636, -43.569294192318452], [172.775310048493566, -43.569422858439502], [172.775236656821221, -43.569459491783071], [172.775236321996118, -43.569549532995815], [172.775112486197884, -43.569549289476313], [172.775112151186789, -43.569639330686883], [172.774740643247952, -43.569638599321308], [172.774740307681867, -43.569728640528162], [172.774492635361497, -43.569728152278927], [172.774368330226935, -43.569853538841819], [172.774244963047323, -43.569727663493161], [172.774121126892595, -43.569727418899085], [172.773873454587772, -43.569726929308537], [172.773873117728812, -43.569816970508612], [172.773749281394259, -43.569816725511373], [172.773501608729873, -43.569816235114502], [172.773500933900408, -43.56999631750579], [172.773377097201603, -43.569996072104622], [172.773376759600069, -43.57008611329735], [172.773252922718342, -43.570085867761279], [172.773129085838178, -43.570085622091078], [172.773128409892507, -43.570265704469215], [172.773004572644965, -43.570265458663343], [172.773004234485285, -43.570355499849498], [172.77288039705482, -43.570355253908716], [172.772880058709092, -43.570445295092689], [172.772879720361829, -43.570535336275221], [172.772755882563956, -43.570535090198774], [172.772755544030616, -43.57062513137911], [172.772631706049879, -43.570624885167753], [172.772507868070676, -43.570624638822267], [172.772507529166802, -43.570714679999654], [172.772507190261365, -43.570804721175598], [172.772383351914755, -43.570804474694441], [172.77238267373022, -43.570984557040511], [172.772134996303805, -43.570984063672682], [172.772134656840194, -43.571074104842054], [172.772010817944874, -43.571073857956165], [172.772010478295186, -43.57116389912332], [172.772009119680831, -43.571524063777716], [172.77188527986462, -43.571523816753825], [172.771884600178993, -43.571703899070926], [172.771760759995402, -43.571703651911349], [172.771760419965744, -43.571793693066979], [172.771760079934523, -43.571883734221196], [172.771636239383469, -43.571883486925941], [172.771635899166171, -43.571973528077947], [172.77163555894731, -43.57206356922854], [172.771511718028876, -43.572063321797593], [172.771511377623909, -43.572153362945976], [172.771387536522553, -43.572153115380111], [172.771386855338932, -43.572333197671064], [172.771263013870168, -43.572332949969507], [172.771206899465881, -43.572532222700332], [172.771014307489594, -43.572602577582721], [172.771013966337193, -43.572692618719458], [172.77089012413515, -43.572692370612359], [172.770889441456575, -43.572872452880006], [172.770765598887124, -43.572872204637221], [172.770765257360949, -43.572962245768124], [172.770641414608576, -43.572961997390415], [172.770641072896325, -43.573052038519123], [172.77064073118251, -43.573142079646402], [172.770516888062701, -43.573141831132993], [172.770516546162781, -43.573231872258063], [172.770515862358195, -43.573411954503946], [172.770268175016298, -43.573411457070016], [172.770267832742604, -43.573501498189252], [172.77026714819047, -43.573681580423461], [172.770143303968354, -43.573681331502939], [172.770142276574745, -43.573951454841236], [172.770018431800679, -43.573951205784233], [172.770018089148465, -43.574041246893358], [172.769894244191477, -43.574040997701424], [172.769893558513246, -43.574221079913855], [172.769645867865989, -43.574220581124408], [172.769645524655431, -43.574310622226918], [172.769521679149676, -43.574310372630187], [172.769466024475008, -43.574450444686114], [172.76884546423841, -43.574809227384996], [172.76865269250041, -43.57484886824443], [172.768652347802572, -43.574938909330712], [172.768652003103142, -43.575028950415572], [172.768528156133954, -43.575028699739349], [172.768404309166385, -43.575028448928968], [172.768403964096308, -43.57511849001083], [172.76815626979689, -43.575117987986033], [172.768155924356165, -43.575208029064903], [172.767908229694115, -43.575207526501906], [172.76790753806975, -43.575387608652221], [172.767535994981529, -43.575386853796843], [172.767535302243573, -43.575566935936742], [172.767287606121329, -43.57556643202588], [172.767177929298725, -43.576028002348124], [172.767037827324458, -43.576106173944929], [172.767037480205317, -43.576196215001026], [172.766913630858113, -43.576195962570523], [172.766656910495129, -43.576464662857553], [172.766169141148964, -43.576554609358091], [172.766097938163369, -43.576959629988146], [172.766120161716515, -43.577092539257244], [172.76586338009335, -43.577324328581874], [172.765546746661698, -43.577363710456368], [172.765422894934829, -43.5773634564056], [172.765422545394102, -43.577453497431442], [172.765298693484283, -43.577453243245706], [172.765298343757365, -43.577543284269346], [172.764926787484058, -43.577542520904757], [172.764926086918081, -43.577722602942963], [172.764554529552072, -43.577721838366081], [172.764441879302353, -43.578361857064678], [172.764304014938631, -43.578441656041235], [172.764303312494633, -43.578621738042941], [172.76417945820026, -43.578621482639321], [172.764178755380641, -43.578801564633743], [172.764054900718776, -43.578801309094359], [172.764054197523535, -43.57898139108147], [172.763930342494206, -43.578981135406309], [172.763872305193189, -43.579041886455258], [172.763501050168685, -43.579216541948725], [172.76318650656674, -43.5791596805079], [172.763129101819032, -43.57936340882263], [172.762814586961554, -43.579248951237993], [172.76275718087453, -43.579452679359697], [172.762442666262075, -43.579338220754245], [172.762441958248587, -43.579518302703406], [172.762318102133094, -43.579518045279151], [172.762120125167684, -43.579734494471502], [172.761998687907891, -43.579968402386825], [172.761820548070773, -43.580057260029449], [172.76182019312887, -43.580147300989303], [172.761696335729624, -43.58014704288852], [172.76169598060153, -43.580237083846143], [172.761572123019363, -43.58023682561037], [172.761571412389031, -43.580416907519734], [172.76119983854494, -43.58041613200249], [172.76119948267359, -43.580506172952603], [172.761075624544304, -43.580505914177692], [172.761075268486707, -43.58059595512556], [172.760951410174499, -43.58059569621566], [172.760951053930683, -43.580685737161303], [172.760827195435525, -43.580685478116401], [172.760735809684832, -43.58093437462427], [172.760273846880096, -43.581189308961619], [172.760039686639374, -43.581155161944956], [172.759612085594398, -43.581391128201794], [172.758963960395164, -43.581482817167903], [172.757772638411979, -43.581306569281836], [172.757298860749984, -43.5811638632049], [172.757109379017209, -43.581190653391552], [172.756897555632492, -43.581159756478087], [172.756516136358783, -43.581357274206212], [172.756585490043477, -43.581616379946901], [172.756415854515723, -43.581704213567342], [172.756231079418711, -43.581890453611045], [172.755795459999575, -43.581973015087719], [172.755399720715673, -43.582191381835536], [172.754701123811174, -43.582055789617655], [172.754930623812754, -43.581430914481601], [172.75509992985036, -43.581238311659263], [172.754804635241925, -43.58108349135469], [172.754832102301322, -43.580984034391427], [172.754582466618928, -43.580696314436906], [172.754792880434053, -43.580179927512845], [172.754884181327725, -43.580132640708698], [172.754884546605581, -43.580042599794666], [172.75500840372851, -43.5800428652745], [172.755163126347639, -43.579392372592707], [172.755506747016597, -43.579323598455304], [172.755507111356422, -43.57923355752429], [172.755630966826715, -43.579233822325776], [172.755631330980293, -43.579143781392503], [172.75575518626772, -43.579144046058993], [172.755811697819468, -43.57882326170369], [172.756200821194255, -43.577844711911588], [172.756752553205871, -43.577525421384209], [172.756823820725941, -43.577120406766241], [172.756791681447027, -43.576927988521867], [172.757003153853987, -43.576805620342789], [172.757004602156371, -43.576445456410845], [172.757128451925809, -43.576445719576725], [172.757185842539883, -43.575843598967104], [172.757557775229202, -43.575495389094634], [172.757751671312207, -43.575456582408989], [172.757752393202139, -43.57527650039323], [172.757876240582732, -43.575276762743478], [172.75779898766811, -43.575129358298646], [172.758247743621183, -43.57436134766786], [172.758444521580032, -43.574247474450317], [172.758555069177277, -43.574147685940396], [172.758734420151455, -43.574043888008688], [172.758388645917677, -43.57362728625835], [172.758048596899812, -43.573428127599726], [172.757815749895116, -43.572983844639651], [172.757615886528271, -43.571787112869259], [172.757832784744977, -43.571241562423779], [172.758016672613223, -43.571135136947319], [172.758017393604746, -43.570955054791391], [172.758141232132459, -43.570955316834002], [172.75825744743986, -43.570295373095405], [172.75851598546339, -43.570145732355243], [172.758516345203731, -43.570055691259014], [172.75859906062081, -43.569935575419244], [172.758641260550831, -43.569785829457253], [172.758477033040776, -43.569724985315489], [172.758394308114816, -43.569605224128615], [172.758270472350972, -43.569604962366547], [172.758270832450251, -43.569514921263405], [172.758146996872512, -43.569514659368032], [172.758084617528851, -43.56962984941147], [172.758023161296478, -43.569514397338523], [172.757775490149413, -43.569513872877117], [172.757775850984871, -43.569423831775836], [172.757652015598296, -43.569423569344757], [172.757652376616591, -43.569333528242865], [172.757528541416178, -43.56933326567848], [172.757528902617224, -43.569243224575978], [172.757346221066825, -43.569295002753712], [172.756909727562572, -43.569241909746211], [172.756909003314064, -43.569421991941567], [172.756537497194586, -43.569421201429222], [172.75643160342068, -43.569545355211524], [172.756203614860851, -43.569473270685712], [172.756018504238625, -43.569036648163937], [172.756167807232913, -43.56897020423537], [172.756168170456448, -43.568880163136221], [172.755995752949332, -43.568789753414258], [172.756168896898373, -43.56870008093366], [172.756169260116849, -43.56861003983024], [172.756045426412271, -43.568609775662907], [172.756046153213049, -43.568429693453432], [172.756046516610922, -43.568339652346552], [172.755897102639693, -43.568284288128744], [172.756131289905767, -43.567950120213673], [172.756295998034489, -43.567889974978115], [172.756296361053359, -43.567799933861032], [172.756123946427664, -43.567709524322069], [172.75629708708604, -43.567619851622595], [172.756298539131194, -43.567259687128583], [172.756301080145533, -43.56662939920917], [172.756301443140842, -43.56653935807212], [172.756177613677011, -43.566539094057902], [172.756177976855099, -43.566449052920248], [172.75601376089088, -43.56638820523181], [172.755931045390213, -43.566268442214842], [172.755373625315826, -43.566317877855873], [172.755187934972781, -43.566300684873958], [172.754910321424944, -43.566325173065721], [172.754817315703633, -43.566085975392795], [172.754693487182237, -43.566085709773333], [172.754693852565168, -43.565995668638486], [172.754570024229878, -43.56599540288574], [172.754574045359135, -43.56500495031748], [172.754450219054291, -43.565004684439756], [172.754450584785758, -43.564914643289455], [172.754326758667048, -43.564914377278456], [172.754327124581266, -43.564824336127565], [172.754079472717763, -43.564823803704911], [172.754079838999132, -43.564733762554262], [172.753956013254367, -43.564733496142608], [172.753213058821387, -43.564731894856386], [172.753212691249047, -43.564821936001195], [172.752717387590053, -43.564820865791553], [172.752593561679589, -43.564820597903868], [172.751974432152764, -43.564819256453838], [172.751974801569361, -43.564729215317413], [172.751850975853557, -43.56472894662592], [172.751479498716407, -43.564728139746805], [172.751479868869012, -43.564638098612292], [172.751205841468675, -43.564597252081427], [172.751109133707104, -43.564457208260507], [172.750737658260647, -43.564456398975047], [172.750738029514622, -43.564366357841322], [172.750614204553671, -43.564366087812132], [172.75061457599034, -43.564276046677826], [172.750490751215523, -43.564275776515373], [172.750491122834916, -43.564185735380484], [172.750367298246232, -43.564185465084769], [172.750367670048291, -43.564095423949304], [172.75024384564577, -43.564095153520334], [172.750244217630524, -43.564005112384294], [172.749996569199453, -43.564004571125722], [172.749996941551331, -43.563914529989944], [172.74987311752281, -43.563914259160349], [172.749873490057382, -43.563824218023967], [172.749625842374314, -43.563823675964173], [172.749502018535395, -43.563823404733114], [172.749211031355827, -43.564242727860311], [172.749128678806301, -43.564272795877443], [172.749128305156574, -43.564362837001589], [172.749127557851949, -43.564542919245596], [172.749003732544566, -43.564542647471328], [172.749002984864148, -43.564722729707938], [172.74887915918967, -43.564722457797863], [172.748878785162418, -43.564812498913177], [172.748754959305245, -43.564812226868149], [172.748698777843117, -43.565011488651507], [172.748506183844171, -43.565081805705496], [172.748505809256727, -43.565171846812547], [172.748381982667013, -43.565171574361777], [172.748381607893435, -43.565261615466554], [172.748257781121055, -43.565261342880831], [172.748257406161287, -43.565351383983334], [172.748133579206183, -43.565351111262657], [172.748132828912588, -43.565531193461666], [172.74800900159039, -43.565530920605163], [172.748007875583625, -43.565801043890424], [172.747884047709874, -43.565800770897255], [172.747883672186362, -43.565890811988652], [172.747883296661144, -43.565980853078607], [172.747882545605449, -43.566160935254238], [172.747882170074973, -43.566250976339923], [172.747758341280786, -43.566250703208361], [172.747757965564148, -43.566340744291765], [172.747634136587237, -43.566340471025235], [172.747633384779903, -43.566520553186052], [172.747509555435812, -43.56652027978371], [172.74742220829566, -43.566887376787435], [172.747012353917057, -43.566969390188845], [172.747011600240882, -43.567149472321127], [172.746887769614403, -43.567149198242205], [172.74680546489418, -43.567379484537462], [172.74552449567139, -43.567416297679017], [172.745400664512601, -43.56741602198808], [172.745299990507647, -43.567559631573843], [172.744904579930051, -43.567594999971938], [172.744803209533814, -43.567870944824797], [172.743989521813461, -43.567985964935815], [172.743913164904967, -43.567772867379681], [172.743639128501997, -43.567732002712674], [172.743542433319163, -43.567591952599415], [172.743418601819684, -43.567591674760827], [172.743418984016472, -43.567501633727531], [172.743295152703212, -43.567501355755688], [172.743295535082666, -43.567411314721852], [172.743171703955653, -43.567411036616754], [172.743172086517802, -43.567320995582364], [172.742925005837265, -43.56741118539928], [172.742715736690826, -43.567709681647131], [172.742551014391722, -43.56776980818541], [172.742474685567629, -43.568505908745422], [172.741928395334497, -43.568578781393313], [172.741804561829071, -43.568578501801539], [172.741679085549833, -43.568757466520694], [172.741432676154091, -43.568667703223682], [172.741226683030789, -43.56888319718901], [172.74093618370128, -43.5689367048899], [172.740723005333791, -43.569159721761061], [172.740315852058643, -43.569205423168768], [172.740192017285182, -43.569205141827211], [172.739950509123702, -43.56944853686921], [172.739707282572368, -43.569413008416063], [172.738741116986517, -43.569869719199168], [172.738028673906797, -43.56953843400661], [172.737858878061417, -43.569365039287121], [172.737642958321231, -43.569251771980881], [172.73754275346829, -43.568516346540164], [172.737295647714745, -43.568386717490839], [172.737400047376724, -43.568155851346432], [172.737596178121549, -43.568118710980997], [172.737596568998384, -43.568028669997553], [172.737520257883887, -43.567799653380902], [172.737671544675919, -43.567631896907997], [172.737773945984685, -43.567345519481599], [172.737925178511176, -43.567270113103071], [172.737889753344007, -43.567153434843696], [172.738023559011282, -43.566895882241752], [172.73822079994963, -43.566859556417711], [172.738221189878914, -43.566769515409874], [172.738345019643305, -43.566769798873558], [172.738345799127529, -43.566589716851809], [172.738469628524854, -43.566590000179602], [172.738471576281711, -43.566139795095886], [172.738595404758627, -43.566140078285137], [172.738646484562111, -43.565852791178919], [172.738844617677614, -43.565780480158018], [172.738846173608579, -43.565420316031933], [172.73897000061541, -43.565420598811777], [172.738970778201207, -43.565240516738399], [172.739094604841, -43.565240799382359], [172.739094993446798, -43.565150758342654], [172.739218819903925, -43.565151040851624], [172.739219208323505, -43.565060999809603], [172.739219985157177, -43.564880917721283], [172.739343811062867, -43.564881200093488], [172.739446199738637, -43.56459482009889], [172.739593014312305, -43.564521600231252], [172.739509725560112, -43.564385248176613], [172.739642011203671, -43.564105839610576], [172.73971877781409, -43.564071676905691], [172.739720328444491, -43.563711512646471], [172.739844151959886, -43.563711794470798], [172.739774664328792, -43.563579101783482], [172.739846476745157, -43.563171548033907], [172.739846864203088, -43.563081506956095], [172.739723041978579, -43.563081225137935], [172.739723429619147, -43.562991184059591], [172.739599607580828, -43.562990902108211], [172.739600383225365, -43.562810819948986], [172.739144850681782, -43.563016135186658], [172.738212881486135, -43.56331598413562], [172.737923713541704, -43.563298438783377], [172.737559380708944, -43.563394767327196], [172.737178329951718, -43.563477251046081], [172.736653135562648, -43.563688749529092], [172.735444422289959, -43.562956983843719], [172.735466829529912, -43.562761958879712], [172.735077382279144, -43.562397965601811], [172.735124493601859, -43.561987983995891], [172.734956986815433, -43.561768008630978], [172.734844785557129, -43.561220813653421], [172.734657580680306, -43.560974961789661], [172.734265264891746, -43.560727578670274], [172.734542073817011, -43.560555260039756], [172.734469665016093, -43.559872654547405], [172.734485175416097, -43.559737627554014], [172.734454581999955, -43.55944911861809], [172.73414263443604, -43.558174725803219], [172.734044896131735, -43.558046365068812], [172.734042298844486, -43.557486671201268], [172.734040923846038, -43.557190406251948], [172.734036421143657, -43.556220004408523], [172.734035816203175, -43.556089558158014], [172.734034542241375, -43.555815086254022], [172.734033601518462, -43.555612354335544], [172.734032105541701, -43.555290119970934], [172.734027708535933, -43.554342726506803], [172.734020059455958, -43.552694352846729], [172.734019823995396, -43.552643736020357], [172.734013751936772, -43.551334942383534], [172.73446691069762, -43.551335273586979], [172.735005617050149, -43.551335665340503], [172.735261435291335, -43.551335850085827], [172.73562299397372, -43.551336110437617], [172.735850307503597, -43.551336273870426], [172.736079224234572, -43.551336437850793], [172.737137885238525, -43.551337190229134], [172.738276334786605, -43.551337987619959], [172.741069942849464, -43.551339896770124], [172.74259760328377, -43.551340912428159], [172.743550336066676, -43.551341535278453], [172.744651411138506, -43.551342245680281], [172.746819183742701, -43.551343612576083], [172.74974032494444, -43.55134538961714], [172.749957873403815, -43.551345518933488], [172.750149422814843, -43.551345632442697], [172.750629843839931, -43.551345915935862], [172.750884166838006, -43.551346065164985], [172.751039294560911, -43.551346155446474], [172.751163093678315, -43.551346227760959], [172.751274005307636, -43.551346292615627], [172.751635575494845, -43.551346502354555], [172.75217354830022, -43.551346812523001], [172.752457412268257, -43.551346975459495], [172.755421141351974, -43.551348632024535], [172.757569228795973, -43.551349784497461], [172.759353850781281, -43.551350711143094], [172.761224145693973, -43.551351652922392], [172.7631035932759, -43.55135256776385], [172.76503164957154, -43.551353474180921], [172.767308800077103, -43.55135450353621], [172.769820663080139, -43.55135558573518], [172.772768564735429, -43.55135678596217], [172.775727597615486, -43.551357914007937], [172.781556178771666, -43.551359911682979], [172.788591963604944, -43.551361927479547], [172.795372965205217, -43.551363460682751], [172.801096311817162, -43.551364441298283], [172.804904518261424, -43.551364935022775], [172.811282794432003, -43.551365478707289], [172.814300743107879, -43.551365612025485], [172.814295565377051, -43.553051918507471]], [[172.748368913369035, -43.558128529896081], [172.748260006317821, -43.55820725251931], [172.748410835023236, -43.558238405010933], [172.748368913369035, -43.558128529896081]], [[172.747667960712533, -43.558236767884161], [172.74762604041058, -43.558126892500198], [172.747517132398457, -43.558205614413453], [172.747667960712533, -43.558236767884161]], [[172.759858983877251, -43.566231739051709], [172.760017400210501, -43.566277092641386], [172.760017757665906, -43.566187051474067], [172.759858983877251, -43.566231739051709]]]]
      }
    }
  ]
  
  const INUNDATION_OPTIONS = {
    style: {
      'color': '#0af',
      'opacity': 0.65
    }
  }
  
  const DRIVE_EVAC_OPTIONS = {
  
    style: {
      'color': '#0a0',
      'opacity': 0.65
    }
  }
  
  const WALK_EVAC_OPTIONS = {
  
    style: {
      'color': '#f80',
      'opacity': 0.65
    }
  }
  
  let _map
  let _inundation
  let _driveEvac
  let _walkEvac
  let _openstreetMap
  let _marker
  
  function mapInstance () {
    if (!_map) {
      _map = L.map('survive_map')
      log('map initialized')
    }
    return _map
  }
  
  function inundationLayer () {
    if (!_inundation) {
      _inundation = new L.GeoJSON(INUNDATION_DATA, INUNDATION_OPTIONS)
      log('minundationLayer initialized')
    }
    return _inundation
  }
  
  function baseMapLayer () {
    return openstreetLayer()
  }
  
  function openstreetLayer () {
    if (!_openstreetMap) {
      _openstreetMap = new L.tileLayer(OPENSTREET_TEMPLATE.URL, OPENSTREET_TEMPLATE.OPTIONS)
      log('openstreet layer initialized')
    }
    return _openstreetMap
  }
  
  function initializeMap () {
    mapInstance().scrollWheelZoom.disable()
    mapInstance().setView(DEFAULT_LOCATION, DEFAULT_ZOOM)
    log('map initialized with default view and options')
  
    baseMapLayer().addTo(mapInstance())
    log('loaded tile at [' + DEFAULT_LOCATION.lat + ', ' + DEFAULT_LOCATION.lng + ']')
  
    inundationToggle()
  }
  
  function inundationToggle () {
    $('#inundationToggle').is(':checked') ? loadInundationMap() : hideInundationMap()
  }
  
  function loadInundationMap () {
    inundationLayer().addTo(mapInstance())
    log('added inundation layer')
  }
  
  function hideInundationMap () {
    inundationLayer().remove()
    log('hidden inundation layer')
  }
  
  function driveToggle () {
    $('#driveToggle').is(':checked') ? loadDriveEvac() : hideDriveEvac()
  }
  
  function loadDriveEvac () {
    _driveEvac.addTo(mapInstance())
    log('added drive layer')
  }
  
  function hideDriveEvac () {
    _driveEvac.remove()
    log('hidden drive layer')
  }
  
  function walkToggle () {
    $('#walkToggle').is(':checked') ? loadWalkEvac() : hideWalkEvac()
  }
  
  function loadWalkEvac () {
    _walkEvac.addTo(mapInstance())
    log('added walk layer')
  }
  
  function hideWalkEvac () {
    _walkEvac.remove()
    log('hidden walk layer')
  }
  
  function locateCurrentPossition () {
    mapInstance().locate({setView: true, maxZoom: DEFAULT_ZOOM})
  
    L.tileLayer(GOOGLESTREET_TEMPLATE.URL, GOOGLESTREET_TEMPLATE.OPTIONS).addTo(mapInstance())
  
    mapInstance().locate({
      setView: true,
      maxZoom: 16,
      watch: true,
      timeout: 60000
    })
  
    function onLocationFound (e) {
      let radius = e.accuracy / 2
      L.marker(e.latlng).addTo(mapInstance())
        .bindPopup('You are within ' + radius + ' meters from this point').openPopup()
      L.circle(e.latlng, radius).addTo(mapInstance())
  
      //TODO: getEvacFromCurrentPosition
    }
  
    mapInstance().on('locationfound', onLocationFound)
  
  }
  
  function log (msg) {
    if (DEBUG) console.log(msg)
  }
  
  function alert (msg) {
    $.notify({
      message: msg
    },{
      type: 'danger'
    });
  }
  
  // use places.js to search
  function initializeAddressLocator() {
    initializeAddressLocatorUseLocalData();
  }
  
  function initializeAddressLocatorUseLocalData() {
    $('#address-locator').select2({
      placeholder: 'Search for address',
      ajax: {
        url: '/addresses',
        dataType: 'json',
        processResults: function (data) {
          return {
            results: data.map(item => ({
              id: item.id,
              text: item.address
            }))
          };
        }
      }
    });
  }
  
  function initializeAddressLocatorUsePlaceJS () {
    var placesAutocomplete = places({
      container: document.querySelector('#address-locator')
    })
  
    let map = mapInstance()
  
    placesAutocomplete.on('suggestions', handleOnSuggestions)
    // placesAutocomplete.on('cursorchanged', handleOnCursorchanged)
    placesAutocomplete.on('change', handleOnChange)
  
    // placesAutocomplete.on('clear', handleOnClear)
  
    function handleOnSuggestions (e) {
      e.suggestions.forEach(suggestion => {
        log('found \'' + suggestion.value + '\' at [' + suggestion.latlng.lat + ', ' + suggestion.latlng.lng + ']')
      })
    }
  
    function handleOnChange (e) {
      let suggestion = e.suggestion
      let latlng = suggestion.latlng
      let lat = suggestion.latlng.lat
      let lng = suggestion.latlng.lng
      log('pick \'' + suggestion.value + '\' at [' + lat + ', ' + lng + ']')
  
      let foundOne = false
      let responses = 0
      $.post(`/drive/${lat}/${lng}`, (result, status) => {
        responses++
        if (status != 'success' && responses == 2) {
          alert('Sorry! We have no route to show you')
        } else {
          if (!!result.failed && responses == 2) {
            alert('Sorry! We have no route to show you')
            return
          }
  
          log('found drive!')
          log(result)
          if (!foundOne) {
            if (!!_marker) dropout(_marker)
            moveMarker(latlng)
            relocateMap(latlng)
            foundOne = true
          }
          let isDrive = true
          drawEvac([lng, lat], result.points, isDrive)
        }
      })
  
      $.post(`/walk/${lat}/${lng}`, (result, status) => {
        responses++
        if (status != 'success' && responses == 2) {
          alert('Sorry! We have no route to show you')
        } else {
          if (!!result.failed && responses == 2) {
            alert('Sorry! We have no route to show you')
            return
          }
  
          log('found walk!')
          log(result)
          if (!foundOne) {
            if (!!_marker) dropout(_marker)
            moveMarker(latlng)
            relocateMap(latlng)
            foundOne = true
          }
          let isDrive = false
          drawEvac([lng, lat], result.points, isDrive)
        }
      })
    }
  
    function moveMarker (latlng) {
      _marker = L.marker(latlng, {opacity: 1})
      _marker.addTo(map)
      log('moved marker to new location at [' + latlng.lat + ', ' + latlng.lng)
    }
  
    function dropout (marker) {
      map.removeLayer(marker)
      log('removed marker at [' + marker._latlng.lat + ', ' + marker._latlng.lng)
  
    }
  
    function relocateMap (latlng) {
      map.setView(latlng, DEFAULT_ZOOM)
      log('relocated map to new location at [' + latlng.lat + ', ' + latlng.lng)
  
    }
  }
  
  function drawEvac (startPoint, points, isDrive) {
    let evacs = []
    evacs.push(startPoint)
    points.forEach(point => {
      evacs.push([point.coordinates[0], point.coordinates[1]])
    })
    let geo = {
      type: 'LineString',
      coordinates: evacs
    }
  
    if (isDrive) {
      if (!!_driveEvac) map.removeLayer(_driveEvac)
      _driveEvac = new L.GeoJSON(geo, DRIVE_EVAC_OPTIONS)
      _driveEvac.addTo(mapInstance())
    } else {
      if (!!_walkEvac) map.removeLayer(_walkEvac)
      _walkEvac = new L.GeoJSON(geo, WALK_EVAC_OPTIONS)
      _walkEvac.addTo(mapInstance())
    }
  
  }