Turning down the Flash Maps API
Posted by Mano Marks, Developer Relations Team
Posted by Mano Marks, Developer Relations Team
People love to know what’s happening in their area of expertise around the world. What better way to show it, than on a map? Tech Comm on a Map puts technical communication tidbits onto an interactive map, together with the data and functionality provided by Google Maps.
Although this project is about technical communication, you can easily adapt it for other special interest groups too. The code is on GitHub.
When you hover over a circle, an info window pops up with information about the item you chose. If you click a circle, the map zooms in so that you can see where the event or group is located. You can also search for a specific location, to see what’s happening there.
Let’s look at the building blocks of Tech Comm on a Map.
Getting hold of a map
I needed a data entry and storage tool that provided a data entry UI, user management and authorization, so that I didn’t have to code all that myself. In addition, contributors shouldn’t need to learn a new UI or a new syntax in order to add data items to the map. I needed a data entry mechanism that is familiar to most people – a spreadsheet, for example.
In an episode of Google Maps Developer Shortcuts, Paul Saxman shows how to pull data from Google Drive into your JavaScript app. That’s just what I needed. Here’s how it works.
The data for Tech Comm on a Map is in a Google Sheets spreadsheet. It looks something like this:
With the basic JavaScript API you can add separate objects to the map, such as a polygon, a marker, or a line. But by using the Data layer, you can define a collection of objects and then manipulate and style them as a group. (The Data layer is also designed to play well with GeoJSON, but we don’t need that aspect of it for this project.)
The tech comm data is represented as a series of features in the Data layer, each with a set of properties (type, name, address, etc) and a geometry (latitude and longitude).
Style the markers on the map, with different colors depending on the data type (conference, society, group, etc):
Posted by Sarah Maddox, Google Developer Relations team.
Maps had a great I/O 2014, with four sessions and three I/O Bytes. Not to mention all the partners in the sandbox who were using the Maps API!
For those who want to relive Google I/O, or catch up on sessions you missed, we’ve created a playlist of Maps videos:
Enjoy watching, and happy mapping!
Posted by Mano Marks, Developer Relations Team
Until today, Places API developers had to work with a dual-ID system: IDs (id) were used to compare places and References (reference) were for fetching a place’s information. The new Place IDs (place_id) can serve both those purposes, and are also shorter and simpler than the typically long and unwieldy References.
With today’s launch, Place IDs will be returned in all responses that include the existing ID and Reference fields, and they can also be used instead of References to uniquely identify a place in Place Details requests. We believe Place IDs have clear functional and simplicity benefits over the previous ID and Reference system, and we’ll be removing IDs and Reference support from the Places API a year from now, on June 24th, 2015.
While Google strives to bring developers the freshest local data, sometimes users know about places before we do, and we want to make sure they can add and interact with new places right away. That’s why the Places API has an Add-a-Place feature, that with today’s update, can also include a new place’s address, website, and phone number in the request.
This additional data will be automatically associated and returned with the new place, so end-users can benefit from additional useful place information without forcing developers to store extra data. The new fields also help streamline Google’s internal place moderation process, which augments Google’s places repository with places added via the Places API, leading to more up-to-date, comprehensive, and accurate local data for everyone.
A great example of how to integrate the Add-a-Place feature is Zodio, a popular social location-based app from Thailand. They use the Places API’s Add-a-Place feature in their check-in experience so their users can always share where they are, even if the place is currently missing from the Places API.
Please visit our developer documentation to learn more about the Places API. As you build the next awesome location-based app, please post any questions to our StackOverflow community and send us feedback via the Google Maps API Issue Tracker.
In the past few years we’ve seen GeoJSON explode as a method to share geographic data and developers are using GeoJSON to create amazing visualizations. As a consequence, however, we’re seeing less interest in non-customizable layers directly provided by API providers.
So, starting today, we will begin sunsetting the Google Maps JavaScript API v3 Panoramio Library and Weather Library. Per the terms of our deprecation policy, the Panoramio, weather, and cloud layers served by these libraries will continue to function until one year from today and will be removed on June 4, 2015.
We’d also like to remind developers that the Flash Maps API’s deprecation period ends on September 2, 2014. The Flash Maps API will shut down on that date, so if you’re still using the API, it’s time to start planning your migration.
If you have any questions about these announcements, our friendly developer relations team is always happy to help. Please tag questions with ‘google-maps-api-3’ on StackOverflow and we’ll respond shortly.
Posted by Ken Hoetmer, Product Manager, Google Maps APIs
The new release of the Google Maps Android API v2 is now available! Read on to find out about Street View and programmatic control of indoor maps available in the Google Play Services 4.4 release.
Street View
Street View is here! Let your users navigate through Street View’s panoramic 360-degree views themselves, or programmatically control the zoom and orientation of the Street View camera. You can enable and disable Street View controls and gestures, as well as toggle the display of street names on or off. The Street View coverage available through the Google Maps Android API v2 is the same as that for the Google Maps for Android app on your Android device. Take a look at these two apps using Street View to help users get even more out of their experience.
Runtastic Running & Fitness, which helps people map and track their fitness activities, now features Street View. When you review a completed activity, Street View panoramas of places you’ve passed by are presented as a slideshow. You can even go full screen to explore the surroundings of your route in greater detail.
Do you have a store locator in your app, but wish that users could tell whether your store is in a strip mall or on the street? Now you can! You can even bring users into your store using Business View. The same StreetViewPanorama
object provides seamless access to both indoor Business View and outdoor Street View imagery.
The Walgreens App has integrated Google Street View with its Store Locator feature, making it easier than ever for Walgreens customers to get in, get out and get on with their day. With the updated Store Locator feature, customers can easily find a Walgreens, access store details and view the store location up close.
Programmatic Control of Indoor Maps
In this release, we’ve added programmatic control to Indoor Maps. You can disable the default level picker (floor picker) by calling setIndoorLevelPickerEnabled(false)
and add your own custom level picker instead. You can also determine which building and level is currently in focus and set a listener to be called when a new building comes into focus or a new level is activated within a building. This is particularly useful if you want to show custom markup for the active level.
We’re always interested to hear how you’re using Google Maps APIs, so let us know if you’ve got something cool to show by tagging +Google Maps API on your posts (or comment right here). For technical questions that aren’t answered in the developer documentation, check out the Google Maps developer community on Stack Overflow. Don’t forget to tell us what you’d like to see in the next release using the Google Maps API issue tracker.
Posted by Megan Boundey, Product Manager, Google Maps Mobile SDKs
Are you an iOS developer interested in adding a map to your application? The instructional experts at Code School set out to create a course introducing the Google Maps SDK for iOS to developers like you — and they delivered!
Exploring Google Maps for iOS is a free course covering everything from adding a simple map, to using geocoding and directions, to incorporating Street View in iOS. You’ll end up with a working sample application and gain the knowledge you need to build your own amazing Google Maps-based apps. Learn from videos, sample code, and Xcode-based coding challenges.
Check out the introduction video below, and then head over to Code School to get started with their interactive course!
You can also read our official developer documentation and reference docs at https://developers.google.com/maps/documentation/ios/.
Posted by Mike Jeffrey, Maps API Team
We recently announced the launch of the data layer in the Google Maps JavaScript API, including support for GeoJSON and declarative styling. Today we’d like to share a technical overview explaining how you can create great looking data visualizations using Google Maps.
Data provided by the Census Bureau Data API but is not endorsed or certified by the Census Bureau.
|
In addition to the coloring, we’ve created an interactive element by adding events that respond to mouse activity. When you hover your mouse cursor (or finger) over a region with data, the border becomes heavier and the data card is updated with the selected value.
We’ve also used a custom basemap style in this example to provide some contrast to the colorful data.
Check out Google Maps Engine if you need somewhere to store your geospatial data in the cloud, as we’ve done here. If you have any questions on using these features, check out the docs for the data layer and the Maps Engine API or head over to Stack Overflow and ask there. You can also check out this article’s permanent home, where the interactive version lives.
Maps give us an easy way to visualize all types of information, from patterns in health expenditure across the world, to oceans with the highest concentration of coral reefs at risk. The tools used to create these maps should be just as easy to use. That’s why, starting today, the JavaScript Maps API will support GeoJSON, making it simpler for developers to visualize richer data, with even cleaner code.
GeoJSON has emerged as a popular format for sharing location-based information on the web, and the JavaScript Maps API is embracing this open standard. This means, as a developer, you can now pull raw data from multiple data sources, such as the US Geological Survey or Google Maps Engine, and easily display it on your website.
How does it work? The new Data layer allows you to treat a dataset like… well, a set of data, rather than individual and unrelated features. If you have a GeoJSON file, you can now load it on the map simply by adding a single line of code to your JavaScript:
Tada! And what’s more, most places have attributes beyond just location: stores have opening times, rivers have current speed, and each Girl Guide troop has cookie selling turf. The Data layer allows you to represent all attributes in GeoJSON right on the map and make decisions about what data to display more easily.
You can use this information to create a styling function that says, “show the earthquakes as circles, scaled to their magnitude” and as the data or rules are updated, the styling will automatically be applied to every feature. This beats having to manually update each feature or rule as more information is added to the map.
Get started by checking out our developer docs, the code for these earthquake maps, this cool demo showing data from different sources, and this Google Developers Live video. This is a new feature, so if you run into problems or think of any additions you’d love to see, get help on StackOverflow and check our support page for the right tags to use.
We’re looking forward to seeing what you build with this new tool and, as always, we’re eager for your feedback. Please comment on this post or on our Google+ Page.
Posted by Jen Kovnats, Product Manager on the Maps API Team
Posted by Josh Livni, Maps API Team
Since we introduced the ability to embed the new Google Maps, a growing number of sites across the web have been helping their visitors visualize and remember places, using maps built for them. However, we know that many sites require multiple maps, and repeatedly generating them can be a challenge.
Today we’re making this easier by launching the Google Maps Embed API, giving developers the ability to generate HTML snippets that embed Google Maps within their own website. Using the API to take control of your embedded maps, you can now effortlessly customize the location and appearance of the map with a handful of simple URL parameters.
For example, our friends at the Guggenheim in New York are using the Google Maps Embed API, allowing visitors to save the location to Google Maps directly from the website. Visitors can then quickly plan their day and navigate to the museum by pulling up their saved places on any device with Google Maps.
Over in San Francisco, SFMOMA is using the Google Maps Embed API to show the museum’s temporary exhibit locations. Visitors can get easily get directions to these locations and save them to Google Maps for later viewing on any of their devices.
In addition, over the coming weeks, we’ll be updating existing classic Google Maps embeds to the new format so visitors can enjoy a consistent embedded Google Maps experience across the web. This also means that starting today, the Maps/Earth APIs Terms of Service will apply to all updated embedded Google Maps.
Finally, as with our existing embedded maps, the Google Maps Embed API is free and without limits, and the new API also includes the same on-map ad experience we introduced to embedded maps in November.
To get started, head over to our developers page and embed away!
Posted by Ben Greenwood and Ken Hoetmer, Product Managers, Google Maps APIs
A new version of the Google Maps Android API Utility Library is now available, which includes some cool new data visualisation features – marker clustering and heatmaps.
Marker ClusteringWhen you have a lot of data to show, it can be hard to keep your…
A new release of the Google Maps SDK for iOS is now available! Read on to find out about the new features included in v1.7.
In this release we’ve included gradient polylines which allow you to apply different colors to different segments of your polylines. This allows you to easily indicate changes along your polyline such as speed or elevation.
There are two options:
The example below visualizes the elevation along a route using a gradient polyline.
In the past, our reverse geocoder, GMSGeocoder
, has responded to a latitude/longitude request with the address as a formatted string. In v1.7, GMSGeocoder
can return the address as a GMSAddress
object, enabling you to easily access the different parts of an address without needing to parse a string. For example if you’re only interested in the country, this is available as address.country. Check out the developer guide for further information about the properties available to you.
The comgooglemaps URL scheme lets you launch Google Maps for iOS, displaying the map at a particular location and zoom level, showing the results of a search, or showing directions. In addition to driving, public transit and walking directions, we’ve now added biking directions to the URL scheme.
There may be times, though, when you want to open Google Maps for iOS directly from within your app, but also want to provide the ability for users to easily return to your app via a back button when they are finished. X-callback-url, an open specification for inter-app communication and messaging between iOS apps, lets you do just that. We’ve documented how to use x-callback-url to launch Google Maps for iOS, and also how to help guide users back to your app when they are ready.
Finally, some of you may know that Google Maps for iOS now has some higher fidelity 3D buildings. If you’d like your app to have access to these 3D buildings, you’ll need to upgrade to v1.7 of the Google Maps SDK for iOS. Check out our favorite, the Eiffel Tower!
We’ve also included a few bug fixes which you can read about in the release notes.
We’re always interested to hear how you’re using the Maps APIs, so let us know if you’ve got something cool to show by tagging +Google Maps API on your posts (or comment right here). For technical questions that aren’t answered in the developer documentation, check out the Google Maps developer community on Stack Overflow. Don’t forget to tell us what you’d like to see in the next release using the Google Maps API issue tracker.
Posted by Megan Boundey, Product Manager, Google Maps Mobile APIs