ANKUR KOTWAL: Hi.
Welcome to this series on Geocasts,
where you can walk your way through what you
can do with Google Maps APIs.
[MUSIC PLAYING]
In part one, we saw how you could delegate your mapping
work to the Google Maps app.
In part two, we saw how you could go further
by incorporating Google Maps functionality
right into your app.
And then in part three, we looked
at integrating Maps, and some of the smarts behind Maps,
into your apps.
In this video, we'll go deeper still,
and we'll talk about getting raw data from Google so you can
orchestrate it in your apps.
Let's start with the Directions API.
This is a web service that provides
smart content about directions and times,
including predictive travel times.
We can forecast what traffic conditions
are likely to be based on historic data.
Now, directions aren't just for driving.
The web service provides walking,
biking, and public transport directions, too.
You can get all this information in JSON or XML,
parse it, and use it.
The Places API you saw in an earlier video
also has a web service.
So you can query to get lots of information
about a particular place.
So here you can see me searching for Moscone in San Francisco,
and then finding a number of places that match that name.
And, for example, if I look for restaurants in Sydney,
I'll get a payload like this, with great information
about these places.
Now, as people, we don't think of locations in terms
of latitude and longitude.
We rarely even think of a location by address.
We like to think of locations by name, such as, my house, where
I work, my favorite restaurant by name.
The Places API helps us find places based on their names.
And once we have that place, we can get some excellent metadata
about it.
You can use these tools to provide that user friendliness
to your users.
We also have native Places API calls for Android and iOS.
And with these, you can incorporate them
into real world places into your apps.
Based on the readings about your device's location,
for example, latitude, longitude, or Bluetooth
beacons, the Places API can figure out real places
that you are likely in as a result.
So instead of being at a lat/long,
your users can know that they are at a particular real world
place, like a coffee shop.
It calculates a likelihood for a particular location
based on a variety of factors, including
things like opening hours.
I now want to talk about the Roads API.
And it's used for when you use your GPS on your phone.
Often, that signal can be quite noisy, the GPS location.
And with this API, we can snap the locations
that our phone gives us to actual roads in the real world.
This can also make for a really nice user experience.
So these are a few examples of some of the web services
that are available.
We also provide Libraries for these web services
for lots of popular languages.
Now, do note that these Libraries are designed
to be consumed server-side.
They're protected by API keys, so you
should consider running this code on your server
and then talking to your server with your app
rather than having those Libraries run locally
in your apps on the mobile device.
So that's it.
I can't wait to see what you build.
And if you have any questions, please reach out on Twitter
or Google .
Thanks for watching.
[MUSIC PLAYING]