Commit 671fdff
committed
fix(geo): preserve D3 projection default rotation when user does not set rotation
Geo.updateProjection unconditionally called projection.rotate() which
overwrites the D3 projection's built-in default rotation. For projections
that ship with a non-identity default (e.g. peirce quincuncial [-90,-90,45],
wiechel [0,-90,45]), the map rendered in a different orientation.
Only call projection.rotate() when the user explicitly set rotation values
or when fitbounds has derived a rotation from the data. Otherwise preserve
the D3 projection's default rotation so maps render in their canonical
orientation.
Fixes #79491 parent 21da158 commit 671fdff
1 file changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
303 | 303 | | |
304 | 304 | | |
305 | 305 | | |
306 | | - | |
307 | | - | |
308 | | - | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
309 | 322 | | |
310 | 323 | | |
311 | 324 | | |
| |||
0 commit comments