Under the hood of Google Maps 5.0 for Android

Friday, December 17, 2010 | 10:50 AM

(Cross-posted from the Official Google Blog)

Yesterday we introduced Google Maps 5.0 for Android with two significant new features: 3D interaction and offline reliability. In order to create these features, we rebuilt Maps using vector graphics to dynamically draw the map as you use it. Building a vector graphics engine capable of achieving the visual quality and performance level you expect from Google Maps was a major technical challenge and enables all sorts of future possibilities. So we wanted to give you a closer look under the hood at the technology driving the next generation of mobile maps.

Vector graphics
Before diving into how Maps uses vector graphics, it may be helpful to understand how maps were created before. Previously, Google Maps downloaded the map as sets of individual 256x256 pixel “image tiles.” Each pre-rendered image tile was downloaded with its own section of map imagery, roads, labels and other features baked right in. Google Maps would download each tile as you needed it and then stitch sets together to form the map you see. It takes more than 360 billion tiles to cover the whole world at 20 zoom levels!

Now, we use vector graphics to dynamically draw the map. Maps will download “vector tiles” that describe the underlying geometry of the map. You can think of them as the blueprints needed to draw a map, instead of static map images. Because you only need to download the blueprints, the amount of data needed to draw maps from vector tiles is drastically less than when downloading pre-rendered image tiles. Google Maps isn’t the first mobile app to use vector graphics—in fact, Google Earth and our Navigation (Beta) feature do already. But a combination of modern device hardware and innovative engineering allow us to stream vector tiles efficiently and render them smoothly, while maintaining the speed and readability we require in Google Maps. Just try it out and see for yourself!

See the difference between image tiles (left) and vector tiles (right) tilted to show 3D buildings.

One map, many perspectives
Using vector tiles instead of image tiles gives Maps the flexibility to re-draw the same map from different perspectives using the same set of data. Zooming is one example of this at work. If you magnify an map image tile by 2x, lines such as roads and text would get twice as wide and appear blurry. As a result, we had to constrain Maps to 20 fixed “zoom levels,” each one twice as close as the last. Every time you zoomed in further, you’d need to download a completely new set of image tiles. It took time to load new data over a mobile data connection, and would fail when you lost your connection in a subway or large building.

Compared to image tiles (left), vector tiles (right) keep lines and labels crisp as you zoom.

With vector graphics, you no longer need to “round” to the nearest zoom level and then download all the tiles for that level. One vector tile has the underlying vector data (or blueprints) to draw the map at many different levels of scale. So when you zoom, the map stops when your fingers stop, and roads and labels always stay crisp. This same technique powers the new 3D map interactions: tilt, rotate and compass mode. Just like with zooming, Maps uses the same vector data to draw the map from any angle or direction as you tilt or rotate.

We can also display entirely new levels of detail that weren’t possible with flat image tiles. For example, in the 100+ cities where we have 3D building data, each building is drawn in 3D using a polygonal building footprint and heights for different parts of the building. And with tilt and rotate, you can see them from a variety of different angles.

Reading the map
Just like other map features, labels are dynamically drawn so they continue to face you and stay legible if you rotate the rest of the map or use compass mode. Maps also “chooses” the best labels to show you based on several factors. You’ll notice labels fade in and out as you interact with the map so that the most useful ones appear and the map never gets too cluttered.

See the difference between rotating maps with static labels (left) and dynamic labels (right).

Vector graphics also allow us to draw additional data on the map more clearly. For example, traffic or transit lines no longer block the labels beneath them. We can also draw the same map in different styles — like “satellite view” where the roads are translucent over aerial imagery, or Navigation’s “night mode” where a darker palette helps your eyes adjust quickly in the lower light.

Previously, map features like labels and traffic could conflict (left) instead of blend seamlessly (right).

Offline reliability
Vector graphics also enable another significant new feature: the ability to continue viewing maps even when you have poor—or no—network connections. Because each vector tile works across multiple zoom levels, it requires more than 100 times less data to view maps across all zoom levels than before, allowing Maps to cache much larger areas of the map on your device.

With this first version, Maps proactively caches map data for the places you use Maps the most—where you’re actively using it as well as places for which you search or get directions. Then when you’re plugged in and connected over WiFi, caching happens automatically. Near your frequent places, you’ll get detailed vector tiles for city-sized regions so you can see every road labeled. Further away, you’ll have less detail but will typically have towns and highways labeled for miles. We’re continuing to work on these algorithms, so you’ll see improvements over time.

Offline rerouting
With Google Maps Navigation (Beta), you’ll also see the benefits of additional caching with offline rerouting. This feature is only possible because Navigation caches not only map data but also data like turn restrictions for the areas surrounding your route. You’ll still need to be connected when you first start a trip to download and cache your route. But this way, even if you take a wrong turn after losing your connection, Navigation can use the cached data to get you back on your way. We will be rolling this feature out gradually over the next few weeks.

This is just the start, and we’re really excited about all the possible ways to use vector graphics technology for the next generation of Google Maps. So please stay tuned!

Update (12:47pm PST): Tweaked the description of the difference between image maps zoom levels.

47 comments:

Knowledge. C. Ker said...

These are awesome!

Are these (Vector Graphics) available as API's for other uses?

Sir Brian said...

I have a Motorola Droid X with Android 2.2.1, and an Incredible with Android 2.2.1, and I'm in Atlanta, GA. I cannot get any 3D buildings on either phone, anywhere in Atlanta. What are the circumstances under which it should work? Must I be outside with GPS on? Or just outside? Or should I be able to view the 3D buildings from inside too? I go to the maps, zoom all the way in, and pan around with 2 fingers, and nothing happens.

DuDe said...

Great news for GMaps...one small thing that I'd like to see...a few words in the 'Manage Applications' section: "move to SD card" ;)

Pleeeeease! :)

Frank Tobin said...

I noticed that the maps program has been described as pre-caching only when connected over WiFi. I would recommend also pre-caching when the phone is charging.

Vagif said...

Great job! Thank you guys!

Felix A. Vega said...

Damn! I wish I had studied programming so i could work at G...

Matthew said...

I'm loving this update! Google Maps 5 looks great on my Droid X.

satish said...

This comment has been removed by the author.

satish said...

i downloaded google maps 5 but cant get the vector graphics. Using HTC magic on cyan 6.1.1 froyo in India

Karl said...

I think a much better description would be that maps 5.0 downloads the lines that make the map rather than pictures of the lines.

What I, as a developer, was hoping to read was how the vector "tiles" are handled. From playing around with the app, it looks like it's pulling down vector tiles for at least two zoom levels plus buildings but the data sets fit into each other. I was hoping for a more technical explanation of how the data is divvied up.

Kudos on the release. I work in NYC next to grand central on the 30th floor and we had half the office comparing skyline versus phone and spinning in circles.

sathya said...

Awesome job guys!

Please consider adding voice action support inside navigation so I can just hit the button and say "call", "email", "listen to", or "reroute" without having to exit out of the app and return to navigation once done.

Luke Hutchison said...

Awesome. Can you please use the turn restriction data to draw small "do not enter" signs (red circle with white bar) at the exits of one way streets when you're zoomed in on the map? I was following directions the other day, got stuck in traffic, and saw on the map that there was a side street I could take that would get me around the congestion. However at that zoom level, there was no one-way arrow drawn on the map. So I proceeded to turn down the street and discovered it was one way after doing so.

Luke Hutchison said...

I hope this can be reimplemented in Javascript + WebGL for the browser client.

Mital said...

Simply awesome, I guess my voice is heard by you people :)

Offline and Vector maps!!

Thanks for this open Eco-system.

RMK said...

Cool, but for me it looks that on Android 1.6 maps in Google Maps 5.0 are still in old format, not new :-)

Pavel Antokolsky aka Zigmar said...

I can't find any info on the regions new Google Maps available at. Is there a list of countries the app is available at? I'm asking because I have an HTC Desire Z (running 2.2) in Israel network and the app is not on the market.

Spencer said...

Awesome sauce on my T-mo MT4G (2.2)

KEN said...

Awesome! Now if I can get it to stop freezing force closing and rebooting in nav mode on my dx,I would be extra happy.

KEN said...

Awesome! Now if I can get it to stop freezing force closing and rebooting in nav mode on my dx,I would be extra happy.

Not Quite Lightning McQueen said...

So, is this only going to ever be rolled out to Android?

Will this become a webapp for mobile? or will you develop downloadable apps for 3rd party phones.

I'm a fan of Android, but haven't made the jump yet and may not until my carrier has some hardware I like better than the current hardware they offer now

jp3dro said...

Hey! What about iPhone?

Martin said...

One feature to tweak is navigating between Latitude contacts. In the old version, the same zoom level was used for each contact.

The new version zooms in way too much to be useful. I'm frequently taken to a contact with just a gray background because they're too far away from a road.

Dell said...

Hey Guys... Thanks for the great work on this new app! Problem: I do not get 3D buildings in my map. I am in Baltimore. Is that currently unavailable?

sathya said...

@Dell I am in Baltimore myself and I can see the 3D maps for the downtown. And it only works for downtown.

Erick said...

The amount of time and effort you guys put into this application is beyond amazing. It is the most used app on my phone, by far. This new set of features you've been working on are absolutely wonderful! Thanks!

nullity said...

@Frank: Check under Cache Settings-> Prefetch on mobile :)

fdsgrewyfgr said...

I think it's important you add non-multitouch ways of tilt/rotate (especially rotate) for phones which don't support those features (ie practically all Android phones).

Garry said...

And why is it so important to have 3-D rendering of buildings.??.I fail to see how this feature helps me get to where I'm going....Al this fluff and yet Google navigation still doesn't have a way to follow a modified custom route created in Google "My Maps"

D said...

Can't find 3D buildings anywhere. HTC Desire 2.2 (Original HTC Sense). Help here?

Santiago Gala said...

There is a negative side in the change: I can't read the captions in the app in android now, and I used to be able before.

The font used for captions is not configurable and way too small for my current eye sharpness. :(

Could you please help a bit on accessibility by adding a configurable option or just making them about twice as tall?

TIA

jramskov said...

Offline data caching will still not be truly usable - data fees for foreign countries are insane here in Europe. If I am to drive from Denmark to Spain, I need to be able to cache the maps for the whole trip before starting.

To be able to do that the app should be able to be stored on the SD-card!

Until then, you'll not replace dedicated navigation apps/gadgets.

Other than that, it's an awesome update!

Vagif said...

Also I just tried to play with 'caching' - it's still impossible to get driving directions without data connections :(
Even if you just trying to point the destination on map. I'm so sad... :(

Grove said...

Google Maps 5.0 is a great release with very impressive new features. But I have a critical issue with the font size.

The font size of the street names are fine when you're not driving.

However, when you're in the car driving, the street name fonts are now much too small with this latest release.

Having to keep your eye off the road for an extra couple seconds, trying to read the name of a road in font that is too small (I even have the larger EVO screen), is very dangerous.

I can not overstate how important a larger font size is for driving safety.

Please do the right thing and enable the option of having bigger fonts. Google Maps has been amazing, and I want to see Google Maps continue to be the ultimate tool for navigation.

Thanks for all the great work.

Doctor Shmulik said...

Is there a support to foreign languages yet? More specifically, Hebrew?
Also, are there maps of Israel available, in any language?
Thanks.

Satish said...

Really the app is super duper good.. But if anybody in google can stand up and talk about the fragmentation of android.. that would clear the air. Many people dont know y there phones dont have the 3d maps.. one of them is me :)

DaveSonnen said...

Amazing achievement! Do the individual features have a persistent feature ID that can be used to attach other data to the feature? (That would be a TOID to Ed Parsons.)

Sameer Agrawal said...

When are we going to see this for Nokia?

Hugo said...

Nice of Google to catch up, by implementing and promoting this technology!

However, correct me if I'm wrong, but isn't Nokia Ovi Maps already vector-based, if that's what you meant? Sure seems so on ny N8, with v3.06 (& map version 0.2.41.123).

Also, there are other mapping companies providing vector-based mapping technology.

Nataraju said...

Hi I have a samsung galaxy with android 2.1 version. is maps 5.0 not compatible with this android version . I canot see the compass or offline feature even after updating the software . ANy help is appreciated

kenyan said...

i got a HTC desire. I cant do the manual 2-finger map rotation...
pls help!
psedani@gmail.com

travisn000 said...

I like the updates in the latest, but I have one "feature" that I would really like for navigation...


It would be REALLY nice to be able to zoom and manually drag to modify a route on my mobile from the "Route Info" screen, similar to how it is done when getting directions from the google maps website.

Thanks!

Siva Nair said...

i am not getting the state or country borders after the new update on the satellite layer. i get it only on terrain layer.

HYM said...

The font is very small on my Galaxy I5801, and is difficult to read. Is there any way to fix this?

Micah and Katie said...

This is all very cool stuff!! When will we see this stuff on the regular old web?

Igor said...

Please allow to move google map application to sd card... It's crtical for most phones.

digitpr@gmail.com

helia said...

Google maps navigation is a great & useful product,
I often uses google maps in my Symbian E 72 phone to search the best routes and always get good results, but annoyed because of the maps software never uses the compass and map direction is set as per phone screen, whereas it should be as per my direction on the road. So sometimes i am travelling from upside of screen to downwards, and sometimes from left of screen to the right.

Still Google maps software is good.

and i am waiting if google launches google maps navigation for symbion.

And alsmost every person having 2G mobile connection have the wish to get google maps downloaded into there phone and navigate without a GPRS or EDGE connection.

helia said...

Google maps navigation is a great & useful product,
I often uses google maps in my Symbian E 72 phone to search the best routes and always get good results, but annoyed because of the maps software never uses the compass and map direction is set as per phone screen, whereas it should be as per my direction on the road. So sometimes i am travelling from upside of screen to downwards, and sometimes from left of screen to the right.

Still Google maps software is good.

and i am waiting if google launches google maps navigation for symbion.

And alsmost every person having 2G mobile connection have the wish to get google maps downloaded into there phone and navigate without a GPRS or EDGE connection.