Author Archives: Maps Devel

New JavaScript Street View renderer brings rendering improvements and better mobile support

Street View is one of Google Maps’ most loved features, providing users with a way to explore and experience the world around them. Developers all over the world use Street View in the Google Maps JavaScript API to make their apps more unique and exciting, giving their users a sense of what it’s like to visit a place in real life.

Today we’re making Street View even better, especially on mobile devices, by launching a new Street View renderer in the Google Maps JavaScript API. Read on for the full details of what we’ve improved!

Better display

Smoother Transitions

Transitions from one point to another in Street View now include more animation frames, creating the effect of gliding smoothly to the next location. Transitions in the old renderer looked like jumping from one location to another.

Old renderer
New renderer
next-old-short.gifnext-new-short.gif

Smoother Loading Animations

The old renderer repeats images while loading new content, resulting in a stuttering effect. The new renderer uses lower resolution imagery while loading, resulting in a smoother animation when rotating an image in Street View.

Old renderer
New renderer
old.gif
new.gif

Object modeling improvements

Objects in Street View look better in the new renderer because it builds a 360-degree model that considers all possible perspectives. For example, this high rise building has wavy lines in the old renderer, as opposed to crisp lines in the new renderer.

Old renderer
New renderer

In another example: for imagery on an incline, such as a street with a steep hill, the new renderer corrects the objects to be vertical, whereas the old renderer would have shown the objects at an angle.

Old renderer
New renderer

Better mobile support

WebGL imagery

The new renderer uses WebGL (on browsers that support it) which results in a higher frame rate and better rendering, especially on mobile devices. On mobile devices, the old renderer would display a fish-eye projection of the image, whereas WebGL allows us to present a rendered sphere that looks as it would in reality. For example, the street in the image below is straight, but the old renderer made it look curved on mobile devices.

Old renderer
New renderer
WebGL_before.png
WebGL_after.png

Touch support

As mobile web usage grows, users expect familiar touch-based interactions to work everywhere. The new renderer supports the same natural touch-based gestures on mobile which have been available in the Google Maps Android app: pinch-to-zoom and double-tap-to-go. In the old renderer, zooming was only available through the +/- buttons, and movement was only possible by clicking the arrows on the ground.

Motion tracking on mobile devices

Mobile devices give developers the opportunity to provide their users with more natural ways to explore and interact with their applications. We’ve enabled support for device orientation events on Street View so that users on mobile devices can look around in Street View by moving their phone. Developers have the option to turn this off if they prefer. Please see the developer documentation for more details, or open the documentation link on a mobile device to see motion tracking in action.

Better controls

X Forward

When using a desktop device with a mouse or trackpad, users will see a small "X" at the cursor location that indicates the next camera location if they choose to move forward. Arrows indicate the direction of movement. Wall rectangles identify the direction the camera will point towards.

Next image targets
Next centered image target

Cleaner street names, labels and targets

Street names and labels are now separated from controls, removing overlap issues and allowing for clean display in right-to-left and left-to-right languages.

Old renderer
New renderer
We hope you enjoy using the new and improved Street View renderer! Also a big thank you to all the developers who use the Google Maps JavaScript API and provide feedback via the issue tracker. Getting feedback from developers is vital for us to be able to keep improving our products, so if you have any bug reports or feature requests, please let us know!

For more information on Street View in the Google Maps JavaScript API, please see the developer documentation.

author image
Posted by Elena Kelareva, Product Manager, Google Maps APIs

Keep users focused on what’s important with the latest Google Maps Android API

Released today, the latest version of the Google Maps Android API includes more developer requested features: you can now track camera movements more accurately via our new camera listeners, set the minimum & maximum zoom levels on your map, and restrict the user’s panning to particular lat/lng bounds of the camera target. In addition, we’ve added a new marker Tag property so you can now associate your own data object with a marker.

Track camera movements more accurately

As one of our top requests, developers have been asking for a better way to track camera movements and the ability to see why the camera is moving, whether caused by user gestures, built-in API animations or developer controlled movements [Issue 4636]. Our new camera change listeners support you in doing this. Your app can now receive notifications for camera start, ongoing, and end events.

See the developer’s guide to camera change events and take a look at this code sample which shows you how to detect when the user drags the map, and draws a line to track this movement when it happens.

Control the zooming, panning and scrolling experience

Have you ever wanted to be able to control how much your user can zoom in and out and pan around on your map so that you can more tightly control the experience? Or have you got tile overlays only for zoom levels 15 through 20 and wish you could limit the zooming capability of both the map and your tile overlays to those particular levels?

You can now set the min and max zoom levels on your map by using GoogleMap.setMinZoomPreference() and GoogleMap.setMaxZoomPreference() [Issue 4663]. These zoom levels will also apply to any tile overlays you have on your map.

In addition, you can also constrain the lat/lng center bounds of the focal point of the map (the camera target) so that users can only scroll and pan within these bounds using GoogleMap.setLatLngBoundsForCameraTarget(). This is awesome if you want your users to stay within the map area of your tile overlays, or you wish to confine the map in your app to a particular local area.
Pan and zoom limits on a map for Adelaide, a beautiful city in South Australia
See the developer’s guide to learn more about setting boundaries on the map as well as this code sample.

Marker tags

Does your app cater for different types of markers and you want to treat them differently when a user taps on them? Or do you want to assign priorities to your markers? The new marker Tag property allows you to associate whatever data object you like with a marker, supporting you in doing this and more [Issue 4650].

A big thank you to Android developers everywhere for using the Google Maps Android API and submitting feedback via the issue tracker.

Our release notes contain details of bugs fixed as well as the features mentioned in this post. Take a look and start using our new features today!
author image Posted by Megan Boundey, Product Manager, Google Maps Mobile APIs


Google Places API for iOS & Google Maps SDK for iOS are now in separate CocoaPods

In today’s release, the Google Places API for iOS 2.0 and the Google Maps SDK for iOS 2.0 are now in separate CocoaPods. For developers who only use the Google Places API for iOS, this will significantly reduce the binary size of their app.

What does this mean for me? What do I have to do?

Nothing immediately for your current implementation, but we strongly suggest that you upgrade within the next year to the new Google Maps SDK for iOS 2.0 and Google Places API for iOS 2.0. The Google Maps for iOS SDK Version 1.x will become unsupported in one year’s time.

If you are using the Standard Plan Google Maps SDK for iOS 1.x, and haven’t specified a version in your podfile, you will be automatically upgraded to the new Google Maps SDK for iOS 2.0 when you run ‘pod update’. If you use any Places functionality, we’ve created this migration guide for the Places API to step you through the process of migrating to the new Google Places API for iOS 2.0.

In addition, we’ve documented how to extract all the frameworks (Maps, Places) from the relevant CocoaPods so you can manually include the SDKs in your project rather than using CocoaPods if you wish. [Issue 8856]

What does this mean for Premium Plan Maps SDK customers?

There is no longer a separate Google Maps Premium Plan SDK. Instead it has been replaced with the new streamlined Google Maps SDK for iOS 2.0 for both Standard and Premium Plan developers.

We’ve created a Premium Plan migration guide that will step you through the process of migrating to the new Google Maps SDK for iOS 2.0. We’ve also documented how to extract the frameworks from the CocoaPods so you can manually include the SDKs in your project if you’d prefer that. Your Enterprise Maps key will continue to work, as will your Premium Plan.

Please note:
The Google Maps SDK for iOS Premium Plan SDK 1.13.2 (current version) will be supported for one year during which time we suggest you upgrade to the new streamlined Google Maps SDK for iOS 2.0.

Take a look at our release notes and start using version 2.0 today!

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

I/O session: Location and Proximity Superpowers: Eddystone + Google Beacon Platform

Bluetooth beacons mark important places and objects in a way that your phone understands. Last year, we introduced the Google beacon platform including Eddystone, Nearby Messages and the Proximity Beacon API that helps developers build beacon-powered proximity and location features in their apps.

Since then, we’ve learned that when deployment of physical infrastructure is involved, it’s important to get the best possible value from your investment. That’s why the Google beacon platform works differently from the traditional approach.

We don’t think of beacons as only pointing to a single feature in an app, or a single web resource. Instead, the Google beacon platform enables extensible location infrastructure that you can manage through your Google Developer project and reuse many times. Each beacon can take part in several different interactions: through your app, through other developers’ apps, through Google services, and the web. All of this functionality works transparently across Eddystone-UID and Eddystone-EID -- because using our APIs means you never have to think about monitoring for the individual bytes that a beacon is broadcasting.

For example, we’re excited that the City of Amsterdam has adopted Eddystone and the newly released publicly visible namespace feature for the foundation of their open beacon network. Or, through Nearby Notifications, Eddystone and the Google beacon platform enable explorers of the BFG Dream Jar Trail to discover cloud-updateable content in Dream Jars across London.

To make getting started as easy as possible we’ve provided a set of tools to help developers, including links to beacon manufacturers that can help you with Eddystone, Beacon Tools (for Android and iOS), the Beacon Dashboard, a codelab and of course our documentation. And, if you were not able to attend Google I/O in person this year, you can watch my session, Location and Proximity Superpowers: Eddystone + Google Beacon Platform:
We can’t wait to see what you build!

author image
About Peter: I am a Product Manager for the Google beacon platform, including the open beacon format Eddystone, and Google's cloud services that integrate beacon technology with first and third party apps. When I’m not working at Google I enjoy taking my dog, Oscar, for walks on Hampstead Heath.

Announcing marker clustering in the Google Maps SDK for iOS Utility Library

Today we’ve added marker clustering to the Google Maps SDK for iOS Utility Library! This much-requested feature is now available for iOS in addition to Android and JavaScript.

Do you ever feel that your map just has too many markers on it, making it feel cluttered and hard to comprehend? Or, perhaps you want to show where the popular restaurants are in your city, but you still want your map to look clean?

Marker clustering supports you in doing this. As the zoom levels of the map change, you can aggregate markers, indicating clearly to your users exactly where those popular restaurants are located. As your user zooms in, the markers progressively split out until all of the individual markers are displayed.
Using the new marker clustering feature in the Google Maps SDK for iOS Utility Library is an easy 4 step process:
  • Add ‘Google-Maps-iOS-Utils’ to your Podfile
  • Instantiate the GMUClusterManager
  • Implement the GMUClusterItem protocol for your marker objects
  • Add the marker objects to the cluster manager
We provide the default algorithm, renderer and icon generator to support you in doing this. In addition, you can also fully customize each of these by extending the default implementations, or by providing your own implementation of these protocols: GMUClusterAlgorithm, GMUClusterRenderer, GMUClusterIconGenerator.

Take a look at the documentation and demo samples, and start using marker clustering in the Google Maps SDK for iOS Utility Library today!

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

I/O session live: Building geo services that scale

Posted by Laurence Moroney, Developer Advocate at Google

While at Google I/O, l had the opportunity to present the session ‘Building geo services that scale’. I’m pleased to share it more broadly for those of you who were not able to be there in person:
Building geo services that scale
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.
DSC_3206 (1).jpg

author image
About Laurence: I am a Developer Advocate at Google, working on mobile services, specializing in cross-platform developer technologies. As the host of 'Coffee with a Googler' on the Google Developers channel I’m able to meet with some of those most creative and inspiring developers at Google and learn about the projects they’re leading. When I’m not Googling, I’m involved in many things, including working on the revival comics for the Stargate TV shows, and enjoying the geek cred that this brings.


Behind the Australian Elections Map: Mapping democracy in real-time

It's elections time in Australia! With 94% of eligible Australians registered to vote, there will be close to 15 million participants this year.

Googlers in the Sydney office were recently chatting about the upcoming election and realized we all had similar questions: what were the results last cycle, where are the closest polling stations, and where do we look for real-time results on election day? Friends and family were asking the same questions, so we decided to build a solution using Google Maps APIs, Firebase, Google App Engine, Google Cloud Compute, Angular 2, the Google Translation Toolkit and Go.



The aim of the election map was to provide all the information that Australians would need to participate in the voting process. We wanted to cover pre-, mid- and post-election needs, including:

  1. A polling place locator with searchable addresses, suburbs, and electorates
  2. Directions and navigation to the polling places, accessible via the election map
  3. Real-time election results once polling has closed and counting has started
  4. The ability to share and embed maps.

UX mockup: map and fake election results using testing data

The pre-election map displays static electorate data, polling booths and ballot papers. It also indicates who won the electorate in the last 2013 election. To do this, we sourced 2013 election data from the Australian Electoral Commission (AEC) and stored it in a Go application intended for Google App Engine so that it could be served to the website frontend. The AEC provided us with data about electorate boundaries and polling place locations.

The website frontend was built using Angular 2 and we've used several open source projects, including GDAL, mapshaper and a point clustering library. These libraries allowed us to send only the required details for a user's viewport, while keeping data usage reasonably low and reducing visual noise.

Polling location information with address and directions intent
Day-of website visitors will have the ability to search for polling stations and learn about what services are available at each location (accessibility, sausage sizzle and/or cake stand). We sourced the sausage sizzle and cake stand data from Democracy Sausage and Snagvotes. We used the polling place ID to match these to the AEC polling place identifiers. We built a small Google Compute Engine app which sources the data from our sausage sizzle data sources and broadcasts it out to our live web application using Firebase Realtime Database.
Autocomplete searches for polling locations
To enable the search functionality, we use two different services in parallel. We first attempt to match the search query against the electorate list on the client. We also use the Google Maps Javascript API Places Library with Autocomplete to provide suggestions of what users might be searching for, including suburbs, places of interest and addresses. This gives our users the ability to select recommendations instead of having to type full queries.

Voters also need to plan their trip to the polling booths. We relied on Google Maps' existing real-time traffic information and turn-by-turn directions to provide directions functionality.

After 6pm on election night and when votes begin to be counted, we will switch the site to show real time election results. To do this, again we are using the AEC data feed and Firebase Realtime Database.

To make it really easy for people to visualize the elections results we employed a hemicycle (half donut circle) in the left sidebar to display real-time results. We also added "share" and "embed" features so people and media can easily share information about the election.

This project was put together by a cross-functional group of Google volunteers including software engineers, UX Designers, product managers and the legal and marketing teams. We'll all be voting on July 2nd, cake in hand. See you at the polls!

About Taylah: I am an Associate Product Manager at Google’s Sydney office where I work on Google Maps for Android Auto. I love working on Google Maps as you get to help millions of people explore the world every day. When I’m not at work, I love exploring beautiful places, shopping in thrift stores, painting and spending time with my family and friends.

Marker zIndex and more come to the Google Maps Android API

Released today, the latest version of the Google Maps Android API includes several popular developer requested features including the ability to order the display of markers on the map with the new marker zIndex property, the ability to set the transparency of your tile overlays, and a new circle click listener.

Marker zIndex

Marker zIndex is one of the most requested features on our issue tracker - today's release gives you the ability to control the order in which markers are displayed on the map [Issue 7762]. This gives you control over which tap target your user is most likely to hit by setting the zIndex property on each marker. The markers are drawn in order of the zIndex, with the the highest zIndex marker drawn on top.


animated image with cars moving over a plane

animated image with cars moving under a plane thanks to zIndex

Before: No control over the marker zIndex. The plane will be obscured by some of the cars. After: The zIndex of the plane is set to be the highest. The plane is now always visible on top.

Tile overlay transparency

Just like ground overlays, you can now set the transparency of your tile overlay to allow the basemap to show through [Issue 4765].

Circle clickability

Just like polylines and polygons, apps compiled with the latest release can now have circle clickability via the OnCircleClickListener. You can enable or disable the clickability of circles by calling setClickable(boolean) on the relevant circle.

getMapAsync() now required

In December 2014 we deprecated getMap() in favor of getMapAsync(). From this release onwards, you'll need to use getMapAsync() in order to compile your apps. Note that existing apps in the wild on your users' devices won't be impacted by this change as the getMap() method still exists within the Google Play Services APK that is delivered to Android devices.

If you haven't already done so, follow these steps:

Here's a sample fragment using the deprecated getMap(), with a fictitious doStuff() method that would implement the fragment's initial logic:
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.SupportMapFragment;

public class MainActivity extends FragmentActivity {

    private GoogleMap mMap;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        mMap = ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMap();
        doStuff();
    }

}


The above however was error prone, since getMap() could potentially return null. Here's the same sample using getMapAsync():

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import com.google.android.gms.maps.GoogleMap;
import com.google.android.gms.maps.OnMapReadyCallback;
import com.google.android.gms.maps.SupportMapFragment;

public class MainActivity extends FragmentActivity implements OnMapReadyCallback {

    private GoogleMap mMap;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        ((SupportMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)).getMapAsync(this);
    }

    @Override
    public void onMapReady(GoogleMap map) {
        mMap = map;
        doStuff();
    }

}

You can see we now implement the OnMapReadyCallback interface which defines the onMapReady() method, which will be called when the GoogleMap instance is ready. We’ve also moved the call to the fictitious doStuff() method into onMapReady(), since this is where we now want to start the fragment's initial logic.

A big thank you to Android developers everywhere for using the Google Maps Android API and submitting feedback via the issue tracker.

Our release notes contain details of bugs fixed, deprecation notices, as well as the features mentioned in this post. Take a look and start using our new features today!



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

Building for Scale: Updates to Google Maps APIs Standard Plan

Eleven years after a developer first reverse-engineered a Google Map, there are more than three million location-informed apps and websites generating billions of requests daily, all powered by Google Maps APIs. From unicorns to passion projects to public service, the power of maps and location data is limited only by the creativity of developers.

The Internet landscape has dramatically shifted from desktops to mobile devices in the last decade, and as a result, our services have evolved to meet the needs of our developers and their users. More devices means exponentially more requests, and hundreds of millions of global users are just coming online. Therefore, today we are announcing a few updates to bring more simplicity and consistency to our Standard Plan limits and pricing.

As of June 22, 2016 we are making the following changes to the Google Maps APIs Standard Plan:

  1. We no longer support keyless access (any request that doesn't include an API key). Future product updates are only available for requests made with an API key. API keys allow us to contact developers when required and help us identify misbehaving implementations.
  2. We have implemented a simple 25,000 map loads per day free limit to new Google Maps JavaScript API, Static Maps API, and Street View Image API implementations. The confusing 90-consecutive-day grace period for these APIs is being retired on October 12, 2016. With this change, developers can predictably plan for growth while media sites and US nonprofits can request more quota at no charge via our dedicated support programs.
  3. We have reduced the daily map load maximum limit you can purchase for Google Maps JavaScript API, Static Maps API, and Street View Image API from 1,000,000 to 100,000 requests per API.* We believe higher-volume developers are best served with a Premium Plan license, which includes technical support and a Service Level Agreement, and with this change we've also created consistency between Standard Plan quotas across our maps and web service APIs.
  4. We now count Google Maps JavaScript API client-side requests towards the daily limit of the associated web service API.*

The new policies will apply immediately to all Maps API implementations created on or after June 22nd, 2016.

Existing applications have been grandfathered based on their current usage to ensure that they continue to function both now and in the future. We will also be proactively contacting all existing API key users who, based on usage growth patterns, may be impacted in the future. If you’re an existing user, please take the time to read our Policy Update for Standard Plan summary for details on how each of these changes might affect your implementation.

Posted by Ken Hoetmer, Product Manager, Google Maps APIs

* Exceptions may apply for implementations that were exceeding new quotas prior to June 22, 2016.

Learn about developing geo applications over coffee with Ankur Kotwal and Ken Hoetmer



While at Google I/O, I had a chance to sit down for a cup of coffee with Ankur Kotwal, Developer Advocate at Google and Ken Hoetmer, Product Manager for the Google Maps APIs. Both had an interesting perspective on how maps have evolved and where they are headed.

In Ankur’s session we discussed technologies beyond the visualization aspects of maps, including the Directions API, Places API and Roads API. He highlighted innovative ways developers are using Google Maps APIs including VR, marker clustering and heatmaps. We also spoke about Santa Tracker, which Ankur has been a part of for four years (he also revealed what Santa likes to do during his time off). Ankur announced the new Google Maps APIs Beta program, so if you have not signed-up, head over to the site to apply.

Learn about developing Geo applications over Coffee with Ankur Kotwal

While speaking with Ken, we discussed how he started working with maps and the Google Maps API as well as how he eventually landed at Google on the Sydney maps team. Ken spoke about how use cases have evolved from interactive maps to more powerful applications and insights driven by location information made available through the APIs. He shared details about some newer APIs including native iOS and Android Places API, Roads API, Directions API and Predictive Travel Time (estimating travel time and routes based on now or in the future). He also highlighted some notable location-based intelligence use cases including Uber, GoJek, Dash Labs and the city of Sydney.

Google Maps APIs and Coffee with Product Manager Ken Hoetmer

About Laurence: I am a Developer Advocate at Google, working on mobile services, specializing in cross-platform developer technologies. As the host of 'Coffee with a Googler' on the Google Developers channel I’m able to meet with some of those most creative and inspiring developers at Google and learn about the projects they’re leading. When I’m not Googling, I’m involved in many things, including working on the revival comics for the Stargate TV shows, and enjoying the geek cred that this brings.