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 graphicsBefore 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 perspectivesUsing 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.

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 mapJust 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 reliabilityVector 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 reroutingWith 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!

47
comments:

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.

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.

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.

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.

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.

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!

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"

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!

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 :)

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

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.

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.

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.