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

Better way to set zoom level after doing a search? callbackFormVals: { `setTimeout(() => { this.map.setZoom(1); }, 50); #250

Open
mvaneijgen opened this issue Apr 2, 2019 · 0 comments

Comments

@mvaneijgen
Copy link

When A visitor searches on a location I want to set the zoom level of the Google Maps based on the distance (bh-sl-maxdistance) they set, so on the callbackFormVals I want to set this.map.setZoom(CUSTOM_NUMBER);, but it seems that also sets the zoom level at the same time. The only way I could think to fix it (and this works) setTimeout(() => { this.map.setZoom(1); }, 50);, but this seems a bit hack-y and was looking for a better way to set the zoom level after the form is submitted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant