Tag Archives: Geo

Google Maps APIs Sessions Set for Google I/O



Google I/O starts in just 24 hours! We’re looking forward to three days of insightful developer conversations, amazing technology and great weather. This year, Google Maps APIs engineers, technical support engineers, product managers, ux-ers, technical writers and developer advocates are traveling from Sydney, New York and Seattle to spend time in the Geo sandbox and demonstrate the power of our APIs. We'll also hold Office Hours to answer your implementation questions.
IMG_20160516_171414.jpg

Here are three of our featured sessions for this year’s event:

Understand your place in this world
May 18, 3:00 PM
Humans navigate a world made up of places with names, addresses and phone numbers—not lat/long coordinates. The Google Places API enables an app or website to present location data to users in a human-friendly fashion. In this session we’ll do a deep dive into how you can use the Places API to discover your environment. We’ll give detailed insights into how to use the APIs on web and mobile, show off some newly-released widgets, and take a look at how you can optimize for mobile device battery life. You’ll learn how the Places API can make all your apps— not just map-centric ones—smarter.

Building geo services that scale
May 19, 3:00 PM
Not all map and geo applications run entirely on your mobile device. Perhaps you want to protect your keys or other API access data from reverse engineering by putting them in the cloud, or you have custom business logic that you run on your server that you don't want to distribute via mobile. To protect your keys and API access data you'll need to operate some kind of service. In this session you'll learn how to build that service on the Google Cloud Platform and consume it in a mobile application that uses the Google Maps APIs.

Streamlining developer experiences with the Google Maps APIs
May 20, 9:00 AM
The Google Maps APIs provide a seamless experience for developers of all levels. Some want to offer a map or navigation but don't want to build these things themselves; this can be achieved with just a few lines of code. Other developers prefer to integrate natively with off-the-shelf widgets. Finally, some developers want complete control over every aspect of the presentation. This session will highlight the Maps APIs representing the full gamut of the developer experiences, enabling you to get going immediately and scale as necessary. You'll see how widgets and services can be added over time with a suite of Maps APIs, services and libraries.

We hope you’re able to attend at least one of these sessions to learn directly from Google Maps APIs experts. And, don’t forget to stop by the Geo sandbox to chat—just look for the big bus! If you’re not able to join us in person this year, you can always keep up with our activities via Twitter or G+.

Get our API Release Notes automagically via RSS



The Google Maps APIs team are keen to ensure that our customers and developer community has the most up to date and useful information about using our APIs. With that goal in mind, we’ve added RSS feeds to the Release Notes for all the Maps and Places APIs.

Until now, if you wanted to see news about our releases, you’d need to visit individual API release notes pages periodically. We don't typically announce bug-fix or other small releases via the blog or social media but these are often critical for segments of our developer community.

You can now subscribe to individual API feeds and receive updates automatically when release notes are published. We'll continue to publish all Release Notes on the website as well. Feeds available today:
Google Maps Android API 
Google Maps SDK for iOS 
Google Maps JavaScript API 
Google Maps Directions API 
Google Maps Distance Matrix API 
Google Places API for Android 
Google Places API for iOS 
Google Maps Android API Premium Plan 
Google Maps SDK for iOS Premium Plan 

I’ve been a technical writer at Google since 2013. I love my job because it gives me the opportunity to play with code and words, and to make them play nicely with each other. Maps are beautiful, and the docs help people weave stories around geography and places.
Sarah-034-hallo_2.JPG

I’ll be at I/O next week, so I hope to see you there at our Geo sandbox (just look for the bus). Happy mapping!

Advanced marker animations and more with Google Maps SDK for iOS 1.13

Last week we launched the Google Maps SDK for iOS 1.13. This release includes the ability to create advanced marker animations, the option of auto refreshing info windows, the ability to set the frame rate up to 60 frames per second, further custom styling for the Place Autocomplete widget, and a new mapViewSnapshotReady event.

Advanced marker animations and auto-refreshing of info windows

Ever wanted to have rotating markers or use a grow and glow marker animation?

With the Google Maps SDK for iOS 1.13, we have introduced an iconView property for marker icons, giving you the animation capabilities of a UIView. Because iconView accepts a UIView, you can have a hierarchy of standard UI controls defining your markers, each view having the standard set of animation capabilities. The iconView property supports animation of all animatable properties of UIView except frame and center. Take a look at our documentation to get started.

We've also included the option to auto-refresh info windows, which is particularly useful if you want to use a static web page as info window content but it hasn’t downloaded by the time you create your info window. By using the new marker property tracksInfoWindowChanges, you can have the info window automatically refresh when the static web page loads.

Frame rate up to 60 fps with graceful fallback

You can now take advantage of a new enum, GMSFrameRate, which has three options: kGMSFrameRatePowerSave (15fps), kGMSFrameRateConservative (30fps), and the default kGMSFrameRateMaximum (60fps with 30fps fallback). In order to protect devices that don't handle 60fps well, we do a run-time device model check and the preferredFrameRate is silently downgraded to 30fps when necessary on older devices.

Autocomplete widget styling

In Google Maps SDK for iOS 1.12 we announced the iOS Places autocomplete widget. With the release of iOS 1.13, you can now add further custom styling to your autocomplete widget to create a consistent visual identity.

To set widget UI element colors:

  1. Use the native iOS Appearance Proxy system when possible to globally style UI controls. The Places autocomplete widget will honor these settings.
  2. Use the new SDK methods on widget classes to set colors which the Appearance Proxy system doesn't support.

Our documentation highlights which elements can be customized using the Appearance Proxy, and which can be customized by using the SDK methods.


mapViewSnapshotReady event

We heard your requests to provide a clear signal that all tiles have been rendered and the map has finished loading. In Google Maps SDK for iOS 1.11 we included start/finish events for map tile and Street View panorama rendering.

In this release, we've added a mapViewSnapshotReady event that indicates that the map is stable (tiles loaded, labels rendered, camera idle) and overlay objects have been rendered. This is useful if you want to do a transition away from the map, but need a static image of the map in case you want to transition back. The mapViewSnapshotReady event will ensure that the static image will truly represent the state of the map.

A big thank you to iOS developers for using the Google Maps SDK and submitting feedback via the issue tracker!

Take a look at our release notes and update to Google Maps SDK for iOS 1.13 today.

Posted by Megan Boundey, Product Manager, Google Maps Mobile APIs

Changes and quality improvements in Google Places API Search

Many of you have been asking for Google Places API search results that more closely reflect those on maps.google.com. With that goal in mind, we’ve integrated the Places API with Google Maps search. We’re pleased to offer more consistent search results across Maps and the Places API, which results in better overall search quality for API responses.

In conjunction with this change, we are also modifying how we support place type restrictions in the Places API web service and JavaScript library. Beginning Feb 16, 2016, we are replacing the types restriction parameter with a new type search parameter. If you have been using the types parameter for Nearby Search, Text Search or Radar Search you will be affected.

Type search works similarly to types restriction, but it only supports one type per request.

Requests using the types parameter and those specifying multiple types (for example, types=hospital|pharmacy|doctor) will continue to return results until Feb 16, 2017, but we do not recommend using multiple types in a search request. After that date, requests with multiple types will no longer be supported. To ensure the best possible search results for your users, we recommend using a single type in search requests.

Using the new type search feature is straightforward. Here is an example of a Text Search request:
https://maps.googleapis.com/maps/api/place/textsearch/json
?type=airport
&location=-33.87,151.21
&radius=5000
&key=<YOUR_API_KEY>
In addition, we are amending the list of supported types. The types establishment, food, health, general_contractor, finance and place_of_worship, will not be available as searchable types from Feb 8, 2017. However these types will still be returned in search and details results.

Posted by Marcelo Camelo, on behalf of the Google Places API team

Changes and quality improvements in Google Places API Search

Many of you have been asking for Google Places API search results that more closely reflect those on maps.google.com. With that goal in mind, we’ve integrated the Places API with Google Maps search. We’re pleased to offer more consistent search results across Maps and the Places API, which results in better overall search quality for API responses.

In conjunction with this change, we are also modifying how we support place type restrictions in the Places API web service and JavaScript library. Beginning Feb 8, 2016, we are replacing the types restriction parameter with a new type search parameter. If you have been using the types parameter for Nearby Search, Text Search or Radar Search you will be affected.

Type search works similarly to types restriction, but it only supports one type per request.

Requests using the types parameter and those specifying multiple types (for example, types=hospital|pharmacy|doctor) will continue to return results until Feb 8, 2017, but we do not recommend using multiple types in a search request. After that date, requests with multiple types will no longer be supported. To ensure the best possible search results for your users, we recommend using a single type in search requests.

Using the new type search feature is straightforward. Here is an example of a Text Search request:
https://maps.googleapis.com/maps/api/place/textsearch/json
?type=airport
&location=-33.87,151.21
&radius=5000
&key=<your_api_key></your_api_key>
In addition, we are amending the list of supported types. The types establishment, food, health, general_contractor, finance and place_of_worship, will not be available as searchable types from Feb 8, 2017. However these types will still be returned in search and details results.

Posted by Marcelo Camelo, on behalf of the Google Places API team

Code the Road Europe Recap: Our last stop in London


We celebrated our last ‘Code the Road’ Europe stop in London where the team got an early start in our Code Lab building an Android app using the Google Maps APIs.
Ed Boiling, Maps API sales engineer, led the Code Lab workshop where developers created an Android application using the Google Maps Android API and connected it to a Google Cloud Platform datastore. The Code Lab covered concepts including using Android Studio, creating a Google Maps activity, drawing data on the map, capturing the user's location, and adding location based rules to control the application logic. It also introduced the developers to Google Cloud Platform via the Cloud Endpoints integration in Android studio, allowing them to easily add and deploy a Google App Engine based API and datastore for their application to use.
This was not before trying out a Code the Road favorite—Pegman Skydiving. Using a camera, Maps APIs, and your arms the program can detect how you might look skydiving over a specific locale.
In the afternoon Kerstin Pittl, a lead engineer for Maps APIs from OniGroup, discussed how companies can use the “blue dot” on Google Maps in their applications and how partners can help them integrate it into their map.
Pittl was followed by Dan Hubert, the founder of Appyparking. Appyparking helps drivers across the United Kingdom understand parking regulations and find open parking spaces. The app color codes parking spots to show drivers where there’s free parking, where restrictions apply and where special types of spaces – such as electric-car charging and motorbike spots – are located.

We’re already planning our next roadtrip. We hope to see you at one of our future Code the Road stops!

Posted by Michael St. Germain, Associate Product Marketing Manager, Google Maps APIs

Code the Road Europe Recap: The Hamburg Hackathon for Refugees


People around the world want to know how they can help the refugees and migrants caught up in the crisis in Europe, the Middle East and Northern Africa. As part of Code the Road Europe, we partnered with Ubilabs, a Google Maps for Work partner, to host a 24-hour hackathon dedicated to helping expand RefugeeMaps.eu, Ubilabs’ open sourced platform to help the refugees in Hamburg and throughout Europe.

RefugeeMaps.eu highlights local points of interest that are relevant to refugees new to a particular area, including libraries, recreational facilities and other important landmarks. The goal is to take local knowledge from volunteers and make it easy for someone new to the area to orient themselves and find resources that will help them settle in quickly.
IMG_3502.jpg

We kicked-off the hackathon with a presentation from Barbara Kopf, a refugee activist and the manager of the institution ‘Freizeithaus Kirchdorf’. She provided context for what refugees need and how they can help. Then, we had Thomas Steiner, an engineer in the Google Hamburg office, and Martin Kleppe from Ubilabs talk about the technical aspects around the platform. To support the effort, Ed Boiling, Google Maps APIs Sales Engineer, presented 10 Google Maps APIs in 10 minutes, then it was time to start start coding.
IMG_3505.jpg

Six groups of developers formed and spent the rest of the night designing, coding, and working together to find ways to improve RefugeeMaps.eu with, of course, lots of coffee and snacks.
IMG_3518.jpg

After 24 hours, we all came together to review the improvements which included:

  • Improvement to the front end design and UX optimization based on language preferences, making it easier for refugees to navigate the platform based on their preference for Arabic, English or German.
  • A function that makes it easier for refugees to print out select, zoomed-in areas of the map. Not all refugees have cell phones, especially women and children, so one group decided it was important to make sure it was easy for someone to print out maps to make it truly offline.
  • Addition of new places. Currently, only local volunteers with access to a master spreadsheet can add locations; however, one group added a function that makes it easier for anyone to add in a location through the interface of the map. This then updates the master spreadsheet.
  • A native offline Android app. Offline is important for the refugees that might not have data plans, so one group created a native Android app that could be used offline.
  • No server solution. To make it easier to run the platform, developers made a solution that did not require a server-side.
  • A performance boost. Developers added back-end changes to allow for caching of resources for offline use.

Here is the improvement we made to the front end design:
front_end_design_update.png

We were so impressed by all of the improvements that the developers made over the 24 hour period. While the hackathon is officially over, we also extend our invitation to collaborate on the project to external developers who could not attend the hackathon. You can find the code and all info on GitHub as well as a live demo instance of RefugeeMaps.eu online.

Posted by Hena Haines, Product Marketing Manager, Google Maps APIs

Code the Road Europe Recap: Our Visit to Berlin for a Developer Meetup


After a great trip to Tel Aviv, we were excited to be in Germany with our Code the Road bus. Our first stop was in Berlin, and then we were on to Hamburg for our 24-hour Hackathon.

We hosted our first event in the Factory, Germany's largest startup campus. The Factory provides working spaces, communities and events for freelancers and startups to connect and empowers entrepreneurs and innovators in a beautiful space in Berlin.
IMG_4166.jpg

Before the event developers had a great time exploring the Code the Road bus and enjoying a coffee at our Location Cafe. They also had a chance to play multiple games including the Maps Skydiving game.
IMG_4161.jpg

Ed Boiling and Matt Toon kicked-off the event with a great Codelab focused on building an app that allows users to check into any mountain when going on a hike or visiting a new destination. Corien, a web developer and student, said, “It was great to learn more how to use Google Maps APIs on Android, a platform I don’t usually develop on as well as learn from the other developers at the event. It was great to see everyone working together and learning a thing or two about Google Maps APIs.”
IMG_4163.jpg

Then, we had Ed Parsons kick off our presentation by explaining how location technology is changing the way we interact with the world to create a more dynamic, emotive experience.

Next up, Oliver from Kia Motors spoke about how Kia is using Google Maps APIs in the Kia cee’d Surprise Drive digital marketing campaign. Martin Kleppe from Ubilabs followed up with the specific technical points on how this digital marketing campaign was developed with Distance Matrix API, Directions API and custom pins. He also gave our attendees some tips and tricks about how to get their maps looking snazzy with Image Tiles, clustering, Marker Images, Data Layer and more. He even share his presentation for our attendees to reference.
IMG_4273 (1).JPG

Finally, our technical lead from Sydney, Enoch, presented on a range of topics from keys to quotas to JavaScripts tips and tricks.

Shenouda, a developer from Egypt told us, “The presentations gave a great overview of the functionality of the technology and how to use the APIs to the best of their abilities.” He plans to take what he learned on styling and overlaying data on a map as well as using the Elevation API to incorporate into applications to give users a really interactive and exciting user experience.

We had a great time in Berlin. Next we were on to Hamburg and London!

Posted by Tobias Espig, Head of Global Field Marketing, Google Maps APIs

Code the Road Europe Recap: Our first stop in Tel Aviv


We had a fantastic start to our ‘Code the Road’ Europe tour at the Google Tel Aviv Campus. We were thrilled to have so many enthusiastic developers to help kick off our first event.

It was great to be in Tel Aviv to feel the excitement and energy of their thriving startup community and to see how these talented developers were using location and Google Maps APIs in their applications.

There we brought a Maps Dive gaming experience to the campus area as well as a full-size copy our Code the Road 1970s Volkswagen Tour bus. (The actual bus and the trailer were waiting for us in Berlin for our next stop on the 12th of November)
_DSC0252.JPG

For our first talk, Ed Parsons, Geospatial Technologist, Google Maps, gave a talk titled "Everything, everywhere: The evolving world of ambient location.” Next up was, Enoch Lau, Technical Lead, Javascript Maps API, who gave some tricks and tips to make Google Maps APIs run even smoother.
_DSC0198.JPG

We also welcomed Lidor Dvir, Head of Development from Gett who shared a talk titled "Using Google Maps API to build a multi-million user product". Lidor presented on how Gett uses multiple Google Maps APIs on multiple platforms to help both users and businesses get where they need to go and get the things they need. He described how the Google Maps Places API, Directions API and Roads APIs helps users easily find the places they need to go and the best way to get there. They also use heat maps, marker clustering, customize markers and animations to layer information on the map in beautiful visualizations.

We spent the afternoon with a packed house for Codelab were we built a ‘Munro bagging’ Android app on Google Maps and Google Cloud Platform. We had a great time working with the developers helping them with the app.
_DSC0238.JPG

Tel Aviv was just the start of our journey. The next stop was Berlin!

Posted by Tobias Espig, Head of Global Field Marketing, Google Maps APIs

