Just another WordPress site緯度経度から距離を求めるというのをネットで探しても、意外と難しい解説ばかりで、具体的な例が無いのでGoogle先生の例から切り取り。 ソースコード //fromとtoはLatLngクラス function getDistance(from, to) { if (!from || !to) { return 0; } var R = 6371; // Radius of the Earth in km var dLat = (to.lat() - from.lat()) * Math.PI / 180; var dLon = (to.lng() - from.lng()) * Math.PI / 180; var a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.cos(from.l