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:

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3backlogfeaturesomething new

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions