This document explains how to configure the Google Places API in Native Mobile applications and provides a brief overview about it.
Google Places API is a popular service that allows finding geographic locations near a site indicated by the end user.
When this feature is applied, a location point can be chosen in three different ways:
- By tapping an icon on a map
- By looking for a place by its name on a search engine
- By selecting it from a list
Every site registered on Google includes its photos, reviews, and other relevant information for each one of them. These features enhance the possibility for the end users to find places of interest, such as hospitals, restaurants, business, shops, hotels, etc.
For example, what happens if your application allows consulting those hotels near the user, but they only know its name? Google Places allows searching for its address and see its references in an easy way.
The use of Google Places preserves compatibility with their respective control for Google Maps.
Step 1 - Create or select a project in the Developer Console
1. Go to the Google Developer Console, log in and search for the Google Places link.
2. If you don't have any projects created at the moment, Google prompts you to create one. Next, continue to step 4.
3. If you already have projects created, select one of them or create a new one to apply Google Places to.
4. If you choose (or have) to create a new project, Google asks you to select a name for it.
Simply click on the "Enable" button.
Follow the steps explained in HowTo: Get an API Key from Google.
Step 4 - Set Maps API Key in the IDE
In the GeneXus IDE, navigate to Preferences > Knowledge Base > Environment > Front end > Android.
Under
Generator: Android, there is a property called
Android Maps API Key. Paste the Google Places API Key obtained in Step 2 here.
If your application has attributes or variables based on the
Geolocation domain, Google Places will be displayed with all the features it offers whenever you want to choose a location, .
Objects: Panel, Work With
Domain: Geolocation
Generators:
.NET,
Java, Android
This feature is available since GeneXus 15