You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, the map code is working great in Qualtrics - thanks! But, the autocomplete is not location-aware. The address within the map area often comes up low down in results until the full address is typed in (see picture - second result should be first). I know there are bounding options for autocomplete that can address this, but I can't decipher the javascript to add them.
The text was updated successfully, but these errors were encountered:
Note: I couldn't get this to work reactively (i.e. autocomplete within the map bounds), but I did find a way to set a bounded box in your script - hope that's helpful:
var t = new google.maps.places.Autocomplete(e, this.props.options);
// set a boundary box around southeast queensland
const southwest = { lat: -28.458248082416496, lng: 151.6542799756878 };
const northeast = { lat: -25.944880587065512, lng: 154.08375270802287 };
const newBounds = new google.maps.LatLngBounds(southwest, northeast);
t.setBounds(newBounds);
So, the map code is working great in Qualtrics - thanks! But, the autocomplete is not location-aware. The address within the map area often comes up low down in results until the full address is typed in (see picture - second result should be first). I know there are bounding options for autocomplete that can address this, but I can't decipher the javascript to add them.
The text was updated successfully, but these errors were encountered: