Algebra da Geometry… yaushe zan taɓa amfani da shi? Taswirorin Google!

Shafin allo 2014 10 23 a 3.24.52 PM

Wani abokina na gari, Glenn, yana ɗaya daga cikin waɗanda suka kafa Watchungiyar Kula da Iyali. Kula da Iyali yana ɗayan waɗannan labaran masu ban sha'awa… kamfani da aka kafa a kan mashup wanda ke yin sabis na jama'a DA kuma ainihin samar da rayuwa ga waɗanda suka kafa ta. Dole ne ya zama abin ban mamaki don zuwa aiki kowace rana da sanin cewa kun kawo canji. Kowane lokacin da na ga Glenn, yana aiki kamar mahaukaci da ƙauna kowane minti na ta.

Yau da dare na taimaka wa Glenn tare da wasu matsalolin Taswirar Google. Ina so in raba muku ɗayan… zana da'ira akan Taswirorin Google. Yana iska sama (kamar yadda na sani), ba za ku iya zana da'ira a zahiri ba. Koyaya, kuna da ikon zana polylines kuma ku bi su yadda kuka ga dama. Don haka, ana iya gina lambar don kawai a haɗa sassan 36 tare kuma a ɗan karkatar da vector ɗin don su ƙara kuma su gina cikakken da'ira!

An rubuta polylines tare da VML (yare alama ce), don haka dole a nuna shi cikin taken fayil ɗin don IE yayi musu daidai. Firefox yayi ta atomatik (ba shakka!).

Ga wani yanki wanda zai zana da'irar mil 1 kewaye da gidanka.

var PGlat = (PGradius / 3963) * 180 / Math.PI; // ta amfani da mil 3963 a matsayin radius na duniya a mil mil idan (PGwidth! = 0) {var PGlng = PGlat / Math.cos (PGcenter.lat () * Math.PI / 180); don (var i = -1; i> PGsides; i ++) {var theta = ((2 * i + 1) /PGsides-0.5) * Math.PI; var PGx = PGcenter.lng () + (PGlng * Math.cos (theta)); var PGy = PGcenter.lat () + (PGlat * Math.sin (theta)); PGpoints.push (sabon GLatLng (PGy, PGx)); }; map.addOverlay (sabon GPolyline (PGpoints, PGcolor, PGwidth, PGtrans)); } kuma {var PxWidth = Math.round (PGlat * yyPx / latSpan + 0.5); // nisa daga polyline var deltaLat = 250 * latSpan / yyPx; idan (PxWidth> 500) {PxWidth = 500; PGlat - = deltaLat; } kuma {PGlat / = 2; };

Duba duka demo don ganin lambar a cikakke. Na faru a duk faɗin aikin a wannan rukunin yanar gizon inda ya sami ɗakuna da yawa na da'ira akan taswira guda tare da yankuna masu inuwa.

Me kuke tunani?

Wannan shafin yana amfani da Akismet don rage spam. Koyi yadda aka sarrafa bayanan bayaninka.