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.

Feature Request - getBounds()

See original GitHub issue

Hi,

I have seen getBounds() in the mapboxgl js docs and it would be so useful to have this exposed at the React level.

At the moment I am getting the MapboxGl.Map object manually and using the getBounds() on that, but I don’t like bypassing the react.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

7reactions
alex3165commented, Nov 24, 2017

When do you need the bounds? If you need the bounds on map move you could do something like this:

<ReactMapboxGl
  onMove={(map) => { const bounds = map.getBounds()}}
/>
0reactions
alex3165commented, Nov 24, 2017

yes that’s the one you should use

Read more comments on GitHub >

github_iconTop Results From Across the Web

Google Maps JavaScript API V3 Reference
This is an index of all the classes, methods, and interfaces in the Maps JavaScript API version 3.51 (weekly channel). This reference is...
Read more >
Google Map API v3 — set bounds and center - Stack Overflow
My suggestion for google maps api v3 would be(don't think it can be done more ... for latest version of Maps API for...
Read more >
FeatureSource (Geotools modules 27-SNAPSHOT API)
Registers a listening object that will be notified of changes to this FeatureSource . ReferencedEnvelope · getBounds(). Get the spatial bounds of the...
Read more >
Feature request - Windy Community
The specific code I am struggling with is: let mnw = map.getNorthWest();. In fact, most of the map locations not map.getCenter() are not...
Read more >
JavaScript3 - Issue Tracker - Google
ID TYPE VOTES STATUS 35827808 Feature Request 744 Assigned 35816953 Feature Request 611 Assigned 35820262 Feature Request 466 Assigned
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