Google Adds GeoJSON Support For Mapping
Google has added support for the GeoJSON data format to the JavaScript Maps API, allowing developers to create 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.
Simpler development
“Starting today, the JavaScript Maps API will support GeoJSON, making it simpler for developers to visualise richer data, with even cleaner code,” wrote Jen Kovnats, product manager for the Maps API team, in an 18 March post on the Google Geo Developers Blog.
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 US 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.”
Maps developer features
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.”
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 customise 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 programme. Under the Google Maps Engine public data programme, organisations 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 programme provides advanced tools that allow map producers to publish their public mapping content to the world. Organisations that produce maps, such as public data providers and governments that have content in the public good, can apply to participate in the programme, 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 visualise their huge amounts of critical data on maps so they can take advantage of the new resources the data provides, according to Google.
Do you know all about Big Data and large-scale analytics? Take our quiz!
Originally published on eWeek.