¾È±Ô °øºÎ¹æ

Javascript & JQuery & CSS > Google Maps API + ÇöÀç Á¢¼Ó À§Ä¡ - À§µµ/°æµµ Á¤º¸ »Ì±â

µî·ÏÀÏ : 2017-07-14 17:07 Á¶È¸¼ö : 53,188

 
//ÇöÀç À§Ä¡¿¡¼­ À§µµ/°æµµ »Ì±â
function getLocation_cord()
{
	if (navigator.geolocation)
	{
		navigator.geolocation.getCurrentPosition(successCallback,errorCallback);
	} else
	{
		$("#map").html("Geolocation is not supported by this browser.");
		alert('´Ü¸»±â¿¡¼­ ÇöÀç À§Ä¡¸¦ »ç¿ëÇÒ ¼ö ¾ø½À´Ï´Ù.');
	}
}

//¼º°ø½Ã Callback ÇÔ¼ö
function successCallback(wp_position) 
{
	$("#setPosition").html("Latitude: " + wp_position.coords.latitude + "<br> Longitude: " + wp_position.coords.longitude);
}

//½ÇÆнà Callback ÇÔ¼ö
function errorCallback(wp_position_error) 
{
	$("#setPosition").html("error.code : "+ wp_position_error.code + " , error.message : " + wp_position_error.message)
}
javascript ¸¦ ÀÌ¿ëÇÏ¿© ÇöÀç Á¢¼Ó ºê¶ó¿ìÁ®ÀÇ À§µµ/°æµµ¸¦ »Ì´Â ¼Ò½º ÀÔ´Ï´Ù.
¡Ø Ȥ½Ã µµ¿òÀÌ µÇ¼Ì´Ù¸é ´ñ±Û¿¡ ÇѸ¶µð ³²°ÜÁÖ¼¼¿ä!
ÀÛ¼ºÀÚ   ºñ¹Ð¹øÈ£
ÀÚµ¿±Û ¹æÁö     (ÀÚµ¿±Û ¹æÁö ±â´ÉÀÔ´Ï´Ù.)
³»¿ë   ´ñ±Û´Þ±â 
À̸ÞÀÏ ¹®ÀÇ : cak0280@nate.com  
Copyright 2000 By ENTERSOFT.KR All Rights Reserved.