question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add `geo.center` attribute to specify map view without rescaling

See original GitHub issue

When using an autosized plot, focusing on a map area by using ranges on scattergeo lat long causes the plot width and height to change. I don’t think this should happen. The plot should always use all available space.

I created a codepen to demonstrate the issue: http://codepen.io/brian428/pen/EWbKgQ

Just change the setRange flag to true to see the effect it has on the plot size.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:17 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
brian428commented, Aug 10, 2017

Here’s an example that shows both problems. At the top of the JS, turn on the scale/rotate to see the map become skewed (zoom out on the map to see it). Then turn that off and turn on the use of a lat/lon range to see the size of the map shrink instead of just scaling the map to show the relevant ranges.

https://codepen.io/brian428/pen/vJZJaE?editors=0010#0

0reactions
brian428commented, Oct 5, 2017

Well the thing that confuses me is that your commit (https://github.com/plotly/plotly.js/commit/4d9b566dbf266f01286dcfbce1149be4bfb76b10) doesn’t look like it has any Plotly changes, only the addition of the mock file. And the release notes don’t mention anything about this issue. So it’s not clear if this functionality is something that already existed and just needed an example provided, or if it involved changes to Plotly that aren’t released yet.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Center a map in d3 given a geoJSON object - Stack Overflow
Create a unit projection. var projection = d3.geo.albers() .scale(1) ... If center is not specified, returns the current center which defaults to ⟨0°,0°⟩....
Read more >
MapView | API Reference | ArcGIS Maps SDK for JavaScript ...
Documentation site for ArcGIS Maps SDK for JavaScript on ArcGIS Developers.
Read more >
Example: Add a Parameter to a Map View - Tableau Help
How to create and display a parameter so that users can set the threshold for low vs. high birth rate. Build a map...
Read more >
Embedding a map | Maps Embed API - Google Developers
Stay organized with collections Save and categorize content based on your preferences. This guide shows how to embed an interactive map onto your...
Read more >
Chapter 9 Making maps with R | Geocomputation with R
However, despite the innovation of interactive mapping, static plotting was still the emphasis of geographic data visualization in R a decade later (Cheshire ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found