When users search for a location in your app, wouldn’t it be nice to not just show it on a map but also deliver rich details to help them better understand the specifics of that point of interest? Something much more than a pin on a map?
There’s an easy way to make that happen in the Google universe. The Google Maps Platform Places API. This Google Maps Platform feature delivers rich details, including location name, address, reviews, atmosphere, operating hours and more for more than 150 million locations worldwide.
This API enhances users’ Maps experiences to deliver one that’s more immersive and informative and helps you optimize your business at the same time. Let’s take a look at how it works as part of a strong location-based services strategy.
How Does Google Maps Platform Places API Work?
Places API uses HTTP requests to enable your application to return definitive information about places. These places are defined by the API as geographic locations, establishments or notable points of interest. All of these places are contained within a defined area, which could be map boundaries or around a fixed location.
When a user searches for a place in your app, it triggers an https:// request that accesses different Places API request types and returns a JSON or XML response from these searches, using a unique Place ID as an identifier. As Google notes, “All requests to a Places service must use the https:// protocol, and include an API key.”
Request types include:
This request allows users to search for places using the different categories as defined by the API that we mentioned above. Searches run based on proximity or a text string. You can find places from a query, a telephone number or even places nearby the location. Results provide the user with a list of places based on the search strings.
Place Details expands upon the results from Place Search. Instead of a list of places, your users will get expanded details about the locations surfaced in the Place Search. The aforementioned Place ID comes into play here on the backend to help users locate more comprehensive information, including full addresses, user reviews/ratings and more.
This service is a read-only API that allows you to add high-quality images to your application to give your users relevant photographic content related to their searches. Photos come from the Places database, which offers millions of place-related options, including images provided by business owners.
This request automatically fills in a place’s name, address or both as a user types in the search field, returning place predictions via an HTTP request. On-the-fly results surface whether the user types full words or substrings, resolving place names and addresses. It also can drive a user to the Place Details results if you set it up that way.
Incorporating this service into your Maps environment allows you to provide your users with a query prediction for text-based geographic searches, by returning suggested queries as you type. So, if they’re looking for “best wings in Cleveland,” for example, this request will surface suggested locations for this category-based search. This service can match on both full words and substrings and send queries while the user types for on-the-fly predictions.
Google Maps Platform Places API can return a time zone for any location, the precise location of a place using cell phone tower data and also convert addresses to geographical coordinates and vice versa.
What Are Some of the Use Cases for Places API?
There are many use cases for this handy Google Maps Platform Places API in an application.
In the hospitality industry, hotels and restaurants might use the Place Autocomplete feature to ensure users can easily find their businesses. They can do this quickly by using a drop-down menu to find hotels or places to eat within a targeted area.
The Place Details request feature can then provide them with more information about these businesses to help them further pare down options and make an educated decision.
But hospitality isn’t the only sector that benefits from the Google Maps Platform Places API. Consider shipping and logistics. This industry revolves around the need to get goods from Point A to Point B. The Places API can streamline that again with Place Autocomplete. Drivers can start entering their destination address to quickly locate where they need to go. Companies also can use the API to determine travel distances for budgeting, logistics and more.
That’s just two examples of how using Places API in your geolocation solutions can transform the way you work and the way your users or staff get the information they need.
Using Google Maps Places API in your geolocation solutions can transform the way you work and the way your users or staff get the information they need. @OnixNetworking
We want to be sure you understand how Google Maps Platform works, so be sure to check out our other blogs:
Derek is the Head Location Services at Onix. Since 2013, he has focused on helping companies understand the business benefits of adopting location-based solutions. Derek helps customers understand the licensing options and best practices for deploying Google Maps solutions, both pre and post sale.
Google Cloud is rolling out an exciting new Maps Local Context feature into Beta, and we can help you be part of the program! Local Context will change the way your users locate information about your organization and surrounding areas.