Skip to content

Commit

Permalink
Recalculate line end (#38)
Browse files Browse the repository at this point in the history
Fixes IDL issue found in issue #37
  • Loading branch information
FailSpy authored Apr 9, 2024
1 parent 02c481b commit 8b9318a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions staticmaps/line.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,10 @@ def interpolate(self) -> typing.List[s2sphere.LatLng]:
current.lng().degrees,
)
n = 2 + math.ceil(line.a13)
for i in range(1, n):
for i in range(1, n+1):
a = (i * line.a13) / n
g = line.ArcPosition(a, Geodesic.LATITUDE | Geodesic.LONGITUDE | Geodesic.LONG_UNROLL)
self._interpolation_cache.append(create_latlng(g["lat2"], g["lon2"]))
self._interpolation_cache.append(current)
last = current
return self._interpolation_cache

Expand Down

0 comments on commit 8b9318a

Please sign in to comment.