Our road trip has just begun and we already have a lot to share about our Code the Road bus. The bus is a mobile showcase of some of our most innovative customers, applications and websites that harness the power of Maps and location. If you’re in San Francisco, stop by Moscone Center where can experience first-hand what we’ll be featuring on the road. The bus is across from Moscone West at the corner of 4th Street and Howard Street—we’re outside the venue, so you don’t need an I/O registration get on the bus, so come down to visit!
SUGARBEAR, the name given to the bus by its original owners, is a 1959 PD-4104 General Motors Coach, rebuilt from the ground up in 1978. It measures approximately 35’ long by 8’ wide with a Detroit diesel engine outfitted for bio-diesel.
Here’s what we have on the bus:
Visitors are able to test-out the Android Auto navigation system first-hand and while on the road we will be utilizing Android Auto to keep us headed in the right direction.
Our Android Wearables demo wall includes a giant model watch on our Android robot arm, removable android watches for trying on, and an overview of the wearables features.
We highlight six of our location innovator customers and their interactive applications powered by Google Maps APIs. Visitors can demo applications from iFit, PicsArt, Harley-Davidson, Hilton Hotels, The Weather Channel and Walt Disney World Resort.
Toward the back of the bus, the Street View Treks demo, complete with a Trekker backpack with Street View camera, gives visitors a hiker’s view of the trails through an 80” monitor with Street View Treks imagery. And, even Street View racoon is along for the ride.
Outside of the bus we have a Proform bike and treadmill provided by ICON with the iFit app, powered by Google Maps. Visitors can run on the treadmill in Street View to experience a virtual run through town or trail.
We hope to see you on the road to experience the bus first-hand. Visit the Code the Road website to see our up-coming stops and dates.
Posted by Ashley Smith, Developer Marketing, Google Maps APIs
Android Wear is great for quick glanceable information that lets you stay present and be connected. For example, wouldn’t it be great if Android Wear could show you a map of your run or allow you to pick a place on the map for you and your friend to meet? Now developers can support these use cases directly with location detection and the Google Maps API on Android Wear.
You can already use the paired phone to detect location, or use on-device location detection for wearables that have an onboard GPS. Now, with Google Play Services 7.3, developers can use Google Maps API directly on Android Wear. You can now offer your users a wearable-tailored Google Maps experience.
Getting Started - Showing a Map
If you are familiar with the Maps API on Android, you will feel right at home with the Maps API for Android Wear. Your Maps API key for your mobile app will work for your Wear app as well, provided your apps share the same package name. To display a map, you can follow the easy steps in our training guide or explore our sample. There are endless possibilities for maps on wearables, including finding the nearest coffee shop, getting the fastest route home from work, tracking your run, and more.
One new thing you will need to think about with Maps on Wear is the way that users exit your application. On Android Wear, users can usually exit an application if they swipe from left to right. If you don’t need to include an interactive map, this swipe-to-dismiss approach should work for your app too. However, if you want to allow the user to pan the map in any direction, the maps component will automatically disable the swipe-to-dismiss gesture and your application will need to handle how users will exit the application. The recommended approach is to implement the standard long-press-to-dismiss gesture. Using the Android Wear support library, this is quite simple.
To implement long-press-to-dismiss:
1. Add a the DismissOverlayView from the Wearable UI Support Library to the layout and initialise it in the onCreate method of the activity
@Override
public void onCreate(Bundle savedState) {
...
mDismissOverlay =
(DismissOverlayView) findViewById(R.id.dismiss_overlay);
// Introduce this gesture to the user if necessary
mDismissOverlay.setIntroText
(R.string.basic_wear_long_press_intro);
mDismissOverlay.showIntroIfNecessary();
...
}
2. Implement GoogleMap.OnMapLongClickListenerfor your activity and override the method. This will display the dismiss overlay with an option to exit your app:
@Override
public void onMapLongClick(LatLng latLng) {
mDismissOverlay.show();
}
3. Assign the activity as the listener in onMapReady:
@Override
public void onMapReady(GoogleMap googleMap) {
...
mMap.setOnMapLongClickListener(this);
...
}
Connecting People
In addition to displaying a map, another possible use for Maps on Android Wear is to pan a map to a specific location so that, for example, your friends can meet you at that specific location. In this case, you should add a marker and use GoogleMap.OnCameraChangeListener.
To add a marker to a map and listen into position changes:
1. Add an image in the center of the screen on top of the map. This indicates the selected location within the MapFragment element:
@Override
public void onCameraChange(CameraPosition cameraPosition) {
// Access the center of the camera through:
// cameraPosition.target.latitude and
// cameraPosition.target.longitude
}
3. Attach the listener to the Maps fragment:
@Override
public void onMapReady(GoogleMap googleMap) {
...
mMap.setOnCameraChangeListener(this);
...
}
Living in the Real World
Android Wear is designed for users to stay connected while on the move. With the Google Maps API on Android Wear, developers can use the power of Google Maps to connect their users to what’s around them. Let’s keep our users moving... in the real world.
When’s the last time someone asked you to meet them at -33.921053, 151.257996? Never? Exactly. People think of where they are in context: what shop they’re at or what park they’re in. The Places API enables your apps to speak your users’ language, based on Google’s database of 100 million places worldwide.
Who’s Using Places?
Excited to see the Google Places API for iOS in action?
"Google has incredibly high up time and the highest quality of data available. Because of Google, our users can rely on Places API when requesting a ride with nearly zero down time." -- Lyft
Lyft will be coming out soon with a new version of their iOS app that uses Google Maps and Places APIs to know where you want to be picked up and dropped off.
Lyft is a welcoming, affordable ride within minutes. Simply request and go. Lyft launched in San Francisco in June 2012 and is now in more than 65 cities across the U.S.
"Google Places API integrates smoothly into the PicsArt app, providing our users with all the benefits of quick and precise image geo-tagging experience." -- PicsArt
In the next version of PicsArt, you’ll be able to simply use the place picker and the chosen location will be added to your post!
PicsArt is a full-featured photo editor app and the largest community of creatives and images, now reaching 65 million monthly active users.
Add a place picker: a drop-in UI widget that allows your users to specify a place (see the Picsart screenshot above)
Get the place where the device is currently located
Show detailed place information, including the place’s name, address, phone number, website, and more
Use autocomplete to save your users time and frustration typing out place names, by automatically completing them as they type (see the Lyft screenshot above)
Make your app stand out by adding new places that are relevant to your users and seeing the places appear in Google's Places database
Improve the map around you by reporting the presence of a device at a particular place.
Get Started
The Places API for iOS is available as part of the Google Maps SDK for iOS, now installable with Cocoapods! Have a go with
> pod try GoogleMaps
and play around with the “Maps SDK Demos” sample app. Then check out the developer documentation to add Places API to your iOS app.
Finally, a big thank you goes out to all the developers who helped battle-harden and test Places API for iOS during its beta run!
Posted by Jen Harrington, Product Manager, Google Maps APIs
It’s been ten years since we launched Google Maps APIs to developers, and since then, developers have been creating amazing apps and online experiences. To celebrate how maps and location are an integral piece of app development, we’re hitting the road—literally, on a cross-country trip called Code the Road.
Code the Road is a road trip across the U.S. to highlight what developers have made possible with the Google Maps APIs. We’re driving our customized 1959 GM tour bus on a 14 stop journey across the U.S. where along the way we’ll meet with developers, bikers, athletes, and even Elmo. And for our final celebration, where better than the place where dreams come true? We’re going to Disney World to share the magic of coding!
Code the Road starts at Google I/O in San Francisco on May 28, where attendees can experience first-hand what we’ll be featuring on the road. The bus will be a permanent fixture during Google I/O across from Moscone West at the corner of 4th Street and Howard Street. Note that because we’re outside the venue, you don’t need an I/O ticket get on the bus, so come down to visit!
From there we’ll be heading across the country—stopping in Utah, Colorado, Wisconsin, Illinois, New York, Virginia, Georgia and Florida. Along the way we’ll be featuring some of the amazing applications developers have created using Google Maps APIs including apps from iFit, Harley-Davidson, Lyft, Hilton Hotels, The Weather Channel and Walt Disney World.
We will also be hosting three developer meetups in Boulder on June 4, Chicago on June 9 and New York on June 18. The meetups will highlight how developers can use the Google Maps APIs in their apps and websites and include sessions with Google Engineers and customers. We’re expecting these meet-ups to fill-up quickly, so reserve a seat at a location near you.
Here’s where and when you can come visit us:
Date
City
Location
May 28 & 29
San Francisco
Google I/O at the corner of 4th and Howard
June 2
Logan, UT
A visit with iFit ICON Health and Fitness with a 5K treadmill Run
June 3
Moab, UT
Arches National Park
June 4
Boulder, CO
Boulder Developer Meetup
June 8
Milwaukee, WI
Police escorted H.O.G. ride from Harley-Davidson headquarters to the Harley-Davidson Museum
June 9
Chicago, IL
Chicago Developer Meetup
June 10
Chicago, IL
A visit with Lyft
June 12
Chicago, IL
A visit with the Chicago Department of Transportation at North Avenue Beach
June 17
New York, NY
A visit with Sesame Street
June 18
New York, NY
NYC Developer Meetup
June 22
McLean, VA
A visit with Hilton Worldwide
June 23 & 24
Atlanta, GA
A visit with The Weather Channel and 48-hour Hackathon
June 26
Orlando, FL
Walt Disney World Resort
Follow us on our journey via the Code the Road website to provide additional details about the dates and locations of our stops as well as charting our progress as we head across the country. We will also be sharing on-the-road updates, videos and photos on the site throughout the trip.
We hope to see you on the road!
Posted by Ashley Smith, Developer Marketing, Google Maps APIs
Posted by Robert Maretsky, Director of Mobile for GolfNow / Golf Channel
Editor’s note: Today’s guest blogger is Robert Maretsky, Director of Mobile for GolfNow / Golf Channel. Read how the GolfNow app uses Google Maps APIs to help golfers find the right course and improve their scores.
It can be easier for golfers to get a hole in one than to find the right golf course. That’s what led us to create the GolfNow app (available for Android), which helps golfers find and make reservations at courses, and improve their games by showing satellite views of courses as they play. The app is a spinoff of our GolfNow website. The app shows golfers their exact location on the course and the distance between their location and the cup by collecting routing information from a third party and overlaying it on top of Google Maps Satellite view.
We chose the Google Maps APIs because of the comprehensive coverage, timely updates and easy integration with our Android app. We use Google Maps to provide course details so that golfers can find the course that’s right for them.When on the course, to help golfers decide how to best play their next shot, we use the APIs to display satellite images from Google Maps and use a phone’s GPS to show golfers where they are on the course.
The Places API has been particularly useful for helping people search for golf courses based on location. If you know you’re going to have free time when visiting (for example) Universal Studios in Orlando, you can type 'Universal Studios' in the search bar and discover nearby courses. Results display course information, including reviews and star ratings from GolfAdvisor.com. We use custom layouts in our infowindows to style and display the data from the Places API.
GolfNow website is the largest provider of tee times in the world, with more than 13 million rounds and counting. Now, thanks to apps powered by Google Maps APIs, we’re making it even easier for golfers to get the most out of their favorite sport — helping them find and book tee times, playing golf with accurate GPS information, and reviewing how they did after the round is complete.
Posted by Tom Edwards, Strategy & Innovation, Digital lead for The Marketing Arm
Editor’s note: Today’s guest blogger is Tom Edwards from the marketing and promotions agency The Marketing Arm. Read how The Marketing Arm used Google Maps APIs to build a website for GameStop to promote the launch of a new game.
If you’re going on a monster hunt, it’s a good idea to bring a map. And if you want to build buzz around the release of a new game, you should have the right tool as well—in our case it was Google Maps APIs. We built a website for GameStop to promote the launch of The Witcher 3: Wild Hunt, an action role-playing game from Warner Brothers and CD Projekt RED. After a visitor logs into the promotional website she is dropped into a map of the world and collects clues about where to find monsters. The goal is to be the first person to find each monster and win a prize.
The game’s launch deadline required us to build the site within a tight timeframe. We chose Google Maps APIs because they provided the tools we needed to build our maps quickly and easily. They also let us focus on the site creative rather than get bogged down with technical issues. We use the Google Maps JavaScript API for the front end, to start the experience and immerse visitors into the virtual world. Then, with the Google Maps Street View Service we allow users to search for monsters. We took images of the monsters and used overlays to drop them into familiar surroundings.
We use the Street View API to plant the user in a random location somewhere in the world, then visualize their surroundings, including monsters and trails of blood. We set a randomly generated starting point to the map based on five predefined locations. From there we have event listeners in place for 'mapView: bounds_changed, streetView: visible_changed, streetView: position_changed, streetView: pov_changed, searchBox: places_changed'.
When the user has initialized Street View, we make a call to our API to see if any monsters are within a defined distance from the LatLng of our monster data set. We continue this test anytime the position_changed event is fired until a monster is within range. At that point we update the class of a div that sits above the map view. Each monster is assigned a specific css class which allows us to easily make tweaks.
Google Maps made it easy to combine the real world of Street View with imaginary creatures from the game. Our goal went beyond just our users having fun — we wanted to build a site that would create genuine excitement around the game and give people a taste of monster hunting in the real world.
We’re hitting the road—hosting a series of developer meetups in Boulder, Chicago and New York. As a way to bring the excitement of Google I/O to our developer community, we’re visiting select cities across the U.S. to share how developers can use the Google Maps APIs in their apps and websites.
The meetups will feature sessions with Google Engineers as well as customers such as Lyft, iFit by Icon Fitness, and more. Request a seat for our meetup in a city near you. Space is limited, so we encourage you to sign-up in advance. Once space is sold out, we’ll place additional requests on our waiting list.
The Google Geocoding API now returns Place IDs in the response and can also be queried with Place IDs. Place IDs identify a unique place in the Google Places database and on Google Maps and can be used to ensure that multiple APIs are referencing the same place. Now developers can use Place IDs across the Google Maps Roads API, Geocoding API, the Places library in the Google Maps Javascript API, and the Google Places API.
Traditionally, developers reference locations on a map as latitudinal and longitudinal coordinates. However, different APIs can translate the same latlng to different addresses, and the translation from latlngs to addresses can also change over time. Place IDs provide a way to consistently reference the same location across multiple APIs. By using Place IDs in your app, the locations you reference become more consistent and apps become more reliable and user-friendly.
For example, when using latlngs to reference locations, the Google Maps Roads API only ever returns drivable roads, whereas the Google Geocoding API prefers to return the addresses of buildings. If your app used the Roads API to snap to a road, and then queried Geocoding API with a latlng to get the road name, the Geocoding API may have returned a neighboring road depending on the nearest building. With this launch, you can now query Geocoding API with the Place ID of the road returned by Roads API, ensuring that you’re getting the name of the correct road.
Editor’s note: Today’s guest blogger is Paul Kogan, CEO of Hovee. Read how Hovee is using Google Maps APIs to transform commuting by matching drivers with one another.
At Hovee, we are reinventing the carpool by combining it with the power of social networking. We’ve built our company around the concept of “social commuting” — the idea that more people will carpool if they can choose who shares their drives based on routes and personal interests.
Our platform matches commuters with each other to find the most efficient carpools for everyone. We use Google Maps APIs to calculate and plot routes and drop-off points, displaying them in our web and iOS apps. Since about 70 percent of our user base is iPhone users, we decided to focus on delivering the iOS app first. We plan to add the Hovee Android app this summer.
After users download the app, they create personal profiles which we use to match people based on compatibility, for example, whether they prefer to listen to the radio or chat during their commute. Users enter their home and work locations, and we use the Geocoding API to validate addresses. The Geocoding API has been hugely effective and is more accurate than our previous mapping service, Apple Maps. We switched to Google Maps for more accurate geo-coordinates and the ease of getting waypoints and plotting polylines.
Once profiles are complete, we generate a RideMatch list for each user. It shows their optimum commuting partners, sorted by an algorithmic score which combines route calculations, schedule and social components. To enable this feature, two Google Maps APIs come into play: the Directions API and the Distance Matrix API. The Directions API identifies the routes while the Distance Matrix API estimates driving time and distance. We then plot pickup and drop-off points using the Javascript API for the web client, and the Google Maps SDK for iOS for the iOS app.
When commuters browse the profiles of possible ride partners, we obscure their home and work addresses for privacy reasons.
We now have several hundred people from a dozen companies in the San Francisco Bay Area participating in our pilot program. We’re currently working to bring Hovee to all Bay Area commuters. This summer we plan to expand the service to the Washington D.C metro area.
Setting up carpools can be a complex interaction. But with the power of the Google Maps APIs, our users can now do this in a way that’s responsive, intuitive and social.
Posted by Robert James Reese, Executive Producer for Runner’s World Online
Editor’s note: Today’s guest blogger is Robert James Reese, executive producer for Runner's World Online. Read how Runner’s World’s 40 Million Steps website used Google Maps APIs to build a virtual tour of an around-the-world run.
The journey of one runner's trek around the globe is an amazing feat, and at Runner’s World we wanted people to share in the experience. To do this, we created the 40 Million Steps website, which allows people to relive Tom Denniss’ record-breaking, 622-day, world-spanning run.
The site uses Google Maps APIs to allow people to relive Denniss’ 16,300-mile run. Using Satellite View, users can click on the map to see the thousands of photos and nearly 400 videos captured during Denniss’ journey, making it feel as if they were there.
Our online launch coincided with a feature we ran in our April 2015 print issue, so we wanted the online version to have some of the same look and feel to create a cohesive connection between print and online. The styling for the map itself is all specified through the styles property of the MapOptions object in our JavaScript.
Users view Day 1 of the run and are able to click through his progress.
We used the Geocoding API and the Elevation API as editorial tools. The Geocoding API helped us to fact-check location names, and we used the Elevation API to find out and highlight interesting facts about the run, such as its lowest and highest points.
The Javascript API was key in building the site. We faced a real challenge because of the amount of data we had from the run, on which Denniss wore a GPS-enabled watch to record his locations. Typically, when creating a polyline with the Google Maps API, we would have just included a "new google.maps.LatLng" on a separate line for each point, as shown in the documentation on Google’s developer site. However, since we were dealing with over 3 million GPS data points, it was too many for the browser to handle, so we simplified the polyline before sending the points to the browser by sampling every 20th data point.
We set out to build the site to impress our audience and give them something really cool that they hadn’t seen before. There’s arguably no better way to experience the joy, pain, exhaustion and exhilaration that Denniss felt during his run around the world—and Google Maps APIs were key to bringing his adventure to life.