Tip:
Highlight text to annotate it
X
MANO MARKS: Hello, and welcome to a special episode of Google
Developers Live with Google Maps and Android.
I'm Mano Marks of the Maps developer relations team.
And this week, I'm teamed up with Fred Chung
on the Android team.
FRED CHUNG: Hello everyone.
MANO MARKS: We'd like to talk to you about the new Google
Maps Android API V2.
FRED CHUNG: So yeah, we just launched Google Play Services.
It's an update to Google Play Services.
For those of you that aren't familiar with Google Play
Services, it is a new platform through which third-party
developers, Android developers can integrate with Google
services like Google Plus, OAuth 2.0 authentication.
And now they can also integrate with Panorama and
Maps, the new Maps API through this service.
And the good thing is that this service is backward
compatible all the way back to Froyo or 2.2.
And the beauty of this is that for users, as new updates
become available, the users automatically get the new
services on their devices.
And for developers, all you have to do is to grab a thin
client library to integrate with your Android project.
MANO MARKS: In this update, we added a number of interesting
components.
In particular today, we're going to talk to you about
Google Maps Android API V2.
In this new map library, we're making available to all
Android apps the same experience that Android users
get using the Google Maps app.
You're going to get vector tiles.
You can rotate and tilt the map.
And these interactions are something that users are
already familiar with.
So if you just take a quick look here, you can see here we
are in a tilted map view with 3D buildings.
If I zoom in, you can see that I actually have some access to
some indoor maps.
So here we have Moscone Center West.
I can also switch very quickly to terrain mode.
FRED CHUNG: Very nice.
MANO MARKS: Or I can switch to hybrid, satellite,
and vector data mode.
And one of the really cool call-out features on this is
you will notice that as I rotate this
map, which I can do--
rotate and tilt it--
the labels all stay in the same direction.
Even though this is a raster map, it's got vector overlay
on top of it.
FRED CHUNG: So I don't need to turn my head.
So essentially, the experience is just like Google Maps.
MANO MARKS: That's right.
And anywhere I go, I can get traffic data.
So whatever layer I'm looking at, I get an overlay of
traffic if that's what I want to show to my users.
--users are already familiar with.
So if you just take a quick look here, you can see here we
are in a tilted map view with 3D buildings.
If I zoom in, you can see that I actually have some access to
use some indoor maps.
So here we have Moscone Center West.
I can also switch very quickly to terrain mode.
FRED CHUNG: Very nice.
MANO MARKS: Or I can switch to hybrid, satellite,
and vector data mode.
And one of the really cool call-out features on this is
you will notice that as I rotate this
map, which I can do--
rotate and tilt it--
the labels all stay in the same direction.
Even though this is a raster map, it's got a vector overlay
on top of it.
FRED CHUNG: So I don't need to turn my head.
So essentially, the experience is just like Google Maps.
MANO MARKS: That's right.
And anywhere I go, I can get traffic data.
So whatever layer I'm looking at, I get an overlay of
traffic if that's what I want to show to my users.
FRED CHUNG: I talk to a lot of developers.
And I know that this update is much anticipated.
I'm sure a lot of them will be thrilled about this update.
So from a coding perspective, this new library addresses a
couple of developer concerns.
It is now fragment friendly, which is a good thing.
Because this is one of the major concerns that we hear a
lot from the developers trying to use
the old MapView libraries.
There are some limitations to it.
It can only be hosted in [? a map ?] activity, which is
kind of limiting for a lot of developers.
People have tried all sorts of tricks to make
it work with fragments.
But it's very messy.
So the good thing is that it is now available.
So feel free to update your app to this new API.
For today's show, there are two parts to it.
In the first part, Mano will do some more additional demos
to show off some of the features
available in this API.
And then we'll hang out with a couple of developers, Trulia
and Expedia hotels and flights.
Both of them have started using the API to migrate their
existing maps to this new API.
So we're going to listen to what they have to share with
the audience.
MANO MARKS: Probably the best way to learn about the new API
and what it can do is to see these awesome
new features in action.
I've installed the Google Maps Android API Demo app-- that's
a really long name--
FRED CHUNG: It is.
MANO MARKS: --on this tablet as you've been seeing.
And I'll show you the main features of the new API.
The source code for this app is actually part of the Google
Play Services package that you can get with
the Android SDK manager.
We're planning to cover more technical
details in future shows.
But in the meantime, you can check out the code for the
demo app to get a better feel for how the API works.
So you'll see that there's actually a ton of demos here.
And we're going to just show you a few of the really cool
and interesting things that are new in the new Maps.
So here, we have a sample app that shows you
how the camera works.
So because you have this sort of bearing and tilt of the
map, you can also control the zoom and center of the map.
This is something that not only your users can do through
the UI but you can also do programmatically.
So if you'll see here, I'm looking at Sydney.
The Maps team is in Sydney, the engineering team.
So that's why we always have these Sydney demos.
FRED CHUNG: I wonder why.
MANO MARKS: So here I can go to Sydney.
You see this gets this nice, smooth, and
quick transition here.
Also, I can go to Bondi, which is a beach nearby.
And you'll see how it does that nice, smooth animation
but also tilted and zoomed it at the same time
and rotated the map.
FRED CHUNG: It's kind of like the Google Earth experience.
MANO MARKS: Yeah, it is very much like that.
And then if I turn off animation, I can just go
directly there.
So these sort of things you get also different kinds of
animations built in for both zooming and moving in this for
short hops as well.
FRED CHUNG: Very nice.
MANO MARKS: The next thing I'm going to show you is ground
overlays just really quickly.
This is something that users of the JavaScript Maps API are
familiar with.
But you'll see here I've actually overlaid an old
raster image on top of the map.
And along with that, I get this nice
sort of tilting effect.
So this is something you can use your geolocated--
your georeferenced raster imagery.
And then you can do things like control the
transparency there.
It's a great way to showcase old and new data together.
FRED CHUNG: So, Mano, one quick question.
Can you use any arbitrary images?
MANO MARKS: Yeah, you could put my face on your map if you
really wanted to.
Not that anybody would do that.
I would really suggest you not do that.
Because that's going to be a little
surprising for the users.
So let's take a look at markers.
You get new features with markers here.
First of all, we get the standard default info window.
You can also customize the contents of the info window.
So you get a little bit more interesting interaction there.
You can also customize the info window itself.
So you see here it's got these sort of rounded corners.
But not only that, your markers can be draggable.
So here, I'm just dragging that marker.
And as I drag it, I get a on-marker drag end event,
which then you can do something with.
This is a great way for allowing people to collect
data for you.
Or you could use this for positioning in games or
anything like that.
You can provide your own custom icons as well.
And yeah, I think these are great new
features and markers.
Quickly just show you this fun one.
You don't have to use our map tiles if you want.
You can use this as a serving technology for
your own map tiles.
FRED CHUNG: So what are we looking at now?
MANO MARKS: We're looking at the moon.
Google Maps has published tile overlays for the moon.
And as you see, we have these raster images.
And I can do some nice movement around using these
raster tiles.
I can turn them.
FRED CHUNG: It's really cool that you can tap into the
basic infrastructure for manipulating a UI while using
your own overlay.
It would be an ideal tool for game developers, for example.
MANO MARKS: That's right.
And you can do custom tiles, custom tile projections.
You don't have to use the standard Mercator projection.
FRED CHUNG: Nice.
MANO MARKS: Yeah.
OK, polygons.
Polygons are new in this API.
And you can see you've got lots of ways that you can
control how polygons look and feel.
So polygons are basically a line with fill.
You can change the fill hue here.
You can change the fill alpha as well.
You can change the stroke width.
And you'll see you also have nice little holes in your
polygons and a lot of new features as well.
We also have poly lines, which are basically polygons without
the fill in them.
Those give you interesting features, like you can do a
geodesic poly line.
So they match the curvature of the earth rather than a
direct, straight line.
Then finally, I wanted to demonstrate for
you multiple maps.
Now, because maps are now in a fragment--
FRED CHUNG: That's a big win.
MANO MARKS: It's a big win.
So you longer have to extend map activity.
Maps can now be added to any activity.
And you can also add them to fragments.
You can see one of the results of that is you can do multiple
maps in the same view.
FRED CHUNG: That's very cool.
MANO MARKS: So that's nice if you want to do sort of
side-by-side comparisons.
FRED CHUNG: Definitely.
All right, great.
Thanks for demos, Mano.
Now, let's have a look at what some of the early adopters are
doing with the API.
Hello.
We have invited Trulia on air today.
We have two representatives from
Trulia, Stephen and Alice.
Stephen and Alice, do you guys want to do a quick
introduction.
STEPHEN: Sure.
Thank you Fred.
Thanks for this opportunity.
We're here to introduce Trulia.
We have a great Trulia Android engineering team here.
And what Trulia is, first of all to set it up, we are a US
residential property search site.
And mobile is extremely important to us.
Mobile is the fastest growing part of our traffic right now.
It's up over 140% year on year.
And currently is over 30% of our traffic on a weekly basis.
So mobile is very important to us.
And Android, particularly, is a big part of that as well.
FRED CHUNG: That's great.
So you have a tablet app in Google Play store.
Well, you actually have multiple apps.
And I understand that you have spent some time working with
the new maps API.
And let's go ahead and have a look at what you've done with
it, shall we?
STEPHEN: Sure, let's do it.
FRED CHUNG: So I've gone ahead and launched the tablet
version, which looks great.
I'm looking at San Francisco, downtown San Francisco.
I see a bunch of properties, a bunch of expensive properties.
As I'm panning the map around, I notice that you guys have
incorporated the new API.
So you can see the tilting.
As I zoom in closer and closer, 3D buildings begin to
pop up any minute.
And in certain locations you do also have the indoor maps
available from the API, which is awesome.
So as I click on one of the markers, a pop up shows up,
showing me some property.
I clicked on it.
A pane shows up with some more property details.
So that's kind of cool.
STEPHEN: Yes.
This is what users really enjoy about us.
They can look for properties.
They can see photos.
We have big photos, a lot of cases.
And then if they want, they can contact a real estate
agent right from that property page that you're looking at.
FRED CHUNG: That's great.
STEPHEN: So we've really focused on making that a great
experience for them.
FRED CHUNG: Right.
And I notice that you guys have incorporated a couple of
interesting features.
The first one that I'd like to touch on is the layer, custom
layer information.
As I click on the Layer icon, a pop up comes up.
And I'm going to go ahead and click on Crime layer.
Can you walk us through a little bit on how the crime
data layer is rendered?
It looks pretty visually appealing right now.
ALICE: Yeah, we used the new tile overlay the new API
[? provide ?] that we're easily just give the URL of
our tiles and then it will render nicely on the map.
FRED CHUNG: Cool.
And I also understand that there's a feature.
There's a pretty cool feature where you can hand draw an
arbitrary polygon, an arbitrary shape.
And in the app, it's going to do a search based on the
hand-drawn area.
STEPHEN: Draw search, you can draw your own search in the
area you want.
And we really try to focus on giving you the inside scoop.
So not only property details, but crime, as you looked at,
school attendance [? zone, ?]
zip code boundaries, and things around the area that
users are interested in when they're
looking for a property.
FRED CHUNG: Yeah, it's very interactive.
Good job, guys.
STEPHEN: Thank you.
FRED CHUNG: So can you maybe share a little bit more
information on your experience using the new Maps API?
From an engineering standpoint, what sort of
effort is needed?
ALICE: The new app Map API provides a lot of new features
that we were looking for before.
For example, the support maps [INAUDIBLE]
that we no longer need to use a revised version,
[? our own. ?]
We can use the default one.
And the camera and camera [INAUDIBLE]
[? event ?] change is great that we don't need to handle
[? the touch ?]
[? event ?] and figure out if maps [INAUDIBLE] or not.
The custom info window that is kind of
nicely tied with a marker.
So it's great.
Yeah, these are the great features that it's-- the
migration is about a week or two effort to make our app
really stable.
FRED CHUNG: That's great.
You mentioned fragment.
I personally anticipated that fragment would be one feature
that a lot of Android developers
would be excited about.
So that's great.
Do you have a separate phone app and a tablet app?
Or what's your model like?
ALICE: Yeah, we have two form factors, one for X-large
devices and one for others.
So X-large device would be 10-inch tablet and larger.
FRED CHUNG: Right.
But you are using one APK for the two form factors, right?
Got it.
Is this app available with the new Maps API?
STEPHEN: Yes, this app is available as soon as the new
Maps API is public.
This app that you're looking at today will be available.
All of our apps are free.
We actually have three top-rated Android apps.
And this is our main app.
It'll be available as soon as the
Google Maps API is available.
FRED CHUNG: Awesome.
Cool.
So I look forward to seeing you upgrade the other apps to
the new Maps API.
STEPHEN: That will be coming soon.
FRED CHUNG: All right, great.
Thanks, guys.
STEPHEN: Thank you.
ALICE: Thank you.
FRED CHUNG: Hello.
We have invited Dan Lew from Expedia hotels
with us here on-air.
DAN LEW: Hi.
FRED CHUNG: Dan is the Android developer behind Expedia
Hotels and Flights application and the FlightTrack
application.
He is here to share with us some of his experience using
the new Maps API.
I understand that, Dan, you guys have started looking into
the API and have started incorporating the API into the
two apps that I just mentioned, right?
DAN LEW: Yeah.
It's been working out great so far.
It's really jumped past the previous
version of the Maps library.
FRED CHUNG: That's great.
So shall we do a quick walk through of the application?
Let's start with Expedia hotels and flights.
My understanding is that you just recently launched an
update to this beautiful app.
And then you're in the process of updating the map portion of
it with the new Maps API.
DAN LEW: Mm hm.
FRED CHUNG: I'm at the landing screen.
And I'm scrolling through.
And it's what seems to be an infinite list
view of pretty pictures.
And let's get into the hotels portion.
Can you walk us through what's available there?
DAN LEW: Yeah, I mean it's a pretty simple idea, which is
simply that on the hotel side, you can search for a location.
And there is the traditional list view of just hotels.
But if you click the button on the bottom right, it will
switch you over to a map view version of the application.
FRED CHUNG: There you go.
I can see in this demo version, you are using the
vector-based map so that I can twist, and turn,
and tilt the tiles.
DAN LEW: Yeah.
FRED CHUNG: That's pretty cool.
And right now, I'm trying to search for
hotels in San Francisco.
So it brought me to San Francisco with a nice
animation, flyover animation.
So that's something that's supported by the new API.
DAN LEW: Yep.
FRED CHUNG: So as I zoom closer into the clusters of
hotels in downtown San Francisco, I can click on the
markers as you would expect.
And are these custom markers?
DAN LEW: Yeah, we have our own assets for those.
But we also played around with the different hues that you
can build into the app as well.
FRED CHUNG: Do you have an example of a custom view or is
that still something that's in the works?
DAN LEW: I think it's still in the work.
But I did play around a bit with--
there's this adapter interface if you want to create your own
info window pop-ups or info window content.
And I played around with that for a bit.
But I haven't actually used it yet.
FRED CHUNG: OK, cool.
And as I'm panning around downtown for certain retail
stores, it's showing me the indoor map for those
locations, which is pretty cool.
DAN LEW: Yeah, it's really cool to have all the features
that the current Google Maps app has in our own map.
FRED CHUNG: Now that you've taken a look at the API, what
are some of the features that interest you, that you are
excited about?
DAN LEW: I think a lot of the things I'm excited about are
just all the things that, with the old map view, we had to
roll on our own.
So for example, we used to have to make
our own pop-up bubbles.
We used to have to write our own draw routines to lay over
all the lines or whatever we wanted on the map.
And now, all of that stuff is built into the library.
And it's just a lot easier to use.
FRED CHUNG: That's great.
And I notice that as you zoom closer into the map, 3D
buildings start to pop up left and right, which is
kind of cool also.
It gives the user some visual cues of their orientation.
DAN LEW: Yeah, and I mean, with hotels, I feel like the
map's a core part of the experience.
It's incredibly important to see where you are on a map and
what hotels are nearby.
Or if you're going to visit someone else, you want to see
all the hotels that are nearby where they're living.
So an improved map experience really makes a big
difference to users.
FRED CHUNG: Definitely.
Shall we take a quick look at your other application?
DAN LEW: Sure.
FRED CHUNG: FlightTrack I just launched FlightTrack.
I have a saved route.
I clicked on it.
And I have the start time.
And this flight is in progress.
And I clicked into the map view.
It shows me a flight between San Francisco and JFK.
DAN LEW: For this one, for the Expedia hotels, we're mostly
just using markers and info windows.
But here, we're really using a whole array of features.
So for example, it looks like today there's a whole lot of
weather around, kind of, the south belt right now.
So we're using a ground overlay for that.
And actually one of my favorite things, we used to
have to download the bitmap and then add alpha
transparency on our own.
And now, the ground overlay, I can just make it transparent
right from the API itself.
And we're also using poly lines to
represent the flight path.
And actually, one of the cool things there is it supports
geodesic poly lines right out of the box, which is one of
those things that before, we had to calculate by hand all
the different ways of doing the shortest distance on a
Mercator projection.
And now, we just get that in the library as well.
FRED CHUNG: That's great.
It sounds like you're getting a number of features for free
in this update.
DAN LEW: Yeah, a whole bunch of them.
FRED CHUNG: Right.
I'm just looking at the weather information that you
have added on the overlay.
It looks pretty cool.
So Dan, one question is that from an engineering
standpoint, what sort of effort is involved when you
need to incorporate the new API?
DAN LEW: Well, I think initially you need to do a lot
of reading of the documentation because the new
API is really nothing like the old map view.
I mean, for one thing, it's fragment-based.
It's modern.
The whole itemized overlay paradigm is out the window.
It's completely different.
So it took a bit of time to read through all that.
But ultimately, the new library is just so much easier
to use that it really only took, I think, two days to
convert our existing apps to using the new library.
FRED CHUNG: That's great.
So I assume you are planning to launch soon, these apps?
DAN LEW: Yeah, as soon as we get a chance to really update
and polish it and make sure that there's no issues just
lingering around that we haven't tested properly yet.
FRED CHUNG: All right, cool.
I look forward to seeing the updates on Google Play.
DAN LEW: Yeah.
Thanks.
FRED CHUNG: Thank you very much.
DAN LEW: Have a nice day.
FRED CHUNG: All right, thanks.
Bye.
Good stuff.
I wanted to say thank you to our friends from Trulia and
Expedia for sharing their feedback.
So for the developer audience out there, I bet you really
want to check out the new API.
You can get it now by downloading the latest Google
Play Services from your Android SDK manager.
Play around with the API.
And let us know what you think.
We look forward to seeing the kinds of innovation that you
can do with the API.
Thank you.
MANO MARKS: Great.
Thanks.