Placeholder Image

Subtitles section Play video

  • Alami: Hello, everybody, and welcome

  • to "Secrets and Surprises of the Google Geo APIs".

  • My name is Ossama Alami. I'm a developer advocate

  • on our Geo Developer Relations team,

  • and I'm here today presenting with Aaron Jacobs,

  • who is a software engineer on the Maps API team.

  • So what do I mean when I say

  • "Secrets and Surprises of the Google Geo APIs"?

  • Well, what I want to do--

  • what we want to do in today's session is give you,

  • firstly, an overview of your options as a developer

  • when you think about Geo, Spatial,

  • and Geospatial APIs at Google,

  • and then go into some specific features of the Maps API,

  • the Earth API, Fusion Tables, our web services,

  • and the Static Maps API, to highlight some features

  • that you may not know about, some features

  • that you may have seen but don't know how to use,

  • and give you an idea of what's new,

  • and some exciting features.

  • So we'll start with the overview.

  • When you think of Geo at Google, people typically think of

  • the Maps API Version 3, or the Maps API,

  • the JavaScript Maps API.

  • Our JavaScript Maps APIs are now active on over 600,000 sites,

  • and it is our primary mapping API,

  • and what you typically think of when you think of Maps at Google

  • as a developer.

  • But we have more than just these,

  • what I'll call user-facing APIs, these mapping APIs.

  • There's the Earth API, which we'll talk about today.

  • This lets you embed Google Earth and a web page

  • and has a JavaScript API you can work with.

  • There's a Maps API for Flash,

  • for any action script developers in the audience.

  • We have a Static Maps API, which we'll also talk about today.

  • And then for Android and IOS devices,

  • we have a native SDK, that you can use for mapping

  • if you're building a native application.

  • But there's more than just these user-facing APIs.

  • There's a suite of developer tools,

  • supporting APIs within Geospatial at Google,

  • that support you as a developer in building these applications.

  • There's our web services, Fusion Tables,

  • both of which we'll talk about, KML, which is an open standard

  • for representing geospatial data,

  • SketchUp, which is a tool for 3D modeling,

  • and you can then take those models

  • and put it on Google Earth,

  • and then Earth and Earth Pro themselves,

  • which are client applications that you can use

  • to visualize your data

  • as well as work with certain data formats.

  • But there's more to it.

  • Google has over 100 different APIs and developer products,

  • and lots of them that you may not immediately think of

  • actually have a notion of place,

  • a notion of location or some geospatial aspect to them.

  • You can get a user's location using the Latitude API,

  • geotag imagery using Panoramio and Picasa,

  • or geotag videos with YouTube API,

  • updates using the Buzz API,

  • and then there's some developer tools,

  • if you are an organization or a developer

  • that has lots of geospatial data, you know,

  • satellite images yourself, you can use Earth Builder

  • and Earth Enterprise to work with and visualize that data,

  • and then tools like Refine and BigQuery,

  • that don't necessarily have a specific geospatial application,

  • sorry, a specific geospatial feature--

  • but they are tools that you can use to work

  • with geospatial data sets, and then query them,

  • or refine that.

  • So that's sort of a very quick, broad overview

  • of what is available to you as a developer

  • when you think of Geospatial at Google.

  • And we'll go right now into some really exciting features

  • of Maps API Version 3--

  • again, some features you may not know about

  • and some features that are brand-new.

  • First, I'll start with an overview of the Maps API.

  • We released Maps API Version 3 at last year's I/O, out of labs.

  • Now if you're-- and we deprecated Version 2.

  • Now if you have an active Version 2 site,

  • I don't want you to worry.

  • We have a 3-year deprecation policy.

  • But I hope some of the things you see today encourages you

  • to switch to Version 3,

  • because that's where our active development is,

  • and that's where all of our new features are built upon.

  • The advantage of Version 3 is also that it was built

  • from the ground up to be both a desktop

  • and a mobile web-mapping API.

  • So in addition to support and the mobile browsers

  • for Android and Safari, we also support Blackberry 6 devices,

  • and the Samsung Bada browser,

  • and then the standard desktop browser support as well.

  • You'll notice IE 6 isn't listed here.

  • While we--while the maps-- thank you.

  • While the Maps API will work in IE 6 and will not break,

  • there are certain features that will--

  • they'll degrade well, but they won't be available to IE 6.

  • But you can rest assured that your map will continue to work

  • and function with Internet Explorer 6.

  • I said "loads of features". Here are just some of them.

  • The things in blue are some of the things

  • that we're going to talk about today.

  • As you can see, there's more to it than just a map and markers.

  • You can do so much more with the Maps API.

  • And the first thing I want to talk about

  • is 45-degree imagery.

  • So this 45-degree imagery, you'll notice

  • I'm looking at an angle, an oblique angle.

  • If I zoom out-- this, by the way,

  • is Google's headquarters in Mountain View, California,

  • which is about 40 miles south of us here--

  • if I zoom out, I have the standard satellite imagery.

  • Now, I have the smooth transition as a user

  • when I zoom in to switch to a 45-degree imagery,

  • and right now I'm looking north, which we'll call 40--

  • which we'll call, sorry, zero degrees.

  • I can look east at 90 degrees, 180, 270, and back to zero.

  • And this is really high-resolution imagery,

  • so you can see as I zoom in, you get a lot--

  • a lot of detail, more than what you would get

  • with just satellite maps.

  • And as a user, I can turn off 45-degree imagery,

  • or go back and add labels.

  • We have an ever-increasing list of cities

  • that's available worldwide.

  • So I was gonna show you Santa Cruz,

  • which is just further south of us here,

  • and we also have Venice, Italy,

  • as well as a large, ever-increasing amount of cities

  • available globally.

  • And so what's the code look like

  • to enable this 45-degree imagery?

  • It's not enabled by default for the Maps API,

  • but it's really, really simple, and this will be a common theme

  • in this presentation.

  • The code to enable these features

  • is actually really, really simple, really easy.

  • Only a couple lines of code, and you can have a world

  • of new possibilities and features in the Maps API.

  • So I simply set the map to-- set, on the map,

  • call "set tilt," pass in "45" for 45 degrees,

  • and this enables 45-degree imagery,

  • so when a user zooms in at an appropriate zoom level,

  • it'll naturally switch to that 45-degree imagery.

  • And then to reset it,

  • if I want to disable satellite imagery,

  • I just call "map.set tilt to 0."

  • And if I want to programmatically

  • set the heading,

  • I just call "map.set heading," and pass in one of those--

  • one of those degrees.

  • Another feature that is unrelated to 45-degree imagery,

  • but I do like to demo with 45-degree imagery,

  • because it really gives you an idea of the surrounding area,

  • is this overview map control.

  • So this, I can move the box either in here,

  • or as I pan, the overview map control will update,

  • and if I go back to map, it'll switch to map.

  • This gives me a higher perspective,

  • a zoomed out perspective of where I am looking at,

  • so the user can really understand the location,

  • and this will collapse or expand.

  • So the code to this is, again, very, very simple.

  • When I create a map, I pass in "map options."

  • If I want the overview map control,

  • I just pass in "overview map control true,"

  • and if I want it open by default,

  • I pass in an overview map control option,

  • and I say "opened equals true."

  • A new feature in the Maps API which I really like

  • is marker animations.

  • We have two animations that we support.

  • You can see those markers dropping.

  • There's the drop animation, and there's--

  • as I move this marker, we have draggable markers as well.

  • You can see the marker drops and animates.

  • This makes it a little bit more of an interactive experience

  • for the user, feel like they're actually performing an action,

  • and confirmation that it worked,

  • because they see the animation.

  • And then we also have the ability

  • to make all the markers bounce.

  • I really urge you to use this feature with caution,

  • because a little bit is fun.

  • Too much is a little annoying.

  • We'll leave those bouncing.

  • When I create a marker, if I want to pass in an animation,

  • or if I want to animate it, during creation of the marker,

  • I just pass in the animation option here

  • and I set the animation that I want.

  • In this case, "drop."

  • The other animation we support is "bounce."

  • If I've already created a marker and I want to set an animation,

  • I just call marker--

  • on the marker I call "set animation"

  • and I pass in the animation that I want.

  • And then if I want to clear the animation,

  • just call "set null"-- sorry, "set animation,"

  • "pass," and "null."

  • So there's been lots and lots of improvements to markers

  • in Version 3 of the Maps API very recently,

  • including many speed improvements.

  • If you want to learn more about this stuff,

  • you should go to the session entitled "Speedy Maps"

  • which is 10:45 A.M. tomorrow.

  • Layers is another feature of the Maps API

  • that you may not know about.

  • This enables you to very easily add additional data

  • on top of the map.

  • We support various types of layers.

  • The first UM I'm going to demo-- Geo RSS--

  • let's you consume a Geo RSS file or a service

  • and then easily display that on the map.

  • In this case, we're hitting the Flickr API

  • to get geotagged imagery of our tech writer's dog

  • across North America.

  • And then the other way that you can get your data

  • on top of it, on top of the map very easily

  • is to use KML.

  • And in this example,

  • I'm just loading KML for transit lines in Chicago.

  • So the other examples here are more using Google's data

  • and showing that on top of the map.

  • In this case, I'm showing traffic in Chicago.

  • Every time I practice this,

  • this highway has always been red,

  • so I don't know what's going on there.

  • And then, bicycling-- this changes the view of the map

  • and then highlights bicycling routes,

  • roads that are known to be good for biking,

  • and roads with bike paths.

  • You can see, as a bicyclist, I can get a really good idea

  • of what's easy to bike through in Chicago.

  • And then, Panoramio--

  • I talked about Panoramio briefly earlier.

  • Panoramio is an image-hosting site

  • that has exclusively geotagged imagery,

  • and we've added a Panoramio layer,

  • and it's more than just pulling in imagery.

  • You can see here, I get a good idea

  • of user-contributed images of Chicago,

  • but I can also filter by either a specific user--