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.
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 thecallbackFormVals
I want to setthis.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.