Aljabra iyo joomatari… goormaan waligay isticmaali doonaa? Khariidadaha Google!

Shaashadda Sawirka 2014 10 23 ee 3.24.52 PM

Saaxiibkeyga wanaagsan, Glenn, wuxuu ka mid yahay aasaasayaasha Hay'adda Ilaalinta Qoyska. Family Watchdog waa mid ka mid ah sheekooyinka cajiibka ah… shirkad lagu aasaasay mashup oo qabata adeeg dadweyne IYO runtiina nolol siisa aasaasayaasheeda. Waa inay noqotaa wax layaableh inaad shaqo tagto maalin kasta adoo og inaad isbedel samaysay. Waqti kasta oo aan arko Glenn, wuxuu u shaqeeyaa sidii qof waalan oo kalgacal leh daqiiqad kasta oo ka mid ah.

Caawa waxaan ka caawiyey Glenn dhowr arimood oo Google Map ah. Waxaan rabay inaan mid idin kula wadaago… oo aan ku sawirayo khariidadaha Google. Way kacdaa (illaa inta aan ogahay), dhab ahaan ma sawiri kartid goobaabin. Si kastaba ha noqotee, waxaad awood u leedahay inaad ku sawirto polylines oo aad vector ugu aragto sidaad u aragto inay habboon tahay. Marka, nambarka waxaa loo dhisi karaa si fudud oo 36 qaybood ah la isu geeyo oo xoogaa xagal loo maro dulinka si ay u darmaan oo u dhisaan wareeg buuxa!

Polylines-ka ayaa lagu qoraa VML (luuqada calaamadeynta dulinka), marka waa in lagu muujiyaa cinwaanka cinwaanka IE si sax ah loogu bixiyo. Firefox si otomaatig ah ayey u sameysaa (dabcan!)

Waa kuwan guntin oo ku sawiri doona wareega 1 mayl gurigaaga.

var PGlat = (PGradius / 3963) * 180 / Xisaabta.PI; // adoo adeegsanaya 3963 mayl oo ah masaafada dhulka maylaad ahaan haddii (PGwidth! = 0) {var PGlng = PGlat / Math.cos (PGcenter.lat () * Math.PI / 180); loogu talagalay (var i = -1; i> PGsides; i ++) {var theta = ((2 * i + 1) /PGsides-0.5) * Xisaabta.PI; var PGx = PGcenter.lng () + (PGlng * Math.cos (theta)); var PGy = PGcenter.lat () + (PGlat * Math.sin (theta)); PGpoints.push (cusub GLatLng (PGy, PGx)); }; map.addOverlay (GPolyline cusub (PGpoints, PGcolor, PGwidth, PGtrans)); } kale {var PxWidth = Math.round (PGlat * yyPx / latSpan + 0.5); // balaca polyline var deltaLat = 250 * latSpan / yyPx; haddii (PxWidth> 500) {PxWidth = 500; PGlat - = deltaLat; } kale {PGlat / = 2; };

Eeg demo dhan si aad u aragto lambarka oo buuxa. Waxaan ku dhacay shaqadii boggan oo uu ku haysto dhowr lakab oo wareegyo ah khariidad keliya oo leh gobollada hooska leh.

Maxay idinla tahay?

Boggani wuxuu isticmaalaa Akismet si loo yareeyo spam. Baro sida xogtaada faallooyinkaaga looga shaqeeyo.