New Autocomplete widget helps users with places and address entry in mobile apps



Today, we're announcing two new ways to help users enter places and addresses in your apps with less typing. Autocomplete functionality assists users by automatically completing the name and address of a place as they type. The autocomplete widget on iOS and Android makes it easier for you to add autocomplete functionality to your application with just a small amount of code. Also, we are adding autocomplete functionality to the place picker.

The new autocomplete widget UI comes in two different flavors: overlay and full screen.
Overlay autocomplete widget
Full screen autocomplete widget
On Android, you can add the autocomplete widget as a Fragment and add an event listener to retrieve the autocompleted place reference back in the application. Alternatively, you can invoke the autocomplete widget with an Intent.

Adding a Fragment In the XML layout file for your Activity:
<fragment
  android:id="@+id/place_autocomplete_fragment"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
android:name="com.google.android.gms.location.places.ui.PlaceAutocompleteFragment"
  />

Adding an Event Listener in your Activity's onCreate() method:
// 
PlaceAutocompleteFragment fragment = (PlaceAutocompleteFragment)
    getFragmentManager().findFragmentById(R.id.place_autocomplete_fragment);

fragment.setOnPlaceSelectedListener(new PlaceSelectionListener() {
   @Override
   public void onPlaceSelected(Place place) { // Handle the selected Place
   }
   @Override
   public void onError(Status status) { // Handle the error
   }

Creating an intent to invoke the autocomplete widget:
try {
   Intent intent =
            new PlaceAutocomplete.IntentBuilder(PlaceAutocomplete.MODE_FULLSCREEN)
           .build(this);
   startActivityForResult(intent, PLACE_AUTOCOMPLETE_REQUEST_CODE);
} catch (GooglePlayServicesRepairableException e) {
   GooglePlayServicesUtil
           .getErrorDialog(e.getConnectionStatusCode(), getActivity(), 0);
} catch (GooglePlayServicesNotAvailableException e) {
   // Handle the exception
}

On iOS (Objective-C), you can implement autocomplete’s delegate to respond to a place selection:
@interface MyViewController () 
@end

@implementation ViewController
.
.
.
- (IBAction)onLaunchClicked:(id)sender {
  // Present the Autocomplete view controller when the button is pressed.
  GMSAutocompleteViewController *acController = [[GMSAutocompleteViewController alloc] init];
  acController.delegate = self;
  [self presentViewController:acController animated:YES completion:nil];
}

- (void)viewController:(GMSAutocompleteViewController *)viewController
    didAutocompleteWithPlace:(GMSPlace *)place {
  // The user has selected a place.
  [self dismissViewControllerAnimated:YES completion:nil];
}

- (void)viewController:(GMSAutocompleteViewController *)viewController
    didAutocompleteWithError:(NSError *)error {
  [self dismissViewControllerAnimated:YES completion:nil];
}

// User pressed cancel button.
- (void)wasCancelled:(GMSAutocompleteViewController *)viewController {
  [self dismissViewControllerAnimated:YES completion:nil];
}

@end

And in Swift:
import UIKit
import GoogleMaps

class MyViewController: UIViewController {
    
    @IBAction func onLaunchClicked(sender: AnyObject) {
        let acController = GMSAutocompleteViewController()
        acController.delegate = self
        self.presentViewController(acController, animated: true, completion: nil)
    }
}

extension MyViewController: GMSAutocompleteViewControllerDelegate {
    
    func viewController(viewController: GMSAutocompleteViewController!, didAutocompleteWithPlace place: GMSPlace!) {
        // The user has selected a place.
        self.dismissViewControllerAnimated(true, completion: nil)
    }
    
    func viewController(viewController: GMSAutocompleteViewController!, didAutocompleteWithError error: NSError!) {
        self.dismissViewControllerAnimated(true, completion: nil)
    }
    
    func wasCancelled(viewController: GMSAutocompleteViewController!) {
        self.dismissViewControllerAnimated(true, completion: nil)
    }
}

We have also added the autocomplete functionality to the place picker—a UI widget that helps users communicate their current location, such as a place, address or location on a map. This makes it even easier to pick a specific place by starting to type its name or address. If your app already uses the place picker it will automatically gain the autocomplete feature with no action required on your part.
To get started, check out the documentation and code samples. You can always send us any questions via Stack Overflow or the Google Maps API issue tracker if you have ideas for improvement.