Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get visible bounds? #108

Open
ribrewguy opened this issue Feb 9, 2022 · 2 comments
Open

How to get visible bounds? #108

ribrewguy opened this issue Feb 9, 2022 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@ribrewguy
Copy link

I have been struggling with how to determine the visible map bounds within the page. I require this ability in order to determine the area to search for markers within from a backend location service. I've tried several approaches to get to the underlying google API which appears to support my use case.

  mounted() {
    const map = this.$refs.myMap
    console.log('myMap: ', Object.keys(map))
    const gMap = map.getBounds()
    console.log('bounds: ', gMap)
  },

The first log prints multiple available keys, one being the getBounds() function. However, calling getBounds() returns undefined.

Please advise. Thanks.

@chantouchsek
Copy link
Owner

When did you call getBounds() function that go undefined?

@chantouchsek chantouchsek added the help wanted Extra attention is needed label Feb 20, 2022
@ribrewguy
Copy link
Author

In mounted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants