Google Maps Developers Gain GeoJSON Support for Richer Maps

By Todd R. Weiss  |  Posted 2014-04-06

Google Maps Developers Gain GeoJSON Support for Richer Maps

Google has given Google Maps developers another helpful tool for their Maps-building arsenal now that the JavaScript API supports the GeoJSON format. The addition means that Google Maps developers will be able to use GeoJSON to encode a wide range of geographic data structures in their maps.

And what that means, according to Google, is that Maps developers will be able to produce more detailed maps while producing better code.

"Maps give us an easy way to visualize all types of information, from patterns in health expenditure[s] across the world, to oceans with the highest concentration of coral reefs at risk," wrote Jen Kovnats, product manager for the Maps API team, in a March 18 post on the Google Geo Developers Blog. "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, which is a geospatial data interchange format based on JavaScript Object Notation (JSON), "has emerged as a popular format for sharing location-based information on the Web, and the JavaScript Maps API is embracing this open standard," wrote Kovnats. "This means, as a developer, you can now pull raw data from multiple data sources, such as the U.S. Geological Survey or Google Maps Engine, and easily display it on your Website."

For developers, that means that the new data layer "allows you to treat a dataset like… well, a set of data, rather than individual and unrelated features," wrote Kovnats. "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."

In addition, Maps developers using the new feature will be able to add more information to their maps for users, she wrote. "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."

The new code feature also means that developers can create a styling function with specific attributes and that as the data or rules are updated, "the styling will automatically be applied to every feature," wrote Kovnats. "This beats having to manually update each feature or rule as more information is added to the map."

More information about the updated JavaScript API with GeoJSON support is included in the latest developer docs, as well as a demo showing data from different sources and a Google Developers Live video, wrote Kovnats. "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."

Google Maps Developers Gain GeoJSON Support for Richer Maps

Google is often adding new features to its Google Maps tools for developers.

In March 2014, Google unveiled a new Google Maps Embed API that aims to make it easier for Website designers to place detailed Google Maps into Web pages so that customers can locate their physical locations more easily. The new API improves on a previous move by Google in December 2013, when the search giant began allowing Website owners and bloggers to embed and use Google Maps images for free. Using the new Google Maps Embed API, developers can now more easily customize the location and appearance of a map with a handful of simple URL parameters, according to a previous eWEEK report.

Use of the new Google Maps Embed API is free. The new API includes the same on-map advertising capabilities that were unveiled last December when the use of the Maps was extended for free.

Earlier in December 2013, Google Maps announced that it was gaining some spectacular map imagery from the National Geographic Society, which is contributing some 500 of its maps to Google Map's new public data program. Under the Google Maps Engine public data program, organizations can now distribute their map content to consumers using Google's cloud infrastructure, according to Google. And that's where National Geographic's contribution came in, bringing digital images of many of the long-popular printed maps that are often tucked inside the latest issues of the magazine. To do that, National Geographic uses the Google Maps Engine to overlay the maps with interactive editorial content so the maps can tell stories and raise awareness about environmental issues and historic events.

The Google Maps Engine public data program provides advanced tools that allow map producers to publish their public mapping content to the world. Organizations that produce maps, such as public data providers and governments that have content in the public good, can apply to participate in the program, according to Google.

In October 2013, Google released Google Maps Engine Pro to make it easier for businesses to use online maps to attract customers and new revenue. The new professional mapping tool lets businesses visualize their huge amounts of critical data on maps so they can take advantage of the new resources the data provides, according to Google.

Rocket Fuel