緯度çµåº¦ã使ã£ã¦2å°ç¹éã®è·é¢ãç®åºããå¿ è¦ããã£ãã®ã§èª¿ã¹ãå 容ãã¡ã¢ã å°çã¯å¹³é¢ãããªãã®ã§å°ã è¨ç®å¼ãé¢åã Google Mapã®è·é¢æ¸¬å®ãã¼ã«ã§ãã§ãã¯ããã®ã§æ¦ãOKãªã¯ãã â»ã³ã¼ãã®å©ç¨ã¯èªå·±è²¬ä»»ã§ãé¡ããã¾ãã #緯度çµåº¦ããè·é¢ãè¨ç®ãã def get_distance(lat1, lng1, lat2, lng2) y1 = lat1 * Math::PI / 180 x1 = lng1 * Math::PI / 180 y2 = lat2 * Math::PI / 180 x2 = lng2 * Math::PI / 180 earth_r = 6378140 deg = Math::sin(y1) * Math::sin(y2) + Math::cos(y1) * Math::cos(y2) * Math::cos(x2 - x1) distance = ea
{{#tags}}- {{label}}
{{/tags}}