Skip to Main Content
Categories Form Designer
Created by Guest
Created on May 10, 2024

Google Maps API; Allow restricting search results by country

Allow designers to limit the restrictions of the Google Maps API in the Address field form to a specific country.
Google Maps API allows this with the "components=country:<code>" parameter in the URL.
https://developers.google.com/maps/documentation/places/web-service/autocomplete#components

As an example in the developers tools it would...

The URL would be changed from:

https://maps.googleapis.com/maps/api/js?key=<obfuscated-key>&libraries=places&callback=nintexGoogleMapsApiLoader

https://maps.googleapis.com/maps/api/js?key=<obfuscated-key>&libraries=places&callback=nintexGoogleMapsApiLoader&components=country:ca


This will allow geo-restricting the results of the Google Maps API.

  • Attach files