var point = new google.maps.LatLng(10.398671, -84.170756);
google.maps.geometry.spherical.computeOffset(point, 100, 0);
computeoffset
返回的值是 (..., ...(。那么如何将其转换为{lat: ..., lng: ...}?
>google.maps.LatLng
具有纬度和经度的方法:
var point = new google.maps.LatLng(10.398671, -84.170756);
var newpt = google.maps.geometry.spherical.computeOffset(point, 100, 0);
var pt = {lat: newpt.lat(), lng: newpt.lng()};