Monday, December 19, 2011

Qibla Mosque Straightening Using Google Map

Qibla Mosque Straightening Using Google Map: It is endless when we discuss about the Google map. Well, in this article, we will make a straight line from two different locations. The method is called with a polyline. To make the line on the Google map, we still use the basic coding to display the Google map on our personal website. Once you open the page, now make a folder on your personal web page by following the steps in the article. Once the folder is successfully created, then we proceed to the next step.

Next step, type the code below which serves to show the line polyline.

var polyline = new GPolyline([
new GLatLng(-7.919536103992129, 112.59542226791382),
new GLatLng(-7.930529082052441, 112.61073231697083)
], "#ff0000", 10);
map.addOverlay(polyline);

Put the code above under the code below.

map.setMapType(G_SATELLITE_MAP);

For information on polyline code above is as follows:
  • -7.919536103992129, 112.59542226791382 he starting point coordinates. These coordinates indicate the location of UMM Mosque.
  • #ff0000 is the color code of the line polyline that will be made.
  • 10  is a number that indicates the size or line thickness.


Screenshoot : Qibla of Ar-Fachruddin Mosque.

In the picture above, is a screenshot of the use of line Googla polyline on the map. Seen in the center of the picture is a mosque Ar-Fachruddin Muhammadiyah University of Malang, and there is a line where the end of the first is the position of the Ar-Fachruddin location of the mosque, then the tip next to the Grand Mosque is the Ka'bah.

Easy isn't it? now your turn to try to make it. Well, for a demo in this article, I will try to make a straight line to the qibla mosque of Ka'bah yours. In other words, whether it is straight your mecca? Muslims, when worship is more afdol facing the Qiblah, and the qibla was facing Ka'bah in the Masjidil Haram. Wallahuallam bisshawab.

demo

download

No comments:

Post a Comment

Comments