Skip to content

Can't set longitude range between [160, -160] #1698

Closed

Description

@chriddyp

Trying to center a scatter map around Fiji. I want the longitude to be between 140 and -140, like this image (I manually zoomed and panned to focus here)

image

Setting the longitude range to [140, -140] does not seem to work. I've also tried rolling over with [140, 220] to no avail. Here is a Codepen: https://codepen.io/chriddyp/pen/OmovzL?editors=1010. Here is a graph in the chart editor: https://plot.ly/create/?fid=chris:18383

🎩 tip to @jackparmer who originally discovered this.

Activity

  1. etpinard commented on May 18, 2017

    @etpinard
    Contributor

    Looks like all custom lonaxis ranges that cross the antimeridian (where lon = -180 = 360) are broken.

    This might be a good reason to start using d3 v4's d3-geo module which ships with a fitExtent method that probably does a better job than my ad hoc attempt.

  2. self-assigned this
    on Sep 14, 2017
  3. etpinard commented on Sep 18, 2017

    @etpinard
    Contributor

    @chriddyp I found a way to make this work without waiting for a patch:

  4. chriddyp commented on Sep 18, 2017

    @chriddyp
    MemberAuthor

    cc @jackparmer in case you still need to make this example ^^

  5. added 8 commits that reference this issue on Sep 19, 2017
    735caaf
    152d742
    d4df98d
    9319ebe
    29f718e
    7f84987
    a0be087
    e59c90b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugsomething broken

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions