LoginSignup
4
4

More than 5 years have passed since last update.

Google Maps APIで2 地点間の方向を計算する

Posted at

from(latlng)から、to(latlng)への方角を計算する。

js
var from = new google.maps.LatLng(34.86354508748316, 135.29815443984376); 
var to = new google.maps.LatLng(35.713768, 139.77725399999997); 

var heading = google.maps.geometry.spherical.computeHeading(from, to);

参考
Google Maps JavaScript API v3 ジオメトリ ライブラリ

4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4