Created
December 10, 2014 03:54
-
-
Save thorsteinsson/6082060d1e157e79cec6 to your computer and use it in GitHub Desktop.
Move geodesic polygon to LatLng.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var moveToGeodesic = function(map, center, paths, latLng) { | |
| return paths.map(function(path) { | |
| return path.map(function(point) { | |
| return google.maps.geometry.spherical.computeOffset( | |
| latLng, | |
| google.maps.geometry.spherical.computeDistanceBetween(center, point), | |
| google.maps.geometry.spherical.computeHeading(center, point) | |
| ); | |
| }); | |
| }); | |
| }; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment