var plan_key = ''; var meet_loc_url = '/portland/meet-location'; // handy images var img_zipmarker, img_youarehere, img_nomatch, img_expanded, img_unknown; img_youarehere = "/images/zipmarker-youarehere.png"; img_nomatch = "/images/zipmarker-reserved.png"; img_expanded = "/images/zipmarker-viewing.png"; img_zipmarker = "/images/zipmarker.png"; img_unknown = "/images/zipmarker-unknown.png"; img_shadow = "/images/zipshadow.png"; // create a data structure for all the locations var locs = [ [68891555,'1300+Mill+SE',44.933500812786704,-123.02705079317093],[68894718,'20th%2fW+Burnside',45.523243525681636,-122.69222259521484],[140807588,'2121+Belmont',45.516480786039196,-122.64358073472977],[68890339,'21st%2fW+Burnside',45.523338425651,-122.69425570964813],[68893476,'23rd%2fW+Burnside',45.523661648107904,-122.69828036427498],[68890798,'28th%2fE+Burnside',45.52293345535878,-122.63830214738846],[68892774,'31st%2fE+Burnside',45.52293533457801,-122.63292163610458],[68893564,'699+Columbia+St%2fVancouvercenter',45.6263784622272,-122.67375558614731],[132475710,'735+St%2e+Clair+Apts',45.52273049931301,-122.69762456417084],[68892413,'900+NE+81st+Av%2fMilepost+5',45.529223790120824,-122.5798299908638],[132778635,'Adidas+Village',45.56038415755522,-122.6938185095787],[68893949,'Beaverton+Creek+MAX',45.499715610524355,-122.83512532711029],[68893987,'Church%2fFerry%2fPringle+Pkwy+SE',44.938217258579655,-123.03583234548569],[68891481,'Congress+Ctr+Garage',45.516895199882576,-122.680184841156],[68891774,'Crown+Plaza+Garage',45.51250940021547,-122.67724111676216],[171276754,'CYAN%2fPDX+%28SW+4th%2fMill%29',45.51154799326967,-122.68010437488556],[68893886,'Heritage+Bldg%2fHankins+Hardware',45.55167346732777,-122.66102716326713],[68891889,'Holladay+Park+Plaza',45.53277218692938,-122.64925628900528],[68892318,'King%2fW+Burnside',45.52314486712791,-122.69535139203072],[68891398,'Ladd+Tower+%28Brdwy%2fJefferson%29',45.51523470698275,-122.68199533224106],[68893054,'Liberty+Centre+Garage',45.52922754813895,-122.6590584218502],[68890852,'Lloyd+Center+Tower',45.53181864187268,-122.65769854187965],[68894335,'N+Alberta+St%2fAlbina+Av',45.55909585680833,-122.6747439801693],[68891125,'N+Interstate%2fBuffalo',45.57550445897483,-122.68196180462837],[68892584,'N+Interstate%2fKillingsworth',45.56246209060747,-122.68207043409347],[68890786,'N+Interstate%2fPrescott',45.55529369499202,-122.68197253346443],[68891651,'N+Interstate%2fRosa+Parks+Way+%28Portland+Blvd%29',45.56964553180089,-122.68198996782303],[68894264,'N+Kellogg%2fBurlington',45.59070046089777,-122.75437876582145],[68893454,'N+Killingsworth+St%2fAlbina+Av',45.56261889490858,-122.67478823661804],[68891885,'N+Killingsworth%2fHaight',45.56265551381406,-122.67020031809807],[68890895,'N+Lombard%2fBurrage',45.57726830724214,-122.69480288028717],[68890441,'N+Lombard%2fChautauqua',45.57733589372661,-122.70789742469788],[68891326,'N+Mississippi+btwn+Mason%2fSkidmore',45.55415271455336,-122.67543733119965],[89040776,'N+Mississippi%2fBeech',45.54953784624468,-122.6757162809372],[68890560,'N+Mississippi%2fFailing',45.55080288752794,-122.67569214105606],[89042307,'N+Vancouver%2fStanton',45.54369687442603,-122.66794994473457],[217037599,'Naito+Pkwy%2fBurnside+Bridge+%28Mercy+Corps%29',45.52287050147848,-122.67051413655281],[68890828,'NE+14th%2fFremont',45.548281229165134,-122.65159517526626],[68893754,'NE+15th%2fAlberta',45.55898317603794,-122.64977261424064],[154136099,'NE+15th%2fKnott',45.54196672574762,-122.65049681067467],[68893560,'NE+15th%2fTillamook',45.537106620474205,-122.6505209505558],[154214761,'NE+16th%2fPrescott',45.555423286366945,-122.6491691172123],[93004179,'NE+17th%2fHancock%2fLot',45.536479,-122.648426],[68891571,'NE+17th%2fWeidler',45.53435606939071,-122.64825582504272],[68891222,'NE+21st%2fWeidler',45.53446879953804,-122.64472872018814],[68891212,'NE+23rd%2fSandy',45.527054,-122.642571],[94518895,'NE+24th%2fKnott',45.54209634785198,-122.64130890369415],[70889176,'NE+24th%2fWeidler',45.534173821841236,-122.64121770858764],[68893719,'NE+27th%2fAlberta',45.55879819128321,-122.63793870806694],[69118393,'NE+27th%2fHolman',45.568201593994566,-122.63799771666527],[72583736,'NE+27th%2fPrescott',45.55550592418914,-122.63786628842354],[68892269,'NE+28th%2fGlisan',45.52640614535965,-122.63736337423324],[68891385,'NE+32nd%2fGlisan',45.52639862894611,-122.63144239783287],[68893700,'NE+33rd%2fEmerson',45.56175881323905,-122.63071820139885],[69118397,'NE+33rd%2fSkidmore',45.55375735707954,-122.63044595718384],[68893770,'NE+39th%2fFremont',45.54843807304054,-122.6227855682373],[68893244,'NE+41st%2fHalsey',45.533937087029145,-122.62123256921768],[154218216,'NE+42nd%2fAlberta+Ct',45.55845075634147,-122.62034878134727],[68892816,'NE+43rd%2fBroadway',45.53501365873116,-122.61850476264953],[69118366,'NE+60th%2fEverett',45.52537544778167,-122.60234579443931],[161600489,'NE+68th%2fGlisan+%28Lot%29',45.52631688788421,-122.59362995624542],[68892033,'NE+7th%2fClackamas',45.53314608491342,-122.65836641192436],[68891279,'NE+7th%2fHolladay',45.53040285599187,-122.65830740332603],[68894033,'NE+9th%2fBroadway',45.53499017352997,-122.65641376376152],[68891701,'NE+9th%2fOregon+%28Lot%29',45.52876061246313,-122.65726536512375],[68892242,'NE+Grand+Av%2fAlberta+St',45.559167221179386,-122.6606597006321],[68894495,'NE+MLK+Blvd%2fRussell+St',45.541299824689446,-122.66133427619934],[194789442,'NE+MLK+Blvd%2fShaver+%28Shaver+Green%29',45.55206,-122.661827],[68894550,'New+Columbia',45.58906936388041,-122.71540358662605],[68894057,'NW+10th%2fCouch',45.52365131253482,-122.68130466341972],[68890899,'NW+10th%2fEverett',45.52508418068639,-122.68097475171089],[68892785,'NW+10th%2fGlisan',45.52643151324789,-122.68128454685211],[68893894,'NW+10th%2fJohnson',45.528650689416445,-122.68117725849151],[68894075,'NW+10th%2fMarshall',45.53086883855745,-122.68115043640137],[73870986,'NW+10th%2fOverton',45.532204759109476,-122.68125772476196],[68892130,'NW+11th%2fDavis',45.524100438413455,-122.68210530281067],[68891686,'NW+11th%2fEverett',45.524970492152924,-122.68224611878395],[68892833,'NW+11th%2fGlisan',45.52667109829469,-122.6822005212307],[68893839,'NW+11th%2fJohnson',45.52871833439368,-122.68215626478195],[68890495,'NW+11th%2fMarshall',45.53089890181621,-122.6822018623352],[68893434,'NW+12th%2fEverett',45.524965794274685,-122.68326669931412],[68894247,'NW+12th%2fNorthrup',45.53155183425282,-122.6831915974617],[226548928,'NW+13th%2fLovejoy',45.53007497481627,-122.68461987376213],[68894640,'NW+14th%2fGlisan',45.526607209048656,-122.6852434873581],[68890252,'NW+18th%2fGlisan',45.52635071178629,-122.68969193100929],[68894370,'NW+19th%2fEverett',45.52506726835711,-122.69026324152946],[188395524,'NW+19th%2fHoyt',45.526978329390836,-122.69032761454582],[68890177,'NW+1st%2fDavis',45.52462660642996,-122.67118334770203],[68892365,'NW+21st%2fFlanders',45.52554832818306,-122.69455477595329],[68892104,'NW+21st%2fIrving',45.52768767918168,-122.69476264715194],[68892956,'NW+21st%2fLovejoy',45.5299049268063,-122.69483372569084],[68892967,'NW+21st%2fNorthrup',45.53125402284423,-122.69440591335296],[68891260,'NW+22nd%2fFlanders',45.525572,-122.696738],[68893513,'NW+22nd%2fLovejoy',45.52971420936582,-122.69652083516121],[68892866,'NW+22nd%2fNorthrup',45.531307572645964,-122.69621506333351],[68892254,'NW+23rd%2fEverett',45.52476942261386,-122.698283046484],[68892789,'NW+23rd%2fGlisan',45.526192866735855,-122.69830718636513],[68890404,'NW+23rd%2fMarshall',45.53078428555607,-122.69870951771736],[68893175,'NW+23rd%2fOverton',45.53197177384338,-122.69887447357178],[68891026,'NW+25th%2fThurman',45.53564869485287,-122.70279720425606],[68890266,'NW+3rd%2fFlanders',45.525825499457,-122.67342031002045],[68893280,'NW+4th%2fDavis',45.52456553360909,-122.67461255192757],[68893650,'NW+4th%2fEverett+',45.52519598984648,-122.67476007342339],[68894289,'NW+4th%2fFlanders',45.52581704340444,-122.67441004514694],[68893968,'ODS+Tower',45.51849832310836,-122.67472922801971],[68890300,'OHSU%2fBaird+Hall',45.49940447055129,-122.68737182021141],[78344340,'OHSU%2fCanyon+Lot',45.49799444912279,-122.68896505236626],[118866255,'Pacwest+Center',45.51506743333465,-122.68035516142845],[68893046,'Portland+Art+Museum',45.516591672582074,-122.68386214971542],[68891507,'PSU%2fCarpool+Lot',45.511107225455035,-122.68152594566345],[68893305,'PSU%2fParking+1',45.51112884101471,-122.68424302339554],[68891190,'PSU%2fScience+One',45.51370761168898,-122.6865604519844],[68890381,'PSU%2fUniv+Ctr+Garage',45.51071156526564,-122.68228501081467],[188355965,'Reed+College%2fEast+Parking',45.479809529663854,-122.62613967061043],[118858404,'Reed+College%2fNorth+Parking',45.4830037387405,-122.63025552034378],[68893485,'SE+12th%2fDivision%2fElliott',45.50516545122004,-122.6534378528595],[68891496,'SE+12th%2fStark',45.51930362627499,-122.65346735715866],[68891437,'SE+14th%2fBelmont',45.51643380015004,-122.65195056796074],[154176867,'SE+15th%2fTacoma',45.46437284571066,-122.65078648924828],[68890200,'SE+16th%2fHawthorne',45.51232238294666,-122.6496733725071],[68893292,'SE+18th%2fStark',45.51947746500262,-122.64759734272957],[68891233,'SE+20th%2fBelmont',45.516416885220345,-122.6458927989006],[68894665,'SE+20th%2fDivision',45.50463252180637,-122.64566347002983],[197176858,'SE+20th%2fHawthorne+%28The+20+Apts%29',45.51188725996149,-122.64507472515106],[68891129,'SE+20th%2fHawthorne%2fElliott',45.5118703436652,-122.64556288719177],[68894589,'SE+24th%2fPowell',45.49878124543415,-122.64160796999931],[68893214,'SE+27th%2fHawthorne',45.51213348547646,-122.63758063316345],[68890464,'SE+28th+Pl%2fDivision',45.5047565904802,-122.63643935322762],[68893136,'SE+28th%2fBelmont',45.516383995064686,-122.6372641324997],[94517785,'SE+28th%2fHolgate',45.48979588511892,-122.63765305280685],[68891912,'SE+29th%2fStark',45.519182408682234,-122.63614565134048],[68893218,'SE+30th%2fHawthorne',45.51221712672307,-122.6348327100277],[68892537,'SE+32nd%2fBelmont',45.516403729160395,-122.63188496232033],[68890515,'SE+33rd%2fPowell',45.49663985528378,-122.63142630457878],[68894559,'SE+33rd%2fWoodward',45.5018258649645,-122.63101994991302],[68892781,'SE+34th%2fDivision',45.50489569745601,-122.62962520122528],[68890286,'SE+34th%2fHawthorne',45.511926731299745,-122.62953132390976],[68894795,'SE+34th%2fYamhill',45.515682960318685,-122.62936636805534],[68894705,'SE+38th%2fDivision',45.50482238436296,-122.62376457452774],[68890499,'SE+42nd%2fDivision',45.50525286244119,-122.61908680200577],[68891454,'SE+43rd%2fBelmont+%28Lot%29',45.51646105197054,-122.61766523122787],[154011910,'SE+43rd%2fHolgate',45.49033365573889,-122.61766120791435],[69118437,'SE+46th%2fWoodstock',45.47923780637145,-122.61562407016754],[69261648,'SE+49th%2fPowell',45.497705,-122.61256],[68890170,'SE+50th%2fBelmont',45.51650991727078,-122.61139556765556],[68891846,'SE+50th%2fClay',45.511399504711285,-122.6114572584629],[68890832,'SE+52nd%2fDivision',45.505422984966316,-122.60905802249908],[69261631,'SE+60th%2fBelmont',45.51672135317704,-122.60212853550911],[154129986,'SE+63rd%2fHolgate%2fFoster',45.48996887482957,-122.59732335805893],[154060321,'SE+71st%2fDivision',45.505224665287905,-122.58970320224762],[68892357,'SE+7th%2fHawthorne',45.51236655291041,-122.6586078107357],[68894690,'SE+Belmont%2fPeacock+Ln',45.51652025415578,-122.62191250920296],[68892737,'SE+Milwaukie+Av%2fCenter+St%2fLaBarre',45.4935977756241,-122.6524668931961],[68892653,'SE+Milwaukie+Av%2fTolman',45.477020443066756,-122.64920800924301],[68894694,'St%2e+Philip+Neri+',45.50496901045359,-122.64876946806908],[68893547,'SW+10th%2fAlder',45.5207394240966,-122.68157958984375],[68891186,'SW+10th%2fClay',45.5146050788668,-122.68482506275177],[211638778,'SW+10th%2fMill',45.51368035853506,-122.68529310822487],[68894528,'SW+10th%2fStark',45.52201263038747,-122.68089160323143],[68894774,'SW+11th%2fAlder',45.52087849157282,-122.68288850784302],[68893573,'SW+11th%2fClay',45.51503266290715,-122.68614336848259],[68894390,'SW+11th%2fJefferson',45.51643380015004,-122.685137540102],[68893171,'SW+141st+Pl%2fMillikan+Way',45.493923989189106,-122.82092571258545],[68893328,'SW+16th%2fMorrison',45.5218068521346,-122.68813490867615],[68890385,'SW+17th%2fClay',45.516491122929544,-122.69187659025192],[68890471,'SW+18th+Dr%2fCapitol+Hwy',45.47837080702029,-122.69755616784096],[68893937,'SW+18th%2fColumbia',45.517409219162104,-122.69248679280281],[68894135,'SW+18th%2fYamhill',45.52133985485986,-122.69071117043495],[68890940,'SW+1st%2fAsh',45.52174295736412,-122.67161786556244],[68890910,'SW+1st%2fJefferson+St',45.51406284124661,-122.67644047737122],[68894116,'SW+1st%2fOak',45.52048665868197,-122.67232462763786],[68893273,'SW+30th%2fMarigold',45.46085588054246,-122.70778343081474],[68894296,'SW+3rd%2fMain',45.51575531953712,-122.67697423696518],[68893202,'SW+4th%2fCollege',45.509283970105976,-122.68177673220634],[68892963,'SW+4th%2fColumbia',45.51385045559016,-122.67885446548462],[68890759,'SW+4th%2fMadison',45.51509750503836,-122.67849773168564],[68892516,'SW+4th%2fYamhill%2fSmart+Park',45.517376329586476,-122.67680928111076],[173620520,'SW+6th%2fOak',45.52165557175175,-122.67699301242828],[68893872,'SW+Broadway%2fJackson',45.509628889436236,-122.68496587872505],[68893763,'SW+Broadway%2fMill',45.51258458286197,-122.68301993608475],[68893115,'SW+Broadway%2fMontgomery',45.5118797416082,-122.68357783555984],[68893637,'SW+Curry%2fRiver+Parkway',45.49778764301083,-122.66949355602264],[110051637,'SW+Morrison+btwn+18th%2f20th',45.522540697163244,-122.69140720367432],[179192499,'SW+Naito+Pkwy%2fHarrison+%28Vestas%29',45.509353,-122.677049],[68894175,'SW+Park+Av%2fMarket',45.51371606956164,-122.68374279141426],[68892290,'SW+Park+Av%2fMill',45.51311085857527,-122.68498063087463],[76813168,'SW+Vista%2fGreen',45.5229907715169,-122.69827231764793],[68890944,'SW+Whitaker%2fMoody',45.49853308147632,-122.67155483365059],[188361755,'The+Yards%2fNW+Naito+Pkwy',45.52877000758538,-122.67535150051117],[164392661,'Two+World+Trade+Center',45.51572242899481,-122.6741136610508],[68892322,'U+of+P%2fMain+Parking+Lot',45.57346362021177,-122.72577568888664],[68893371,'U+of+P%2fN+Portsmouth%2fStrong+Lot',45.57487926049971,-122.7299451828003],[68892281,'University+Place+Hotel',45.50752174708261,-122.680723965168],[68893296,'US+Bancorp+Plaza',45.522183641878854,-122.67610251903534],[68892123,'Village+at+Lovejoy+Fountain',45.508320628356124,-122.6803457736969],[68891975,'W+12th+St%2fMain',45.63024802328044,-122.67177879810333]]; // create a data structure for all the location groups var loc_grps = [ [78220102, 45.51614049319232820454545454545454545455, -122.679461459972077727272727272727272727, 15],[78221337, 45.57324977673974333333333333333333333333, -122.706280387938021666666666666666666667, 15],[68890129, 45.55334191831632563636363636363636363636, -122.669034215719223636363636363636363636, 15],[78222355, 45.54024102206333913157894736842105263158, -122.640340816124462631578947368421052632, 15],[78220688, 45.52774164912367958823529411764705882353, -122.689111072213172058823529411764705882, 15],[68890144, 44.9358590356831795, -123.03144156932831, 15],[78223482, 45.50477526300472934883720930232558139535, -122.632368672632837906976744186046511628, 15],[78223564, 45.50724287256651085714285714285714285714, -122.690613557185445714285714285714285714, 15],[68890114, 45.62831324275382, -122.67276719212532, 15],[68890113, 45.4968197998567305, -122.82802551984787, 15]]; // even though we have vehicle_id, it is not relevant at this stage since it will just be used for // counting up how many vehicles match said criteria. we will leave it out of the array. // make, model, location, amenity list var vehicles = [ [4264850,4264866,68891885,[49167247,'']],[94563,45910234,68891326,['']],[94564,1362812,68890300,['']],[94564,1362812,68890832,['']],[4264850,4264866,68893700,[49167247,'']],[94564,1362812,154129986,['']],[4264850,4264866,68892584,[49167247,'']],[4264850,4264866,68892123,[49167247,'']],[4264850,4264866,68890495,[49167247,'']],[94564,1362812,68891186,['']],[94563,45910234,68890200,[49167247,'']],[94563,45910234,68894289,['']],[32061749,82734503,70889176,['']],[32061749,82734503,68890170,['']],[32061749,68438186,68892254,['']],[32061749,82734503,68890471,['']],[32061749,82734503,68893136,['']],[32061749,68438186,68894718,['']],[32061749,68438186,68893171,[458515,'']],[32061749,68438186,68890252,['']],[32061749,82734503,68891889,['']],[94564,3398752,68890895,[49167247,'']],[4264850,4264866,68892967,[49167247,'']],[4264850,4264866,69261648,[49167247,'']],[94564,3398752,68892290,['']],[94564,3398752,68891975,['']],[94564,3398752,68893894,['']],[94564,3398752,68893637,['']],[94564,3398752,68893719,['']],[94564,3398752,171276754,['']],[94564,3398752,68893650,['']],[94564,3398752,68891481,['']],[94564,3398752,68893886,['']],[94564,3398752,73870986,['']],[94564,96329386,68894135,['']],[94564,96329386,211638778,['']],[94563,33798998,68892833,[485650,49167247,'']],[32061749,68438186,154011910,['']],[32061749,68438186,68894247,['']],[32061749,68438186,68893175,['']],[32061749,68438186,68894774,['']],[32061749,68438186,69118393,['']],[32061749,68438186,154176867,['']],[2190563,2190573,68893839,['']],[94564,3398752,68892737,['']],[4264850,4264866,68893296,[49167247,'']],[4264850,4264866,68894694,[49167247,'']],[4264850,4264866,68890381,[49167247,'']],[4264850,4264866,68892281,[49167247,'']],[4264850,4264866,68894175,[49167247,'']],[4264850,4264866,118858404,[49167247,'']],[4264850,4264866,69118366,[49167247,'']],[94563,45910234,68890286,[49167247,'']],[94563,45910234,68894296,[49167247,'']],[94563,45910234,68893046,[49167247,'']],[94563,45910234,68894335,[49167247,'']],[94563,45910234,68892322,[49167247,'']],[94563,45910234,68891454,[49167247,'']],[94563,45910234,68894559,[49167247,'']],[94563,45910234,197176858,[49167247,'']],[94563,45910234,68891026,[49167247,'']],[32061749,68438186,68892413,['']],[32061749,68438186,140807588,['']],[32061749,68438186,68891437,['']],[94563,45910234,110051637,[49167247,'']],[94563,45910234,69261631,[49167247,'']],[32061749,68438186,68892956,['']],[32061749,68438186,68891212,['']],[32061749,68438186,188355965,['']],[94563,68894811,68893754,['']],[32061749,68438186,68894795,[458515,'']],[32061749,68438186,68892318,['']],[94563,94567,68890786,[49167247,'']],[94563,94567,69118397,[49167247,'']],[2968515,1014543,226548928,[49167247,'']],[94563,68894811,68893650,['']],[94564,22394846,140807588,[49167247,'']],[94564,22394846,68894264,[49167247,'']],[94564,22394846,68890339,[49167247,'']],[94564,22394846,68890385,[49167247,'']],[94564,22394846,68893328,[49167247,'']],[94564,22394846,68893305,[49167247,'']],[94564,22394846,68893513,[49167247,'']],[94564,22394846,68891496,[49167247,'']],[94564,22394846,69118437,[49167247,'']],[94564,22394846,154218216,[49167247,'']],[94564,22394846,68893987,[49167247,'']],[94564,3398752,68891398,[49167247,'']],[94564,3398752,68892537,['']],[32061749,68438186,78344340,['']],[32061749,68438186,68890944,['']],[32061749,68438186,68892653,['']],[32061749,68438186,68894390,['']],[32061749,68438186,68890499,['']],[32061749,68438186,68891651,['']],[32061749,68438186,68893485,[458515,'']],[32061749,68438186,68892516,['']],[32061749,68438186,68890464,['']],[32061749,68438186,68893564,['']],[32061749,68438186,94518895,['']],[32061749,68438186,171276754,['']],[32061749,68438186,161600489,['']],[32061749,68438186,68892130,['']],[32061749,68438186,154060321,['']],[94563,45910234,68891555,[49167247,'']],[94563,45910234,68891190,[49167247,'']],[94563,45910234,68890759,[49167247,'']],[94563,45910234,68891774,[49167247,'']],[94563,45910234,68891507,[49167247,'']],[94563,45910234,68891398,[49167247,'']],[32061749,68438186,68894589,['']],[32061749,68438186,68892123,['']],[32061749,68438186,68893371,['']],[32061749,68438186,68891912,['']],[4264850,55604681,68893770,[49167247,'']],[4264850,55604681,68893214,[49167247,'']],[4264850,55604681,68894705,[49167247,'']],[4264850,55604681,68893244,[49167247,'']],[4264850,55604681,68891222,[49167247,'']],[4264850,55604681,68892104,[49167247,'']],[4264850,55604681,68893573,[49167247,'']],[4264850,55604681,68890441,[49167247,'']],[4264850,55604681,94517785,[49167247,'']],[4264850,55604681,68892516,[49167247,'']],[32061749,68438186,132778635,['']],[32061749,68438186,68894665,['']],[32061749,68438186,68891260,['']],[32061749,68438186,68894075,['']],[32061749,68438186,72583736,['']],[4264850,4264866,68890910,[49167247,'']],[94564,1362812,68890266,['']],[4264850,4264866,68892365,[49167247,'']],[94563,45910234,68893202,[49167247,'']],[94564,3398752,68893273,['']],[32061749,68438186,68894550,['']],[94563,45910234,68890940,[49167247,'']],[94563,45910234,154136099,[49167247,'']],[32061749,68438186,89040776,[458515,'']],[32061749,68438186,68891385,['']],[32061749,68438186,154214761,['']],[94564,3398752,68890828,['']],[94564,3398752,93004179,['']],[94563,45910234,68892866,[49167247,'']],[94563,45910234,68894370,[49167247,'']],[94563,45910234,68892123,[49167247,'']],[94563,45910234,68892774,[49167247,'']],[94564,3398752,68890515,['']],[94564,3398752,68890798,[49167247,'']],[94564,3398752,68893171,['']],[94564,3398752,173620520,[49167247,'']],[94563,45910234,118858404,[49167247,'']],[94563,45910234,68893872,[49167247,'']],[94564,3398752,164392661,['']],[94563,45910234,68890910,[49167247,'']],[94564,3398752,132475710,['']],[94564,3398752,68892033,['']],[94564,3398752,68893476,['']],[94564,3398752,68893292,['']],[94563,45910234,68892963,[49167247,'']],[94564,1362812,68894690,['']],[32061749,68438186,76813168,['']],[2968515,9878842,68891571,[49167247,'']],[2968515,9878842,68892789,[49167247,'']],[94563,64790058,68894057,[49167247,'']],[94563,64790058,68891481,[49167247,'']],[94564,2870368,68892357,['']],[94564,2870368,68890560,['']],[94564,2870368,68893560,['']],[5240856,5240857,68893296,[485650,49167247,'']],[5240856,5240857,68894640,[485650,49167247,'']],[94564,2870368,68892269,[49167247,'']],[94563,33798998,68891129,[485650,'']],[2968515,1014543,68894033,[485650,49167247,'']],[2968515,1014543,68894528,[485650,49167247,'']],[2968515,1014543,68890177,[485650,49167247,'']],[2968515,1014543,68894116,[485650,49167247,'']],[2968515,1014543,68891190,[485650,49167247,'']],[94564,1362743,211638778,['']],[3140121,32144640,68891686,[49167247,'']],[3140121,32144640,118866255,[49167247,'']],[94563,64790058,68891125,[49167247,'']],[94563,33798998,68893454,[485650,'']],[94564,1362743,68891279,['']],[94564,2870368,68891846,[49167247,'']],[32061749,32062060,68890899,[458515,49167247,'']],[32061749,32062060,68893763,[458515,49167247,'']],[32061749,32062060,68893218,[458515,49167247,'']],[32061749,32062060,68893054,[458515,49167247,'']],[32061749,32062060,89042307,[458515,49167247,'']],[29744489,155320179,68893280,[49167247,'']],[29744489,155320179,68893968,[49167247,'']],[29744489,155320179,68892785,[49167247,'']],[29744489,155320179,68891701,[49167247,'']],[29744489,155320179,68893547,[49167247,'']],[29744489,155320179,164392661,[49167247,'']],[29744489,155320179,68893434,[49167247,'']],[29744489,155320179,68890852,[49167247,'']],[29744489,155320179,68891481,[49167247,'']],[94564,2870368,68892781,[49167247,'']],[94564,2870368,68892242,[49167247,'']],[4264850,4264865,68891233,[49167247,'']],[4264850,4264865,68894495,[49167247,'']],[4264850,4264865,68893115,[49167247,'']],[94563,163026706,179192499,[49167247,'']],[94563,163026706,68893371,[49167247,'']],[94563,163026706,68893949,[49167247,'']],[94563,163026706,68890404,[49167247,'']],[94563,163026706,68893937,[49167247,'']],[94563,163026706,217037599,[49167247,'']],[94563,163026706,188361755,[49167247,'']],[94563,163026706,188395524,[49167247,'']],[94563,163026706,68892816,[49167247,'']],[94563,163026706,194789442,[49167247,'']] ]; // local array of makes and models so we can tell which is which var mks_mos = [[3140121,1],[32144640,0],[2968515,1],[1014543,0],[9878842,0],[94563,1],[94567,0],[45910234,0],[64790058,0],[33798998,0],[163026706,0],[68894811,0],[2190563,1],[2190573,0],[29744489,1],[155320179,0],[4264850,1],[4264866,0],[4264865,0],[55604681,0],[32061749,1],[82734503,0],[68438186,0],[32062060,0],[94564,1],[1362812,0],[3398752,0],[1362743,0],[2870368,0],[96329386,0],[22394846,0],[5240856,1],[5240857,0]]; // get a local set of ids for the amenities (we dont really need the description, unless // we want to get really fancy and have the form adjust itself based on selections made // (only show relevant body styles / amenities / neighborhoods based on the chosen make/model) var amenities = [458515,49167247,485650]; // get a local set of ids for the styles so we can easily figure out what styles are needed var styles = [8577467,8577468,142802904,8586495,8577469,8577471,8577470,8577472,8577473]; // get a local mapping of locations to location groups. this allows us to trim accordion // results by neighborhood. var lgmap = [[68890177,78220102],[68890266,78220102],[68890381,78220102],[68890759,78220102],[68890910,78220102],[68890940,78220102],[68891186,78220102],[68891190,78220102],[68891398,78220102],[68891481,78220102],[68891507,78220102],[68891774,78220102],[68892123,78220102],[68892281,78220102],[68892290,78220102],[68892516,78220102],[68892963,78220102],[68893046,78220102],[68893115,78220102],[68893202,78220102],[68893280,78220102],[68893296,78220102],[68893305,78220102],[68893547,78220102],[68893573,78220102],[68893650,78220102],[68893763,78220102],[68893872,78220102],[68893968,78220102],[68894116,78220102],[68894175,78220102],[68894289,78220102],[68894296,78220102],[68894390,78220102],[68894528,78220102],[68894774,78220102],[118866255,78220102],[164392661,78220102],[171276754,78220102],[173620520,78220102],[179192499,78220102],[211638778,78220102],[217037599,78220102],[68890252,78220688],[68890339,78220688],[68890404,78220688],[68890495,78220688],[68890899,78220688],[68891026,78220688],[68891260,78220688],[68891686,78220688],[68892104,78220688],[68892130,78220688],[68892254,78220688],[68892365,78220688],[68892785,78220688],[68892789,78220688],[68892833,78220688],[68892866,78220688],[68892956,78220688],[68892967,78220688],[68893175,78220688],[68893434,78220688],[68893476,78220688],[68893513,78220688],[68893839,78220688],[68893894,78220688],[68894057,78220688],[68894075,78220688],[68894247,78220688],[68894370,78220688],[68894640,78220688],[68894718,78220688],[73870986,78220688],[188361755,78220688],[188395524,78220688],[226548928,78220688],[68890441,78221337],[68890786,78221337],[68890895,78221337],[68891125,78221337],[68891651,78221337],[68892322,78221337],[68892584,78221337],[68893371,78221337],[68894264,78221337],[68894550,78221337],[132778635,78221337],[68890798,78222355],[68890828,78222355],[68890852,78222355],[68891212,78222355],[68891222,78222355],[68891279,78222355],[68891385,78222355],[68891571,78222355],[68891701,78222355],[68891889,78222355],[68892033,78222355],[68892242,78222355],[68892269,78222355],[68892413,78222355],[68892774,78222355],[68892816,78222355],[68893054,78222355],[68893244,78222355],[68893560,78222355],[68893700,78222355],[68893719,78222355],[68893754,78222355],[68893770,78222355],[68893886,78222355],[68893171,68890113],[68893949,68890113],[68891975,68890114],[68893564,68890114],[68890560,68890129],[68891326,68890129],[68891885,68890129],[68892242,68890129],[68893454,68890129],[68893886,68890129],[68894335,68890129],[68894495,68890129],[89040776,68890129],[89042307,68890129],[194789442,68890129],[68891555,68890144],[68893987,68890144],[68894033,78222355],[68894495,78222355],[69118366,78222355],[69118393,78222355],[69118397,78222355],[70889176,78222355],[72583736,78222355],[93004179,78222355],[94518895,78222355],[154136099,78222355],[154214761,78222355],[154218216,78222355],[161600489,78222355],[194789442,78222355],[68890170,78223482],[68890200,78223482],[68890286,78223482],[68890464,78223482],[68890499,78223482],[68890515,78223482],[68890832,78223482],[68891129,78223482],[68891233,78223482],[68891437,78223482],[68891454,78223482],[68891496,78223482],[68891846,78223482],[68891912,78223482],[68892357,78223482],[68892537,78223482],[68892653,78223482],[68892737,78223482],[68892781,78223482],[68893136,78223482],[68893214,78223482],[68893218,78223482],[68893292,78223482],[68893485,78223482],[68894559,78223482],[68894589,78223482],[68894665,78223482],[68894690,78223482],[68894694,78223482],[68894705,78223482],[68894795,78223482],[69118437,78223482],[69261631,78223482],[69261648,78223482],[94517785,78223482],[118858404,78223482],[140807588,78223482],[154011910,78223482],[154060321,78223482],[154129986,78223482],[154176867,78223482],[188355965,78223482],[197176858,78223482],[68890300,78223564],[68890385,78223564],[68890471,78223564],[68890944,78223564],[68892318,78223564],[68893273,78223564],[68893328,78223564],[68893637,78223564],[68893937,78223564],[68894135,78223564],[76813168,78223564],[78344340,78223564],[110051637,78223564],[132475710,78223564]]; // get a local mapping of models to styles. this allows us to trim accordion results by style var stylemap = [[94567,8577471],[1014543,8577468],[1362743,8577469],[1362812,8577471],[2190573,8577467],[2870368,8577472],[3398752,8586495],[4264865,8577473],[4264866,142802904],[5240857,8577471],[9878842,8577467],[9878842,8577468],[22394846,8577471],[32062060,8577470],[32062060,8577473],[32144640,8577471],[33798998,8577470],[45910234,8577471],[45910234,8586495],[64790058,8577470],[68894811,8577469],[82734503,8577471],[96329386,8577472],[155320179,8577471],[155320179,8586495],[163026706,8586495],[163026706,142802904]]; // globals for finding your local address in the search box var closestaddr = new Object(); var firstaddr = new Object(); var addrstr; // TODO: right now, this just returns the coords for one address, // we should expand this to support multiple address geocoding function refreshCarsByAddress() { var addr = document.getElementById('gmaps-address').value; addrstr = addr; var new_addr; if (addr.match(/[ ]*/) != null && addr != "enter some or all of an address") { geocode(addrstr, function (p) { // see if this address is closer to the current fleet of a modified address is closer if (p) { firstaddr.lat = p.lat(); firstaddr.lng = p.lng(); } else { // this is kinda lame, but at least it is in the ocean firstaddr.lat = 0; firstaddr.lng = 0; } geocode(addrstr + ', Oregon', function (s) { var old_dist, new_dist, e; if (!s && (firstaddr.lat == 0 && firstaddr.lng == 0)) { closestaddr.lat = 0; closestaddr.lng = 0; } else if (!s) { closestaddr.lat = firstaddr.lat; closestaddr.lng = firstaddr.lng; } else if (firstaddr.lat == 0 && firstaddr.lng == 0) { closestaddr.lat = s.lat(); closestaddr.lng = s.lng(); } else { old_dist = Math.sqrt(Math.pow(firstaddr.lat - 45.51956293, 2) + Math.pow(firstaddr.lng - -122.67033799, 2)); new_dist = Math.sqrt(Math.pow(s.lat() - 45.51956293, 2) + Math.pow(s.lng() - -122.67033799, 2)); if (old_dist >= new_dist) { closestaddr.lat = s.lat(); closestaddr.lng = s.lng(); } else { closestaddr.lat = firstaddr.lat; closestaddr.lng = firstaddr.lng; } } if (!(closestaddr.lat == 0 && closestaddr.lng == 0)) { find_loc.in_progress = 1; find_loc.retry = 1; place_home(closestaddr.lat, closestaddr.lng); recenter(eval(find_loc.map), closestaddr.lat, closestaddr.lng, 16, 0); e = document.getElementById('location_group_id'); if (e) { e.selectedIndex = 0; } $('#new-type-filter').hide(); find_loc.in_progress = 0; refreshAccordion(find_loc); } else { alert("sorry, we couldn't find that address"); } }); }); } }