Location Blocks
If you intend to publish a web app, you need to enter your personal Web Geocoding API Key in your project's app settings. This step is unnecessary for publishing and downloading to mobile devices. It is only required when publishing a project as a web app.
To add your own Google Maps Web Geocoding API Key to your Thunkable project:
- 1.
- 2.Click the gear icon on the left of your Thunkable project's Design tab to access your Project Settings.
- 3.Scroll to the Google Map Settings section.
- 4.Input your Web Geocoding API Key into the corresponding field.

Geocoding is the process of converting an address to a latitude-longitude pair. To access this functionality in Thunkable, you use the
coordinates from address
block in the Location drawer of blocks. 
Outputs:
- latitude
- longitude
- error
For Android, geocoding requires the device’s location services to be enabled.
In the sample block combination below, when the Geocode button (btnGeocode) is clicked, the
coordinates form address
block will geocode the address the user has input in the text input (textAddress), and output the address’s latitude and longitude or an error if applicable. If there is an error, the label (labelError) will populate with the error output text. If there isn’t an error, the label (labelLocation) text will be populated by the address’s latitude and longitude, separated by a comma. 
Returned Value | Explanation |
---|---|
ZERO_RESULTS | The request was successful but returned no results. |
INVALID_REQUEST | The request was not successful due to invalid parameters. |
E_LOCATION_UNAUTHORIZED | Location services must be enabled. |
Reverse Geocoding is the process of converting a latitude-longitude pair into a human-readable street address or Plus Code. To access this functionality in Thunkable, you use the
address from coordinates
block, which is in the Location drawer of blocks. 
For Android, reverse geocoding requires the device’s location services to be enabled.
In the sample block combination below, when the Reverse Geocode button (btnReverse) is clicked, the
address from coordinates
block will engage in reverse geocoding using the latitude and longitude the user has input in the text inputs (textLat and textLng), and output the coordinate’s address or an error if applicable. If there is an error, the label (labelError) will populate with the error output text. If there isn’t an error, the label (labelAddress) text will be populated by the latitude and longitude’s address. 
Note: The
address from coordinates
block in the image above is the advanced version of the block. To access this version:- 1.Drag and drop the block into your workspace.
- 2.Right click on the block.
- 3.Select Show advanced block.
Returned Value | Explanation |
---|---|
ZERO_RESULTS | The request was successful but returned no results. |
INVALID_REQUEST | The request was not successful due to invalid parameters. |
E_LOCATION_UNAUTHORIZED | Location services must be enabled. |
Have feedback on this doc? Please take a moment to share your feedback here: Thunkable Docs Feedback. Your valuable insights will help us improve and better serve you in the future.
Last modified 1mo ago