Maps Live: Animated Ground Overlays and Weather with Google Maps SDK for iOS
Articles Blog

Maps Live: Animated Ground Overlays and Weather with Google Maps SDK for iOS

November 8, 2019

MANO MARKS: Hi. I’m Mano Marks. I’m a Developer Advocate on
the Google Maps API team. With me today is Steve Gray. STEVEN GRAY: Hi there. MANO MARKS: Steve is a
Google Developer Expert. Steve tell us a little bit about
the Google Developer Expert program. STEVEN GRAY: Google
Developer Experts are really experts that Google
has recognized as an expert in certain product
fields, so for me it’s maps. And we go to conferences. We talk at events. We build sample
codes and blog posts about how to use
different products. You can really say that
we’re the go-to gurus for the different products. MANO MARKS: You’ve built an app
using the iOS SDK for Google Maps, and it’s called Synaptic. Tell us a little bit about it. STEVEN GRAY: Synaptic pulls down
data from the UK Met Office. MANO MARKS: The Met Office? Sorry, I don’t
know what that a– STEVEN GRAY: The Met Office is
a government body here in the UK that deal with all
things weather related, so forecasts, they
build models for what’s happening in the
weather on the island and get the data out
as forms of forecast on TV, and the data
out to us developers. MANO MARKS: Great. The app we have running here. Why don’t we go ahead and
take a little bit of a look at it, so that people can
see what we’re talking about? What am I looking at right now? STEVEN GRAY: This is the
precipitation forecast for the UK for the
next few hours, and as you see the
layers are animating across the map and bands of rain
that are coming across the UK. The more red the actual
color is on the overlay, the more rain
that’s in that area. MANO MARKS: This is
the kind of thing that you would see in
TV broadcast at night, or something like
that, and telling you about what’s going on. STEVEN GRAY: Yeah. MANO MARKS: How did
you do this animation? STEVEN GRAY: When the app
starts, if you just load it, it pulls down the latest
forecast and the latest observations for the UK. Then lines up the
images as an animation and then loops
random on the map. So you can see this really nice
flow of images across the map. MANO MARKS: And you’re
using ground overlays. You’re basically
just changing the PNG that the ground overlay uses? STEVEN GRAY: Yeah, that’s right. I basically go away and
fetch up all the images and the animation. And when that’s preloaded, then
just start the animation off, and for every loop
around the timer it will insert the ground
overlay onto the map, and it gives us nice
illusion of animation. MANO MARKS: Cool. What are some of your favorite
overlays that you’ve got here? STEVEN GRAY: There’s two
really awesome overlays here. My favorite is the clouds
and the rain together. And as we fetch the images. MANO MARKS: It does take a
moment to fetch the images, but once it does
it, they’re cached, so they can run through it. And you can see that it’s
actually pretty fast. STEVEN GRAY: You go away
and fetch all the images, so that we don’t have this
broken cycle of animation. We’ve got one infinite loop
of the animation of the latest forecast. You have here the cloud cover
and the rain cover of the UK forecast for the next few hours. MANO MARKS: You can barely
see the UK on there. STEVEN GRAY: Yeah, this
is natural for the UK. We’re always under clouds. It’s a given. MANO MARKS: I’ve noticed
that since I’ve been here. STEVEN GRAY: We have
this layer, which is really nice, because
everything you load this up, it will load up the forecast
for the next 8 to 12 hours. My other favorite is
these observation layers. You have this
infrared observation, and this is a
really nice overlay, because it’s actually the images
that come from the weather satellites that are
looking down all the time. It’s the unprocessed images
that you don’t really get to see on the
weather reports. And as you see, you have
this kind of inverted look where you can see the
clouds cover coming across. Again, you can’t
really see the UK but, when you run the code on
different days– obviously, it’s live data, so
we’re covered in clouds. You can see the
overlay of the UK, and it’s a really good indicator
of whether you’ve actually put the ground overly
on the map correctly when it all lines up
to the [INAUDIBLE]. MANO MARKS: This is
an interesting one. If you take a look
at the rainfall one, you can actually see that
underneath the animated overlays you actually
have, is it a custom map ? Or is it a tile overlay? STEVEN GRAY: It’s a tile overlay
that I’ve created myself. When we’re putting
the ground overlays of the actual
visualization on top of it, it just allows us to remove
the labels for the places, because we don’t really want
to see the labels on the map. MANO MARKS: Right,
so just give them a nice, clean background there. OK. Cool. And again, this is an open
source project, so its up on GitHub. Here’s the link for that. And if you want to explore
the Google Maps SDK for iOS, here’s the link for that. And specifically, if you want
to look at the ground overlay documentation,
you can look here. All right, thanks
for coming in, Steve. STEVEN GRAY: No problem. Thanks for having me. MANO MARKS: Pleasure and
thanks for listening. Bye.

Only registered users can comment.

  1. Can this concept be used for overlay on a regular Google Maps for a desktop?  I don't need it for IOS and it's very difficult to find information for Animated Ground Overlays and Weather for regular Google Maps on a desktop web browser.  Thank you!

  2. Hey guys, 
    I cant integerate the Goolge maps mobile sdk M4B please help me, it always show the Google Maps SDK for iOS (M4B) cannot connect or validate APIKey: Error Code=400 "The operation couldn’t be completed. 

Leave a Reply

Your email address will not be published. Required fields are marked *