Maps Shortcuts: Indoor Maps in the Google Maps SDK for iOS

Maps Shortcuts: Indoor Maps in the Google Maps SDK for iOS


Mano Marks shows you how use the Google Maps SDK for iOS (http://goo.gl/8n3lV) to create a map that has indoor floor plans and how to create a custom level picker in your app.
Closed Caption:


Hi, I'm Mano Marks.
I'm developer advocate on the
Google Maps Developer
Relations team.
I want to welcome you to this
week's Google Maps shortcut.
In this episode, we'll be
talking about the Google Maps
SDK for iOS and, specifically,
I'll be talking
about indoor maps.
Google Maps SDK for iOS allows
you to both add indoor maps to
your Maps application and
control what level is shown
within the building when you
are viewing the different
buildings in the SDK.
This is a pretty exciting
feature and it
could be pretty powerful.
For instance, if you wanted to
have a application that showed
special offers in a department
store, then you could choose
which level to show somebody and
put a marker directly in
that location.
I'm going to get into the app
in a moment, but I wanted to
mention that at Google I/O in
2013 we did do a tech talk on
indoor maps and, specifically,
how we collect that data and
how we locate people
within Google Maps.
So you might be interested in
checking that one out, and
here's a link to that video.
OK.
Let's take a look at indoor
maps in the SDK.
You can see here we've
got a list of demos.
I'm going to select Indoor and
you'll see the indoor map.
This is actually Moscone Center,
and you'll see this is
level one here.
And as I move through it, and
the different levels in the
level selector it changes
the floor.
That's on by default.
No additional code is required,
just as soon as it
gets close to a building it
decides that that is the
building that's in focus,
then it will
turn on a level selector.
OK.
Let's take a look at
the Indoor with
Custom Level selector.
So you can see here there's no
default selector, but there is
this Custom selector here in the
application, in the demo.
So as I, again, select different
points within the
selector, it changes
the floors.
And interestingly, as I move
to a different location,
you'll see it's chosen
a different--
it now decided that a different
building is in focus--
it changes this level selector
here to reflect that.
Let's take a look at the
code for how this
actually comes about.
OK.
You can see here I'm creating
my view controller.
I've got the Customer Indoor
View Controller.
And I'm creating
three objects.
I'm creating the map view--
which you would do anytime
you're using the map.
I'm using a UI Picker View.
It's a standard one, it's
not the Google Maps one.
A UI Picker View is a convenient
way to demo this.
You can, of course, create
your own view if
that's what you want.
And then I have an array,
levels, which is just the
different floors of
the building.
OK.
So now on viewDidLoad I'm
creating my map normally and
setting it within the view.
And you can see there
the camera position.
Same camera position.
And there's three lines
here that are
particularly important.
The first one is I'm turning
the Indoor Picker off.
That's because I don't want
to use the default one.
I want to use the custom one
that I'm going to show you.
And I am turning on Indoor.
IndoorEnabled = YES.
This is actually on by default,
but this is just to
show you that you can do
this programmatically--
turning on Indoor, turning
off Indoor.
And then, importantly, I'm
setting the Indoor Display
delegate to Self.
That's basically so that any
indoor events gets handled by
this view controller.

OK.
So here's what happens when the
active building changes,
which happens as soon as the
view is instantiated, and then
also when you're
moving around.
This is the
didChangeActiveBuilding event.
This is what happens, this is
why we did the delegate.
OK.
So we create a levels mutable
array, and then we add objects
to that array from
building.levels, which is the
building comes along
with the event.
When it gets fired, you
get building back.
It's an object within the SDK.
And that has levels as its
primary purpose there.
And then we then take the levels
array that we created
at the beginning when we
instantiated the view
controller.

We copy the levels
array into that.
And then we have the picker
reload all its components.
We basically are saying, there's
something new here,
reload the picker.
So that's particularly
the code that
you need right there.

And then this here just shows
you how the picker actually
selects the level, the
text for the level.
It's basically going through the
levels object row by row
and saying what's
the level name.
Now you may have noticed that in
the default Indoor demo the
name of the levels was a short
name, whereas there is a
longer name in the custom
level picker demo.
That's because each level has
a long and short name and
we're using-- by doing
.name, we're doing
the long name there.
OK.
So then the next thing that we
look at is how it sets the
active level.
So when this is just an event
that fires when you select a
row in the picker, it
changes the level.
So you're just doing
Set Active Level
on the Indoor display.

And then finally, we have code
that, if you change the level
through some other means, it
will keep the picker in sync
with the current level.
So that's not 100% necessary for
this particular demo, but
it's a useful thing to always
do just in case
something else happens.
OK.
So if you have any more
questions about the Google
Maps SDK for iOS, take a look
at the documentation.
We also have a playlist of
videos from the Google Maps
SDK for iOS.
This is from our Google Maps
shortcuts and other episodes
that we've been doing here on
"Google Maps Developers Live."
And of course, if you have any
additional questions, you need
any help, as always, go on
over to Stack Overflow.
There's lots of people
there who can help
you with your questions.
Thank you very much.
That's all for now.


Video Length: 08:16
Uploaded By: Google Developers
View Count: 9,853

Related Software Products
Map View SDK
Map View SDK

Published By:
Offlinesoft

Description:
The Map View SDK is available as a stand alone Developer kit. The Map View SDK offers a Direct DLL method to draw multi-type maps by region within your application. The satellite maps and the street maps will be easily used as background maps within your application such as GIS. The Map View SDK is not a Royalty Free tool kit and a limited number of Licenses are included for end user distribution with your application with the SDK product you purchase, with additional bulk license packs ...


Related Videos
Map View - Current Location in Swift - Xcode 7 iOS 9 Tutorial
Map View - Current Location in Swift - Xcode 7 iOS 9 Tutorial

In this tutorial we learn how to display the users current location on a map view.​ Sponsor: Get the iOS 9 Developer Course with Swift 2 and Xcode 7! http://bit.ly/1Mrsifz Source Code: http://bit.ly/22GmWoa To Subscribe To Vea Software Weekly: http://www.veasoftware.com/newsletter To Support Vea Software: http://www.veasoftware.com/donate Social Accounts: Twitter: ...
Video Length: 11:49
Uploaded By: Vea Software
View Count: 44,585

Swift: How to integrate Google Maps SDK with Cocoapods to Build a Vacation App
Swift: How to integrate Google Maps SDK with Cocoapods to Build a Vacation App

Today, we'll go over step by step how to integrate Google Maps SDK for iOS using Swift and Cocoapods to build a Vacation App. We'll go over how to set the map view centered on the interesting places of San Francisco, CA. In addition, we'll place markers on these spots. Next, we take a look at how to animate the camera from one location to then next. Finally, when we are completely done, we'll have created a flyover application that explores some of my favorite spots the city has ...
Video Length: 26:17
Uploaded By: Lets Build That App
View Count: 20,944

XCode 5 Tutorial Map View Part 1 - Displaying Map Views - Geeky Lemon Development
XCode 5 Tutorial Map View Part 1 - Displaying Map Views - Geeky Lemon Development

Free Crash Course: http://www.iosdevelopmentcrashcourse.com Source Code: http://www.geekylemon.com/#!map-views... Hey guys in this tutorial i will be showing you how to make a map view with advance feature to locate your location and change between hybrid satellite and map views i hope this help you out in your projects and if there anyway you think i can improve my tutorials or want to request one just tell me via comment or pm and subscribe please leave feedback on ...
Video Length: 10:42
Uploaded By: GeekyLemon
View Count: 19,049

Maps Live: Google Maps SDK for iOS Version 1.4
Maps Live: Google Maps SDK for iOS Version 1.4

The latest version of the Google Maps SDK for iOS, version 1.4, comes with great new features such as Street View, Indoor Maps, and a new look and feel. Mano Marks and Luke Mahe from the Google Maps Developer Relations Team demo these features for you and talk about how you can add them to your application. hr / bClosed Caption:/b MANO MARKS: Hi, I'm Mano Marks. LUKE MAHE: And I'm Luke Mahe. MANO MARKS: We're on the Google Maps ...
Video Length: 01:59
Uploaded By: Google Developers
View Count: 13,901

Map Padding with the Google Maps SDK for iOS
Map Padding with the Google Maps SDK for iOS

Map padding in the Google Maps SDK for iOS (http://goo.gl/8n3lV) allows you to change the visible region of your map, so that your controls, logo, and copyright notices are all aligned with your view. In this video, Mano Marks explores the benefits of map padding and how to implement it in the SDK. hr / bClosed Caption:/b Hi, I'm Mano Marks. I'm a developer advocate on the Google Maps team. In this video, I'm going to show you how ...
Video Length: 02:16
Uploaded By: Google Developers
View Count: 11,359

2D/3D Indoor Map SDK for iOS and Android
2D/3D Indoor Map SDK for iOS and Android

This video shows the indoor map SDK by Heidelberg Mobil International GmbH. The Deep Map™ SDK gives you a nice view of an area with different buildings. You can pitch, zoom and click the 2D/3D multifloor map. Routing from one room to another can be shown on the map. Zoom into floor level to see more details from the building. The 2D/3D map can be used for iOS and Android devices. An also interactive 2D map can be used for websites. Find out more at: www.deep-map.com
Video Length: 01:30
Uploaded By: Heidelberg Mobil
View Count: 9,028

iPhone SDK Tutorial Part 1 TabBarController showing WebView and MapView
iPhone SDK Tutorial Part 1 TabBarController showing WebView and MapView

Here we develop an application presenting multiple views using using a tab bar controller. The tab bars presents a web view and a map view. We also add icons to the tab bar items. You can download the source code for the app here: http://cloud.github.com/downloads/car... hr / bClosed Caption:/b well hello I the system with burkhart is a bit and this is my first tutorial on your iPhone SDK development and the topic recovering ...
Video Length: 09:35
Uploaded By: carticipate
View Count: 9,008

iPhone SDK Tutorial   Part 4 TabBarController showing WebView and MapView
iPhone SDK Tutorial Part 4 TabBarController showing WebView and MapView

Here we develop an application presenting multiple views using using a tab bar controller. The tab bars presents a web view and a map view. We also add icons to the tab bar items. The video is a lengthy, and goes into more depth with explanation of what the code does. Not just a how to, but also a how so. You can download the source code for the app here: http://cloud.github.com/downloads/car... hr / bClosed Caption:/b okay so we're gonna call ...
Video Length: 07:59
Uploaded By: carticipate
View Count: 7,247

Copyright © 2025, Ivertech. All rights reserved.