JOSH LIVNI: Hi, everybody.
My name is Josh Livni, welcome to Google
Maps Developers Live.
So this week I want to talk to you about a new layer in the
Maps API that lets you render private or public content
that's stored in Google Maps Engine in a
pretty cool new way.
So to get a little bit of context, first I want to show
you here on my screen a demonstration of our Maps
Engine layer, which has been out for awhile, and renders
data sets that are stored in Google Maps Engine.
So what I have here is some watersheds, some reasonably
complex polygons.
Not too many of them, but it could potentially be millions
of features here.
Same general technique.
And the workflow that's going on behind the scenes is this
data is being rendered on our servers as image tiles.
There's a lot of products that sort of use the same approach,
so nothing particularly new here.
And what we can do generally with this approach is we get a
little slightly different cursor as we mouse over.
We can have click events.
Usually it opens an info window.
Here I'm just zooming into that particular feature.
So nothing new here.
That's our Maps Engine layer.
It's cool, lets you display tons of complex data sets.
Very fast.
You'll notice as we zoom in and out it
renders very quickly.
So now let's take a look at our new dynamic Maps Engine
layer, and some of the differences.
So here we have the exact same data set, exact same sort of
general code, except we're calling the dynamic Maps
Engine layer instead of the Maps Engine layer in our code.
And I've added some extra handling.
And some of handling that we can do is take advantage of
new mouse events.
So you'll notice as I hover over, I'm dynamically
redrawing the polygons that I'm getting mouse over and
mouse out events on.
And when I click on a polygon here, what it's doing is it's
loading up another Maps engine layer, a dynamic Maps Engine
layer, excuse me, of the sub
watersheds for a given watershed.
And similarly here as I mouse over, I get different events
getting fired from the dynamic Maps Engine layer, and I can
pay attention to those and redraw.
I can also, if you take a look at the info box on the left,
get some information from the features, and put some
information in there.
And the way that I'm doing that on the back end is I'm
using the Maps Engine API to download some feature
information, and then do a look up.
As I mouse over here I get the feature ID, I do a look up
into the Maps Engine API response, and paint that
information, such as the area of the sub watershed in this
little box here.
So a lot of cool things you can do with this kind of
almost instantaneous redraw.
What's going on behind the scenes here is similarly,
we're rendering tiles, but this time it's vector tiles.
And these vector tiles are kind of optimized for the zoom
level that you're at, simplified and so forth.
So you get a really snappy responses as you zoom in,
seeing all of the data in a nice, kind of small vector
format, and you get this extra interactivity.
So there's a lot of things you can do here.
So just a quick look at our documentation on some ways to
get started.
If you're interested in rendering public content, you
can do that as well.
People who have stored public data sets in Maps Engine, or
of course if you have your own private data, you can use
OAuth, and just make sure that the people that you want to
have access to it can access your data using the dynamic
Maps Engine layer.
The documentation here is under Libraries, under our
JavaScript documentation.
So go to Libraries, Visualization Library, and
then Maps Engine Layer.
And we have some simple examples to
kind of get you started.
You'll notice here the Maps Engine layer, we have just a
basic click on a polygon.
We get kind of our info window.
Scroll down the dynamic Maps Engine layer.
We can redraw on the fly with different kinds of effects
just on hover.
So, pretty cool.
We look forward to seeing what kind of stuff
you build with this.
Let us know on feedback below this video,
or on Google+ Twitter.
We love to see the kinds of things you guys are doing, and
hope you enjoy the new dynamic Maps Engine layer.
Until next time, I'm Josh Livni, have a great week.