Skip to content

allow user to set zoom/scale limits for choropleth maps #5191

@mojoaxel

Description

@mojoaxel

Feature request to limit the zoom of choropleth-maps.

Because there are no axis I recommend limit the scaling factor. This could be dome e.g. by introducing two new setting minScale and maxScale on the layout.geo.projectionobject.

minScale/maxScale must be positive numbers:

  • 0 = 0% minimal zoom (1 pixel)
  • 1 = 100% zoom (original size)
  • 2 = 200% zoom (double the original size)

https://jsbin.com/vudibul/edit?js,console,output

layout = {  
    geo: {
      projection: {
        // initial scale
        scale: 0.75,
        
        /**************************************
         minscale/maxscale are not yet supported
         *************************************/
        minScale: 0.5, // 50%
        maxScale: 1    //100%
      }
    }
  };

Related:

Activity

added a commit that references this issue on Oct 5, 2020
071e21b
linked a pull request that will close this issue on Oct 5, 2020
added a commit that references this issue on Oct 6, 2020
e722947
mebaysan

mebaysan commented on Sep 13, 2022

@mebaysan

I used that technique to re-layout when it overrides the max or min limits.

https://community.plotly.com/t/how-to-set-a-limit-for-zoom-in-out-feature/2574/6?u=mebaysan

added 4 commits that reference this issue on Jun 10, 2024
e3b7ff8
dbe591e
423738f
a392b74
self-assigned this
on Jul 3, 2024
removed their assignment
on Aug 2, 2024
changed the title [-]Set zoom/scale limits for choropleth maps[/-] [+]allow user to set zoom/scale limits for choropleth maps[/+] on Aug 9, 2024
chinnichaitanya

chinnichaitanya commented on Jan 2, 2025

@chinnichaitanya

Look forward to this!

3 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogfeaturesomething new

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @mojoaxel@gvwilson@chinnichaitanya@mebaysan

      Issue actions

        allow user to set zoom/scale limits for choropleth maps · Issue #5191 · plotly/plotly.js