ʻO Algebra a me Geometry ... Āhea wau e hoʻohana ai? Palapala ʻāina Google!

Pana ʻia ʻo 2014 10 23 ma 3.24.52 PM

ʻO kahi hoaaloha maikaʻi naʻu, ʻo Glenn, kekahi o nā mea hoʻokumu o Family Watchdog. ʻO Family Watchdog kekahi o kēlā mau moʻolelo maikaʻi loa ... kahi hui i hoʻokumu ʻia ma kahi mashup e hana nei i kahi lawelawe lehulehu A e hāʻawi maoli nei i kahi ola no nā mea hoʻokumu. He mea kupaianaha paha ka hele ʻana i ka hana i kēlā me kēia lā e ʻike nei ua hana ʻokoʻa ʻoe. I kēlā me kēia manawa ke ʻike wau iā Glenn, hana ʻo ia e like me ka pupule a aloha i kēlā me kēia minuke.

I kēia pō ua kōkua wau iā Glenn me kekahi mau pilikia Google Map. Makemake au e kaʻana like i kekahi me ʻoe… e kaha ana i kahi pōʻai ma Google Maps. E piʻi ka makani (i koʻu ʻike), ʻaʻole hiki iā ʻoe ke kaha kiʻi i kahi pōʻai. Eia nō naʻe, hiki iā ʻoe ke kaha kiʻi i nā polyline a me nā vector iā lākou e like me kou manaʻo. No laila, hiki ke kūkulu ʻia i ke pāʻālua e kau maʻalahi i nā ʻāpana 36 a kihi iki i ka vector i mea e hoʻohui a kūkulu i kahi pōʻai holoʻokoʻa.

Kākau ʻia nā polyline me VML ('ōlelo markup vector), no laila pono e hōʻike ʻia i ke poʻo o ka faila no IE e hāʻawi pono iā lākou. Hana ʻino ʻo Firefox (ʻoiaʻiʻo!).

Eia kahi ʻāpana e kahakiʻi i kahi pōʻai 1 mile a puni kou home.

var PGlat = (PGradius / 3963) * 180 / Math.PI; // ka hoʻohana ʻana i nā mile 3963 e like me ka radius o ka honua i nā mile inā (PGwidth! = 0) {var PGlng = PGlat / Math.cos (PGcenter.lat () * Math.PI / 180); no (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 (hou GLatLng (PGy, PGx)); }; map.addOverlay (GPolyline hou (PGpoints, PGcolor, PGwidth, PGtrans)); } ʻē aʻe {var PxWidth = Math.round (PGlat * yyPx / latSpan + 0.5); // ka laula o polyline var deltaLat = 250 * latSpan / yyPx; inā (PxWidth> 500) {PxWidth = 500; PGlat - = deltaLat; } ʻē aʻe {PGlat / = 2; };

E ʻike i ka demo holoʻokoʻa e ʻike i ka pāʻālua piha. Ua loaʻa wau ma o ka hana ma kēia pūnaewele kahi i loaʻa iā ia i mau papa o nā pōʻai ma ka palapala ʻāina hoʻokahi me nā wahi malu.

Pehea kou manaʻo?

Ke hoʻohana nei kēia pūnaewele i ka Akismet e ho'ēmi i ka spam. E aʻo pehea e hanaʻia ai kāuʻikeʻikepili.