Being able to visualize data is often crucial to understanding it completely–and this is especially true for geo data. To help with this, Google Maps Platform enables you to add markers, lines, and shapes to a map programmatically. Depending on your purpose, whether you want to share or store the data, and the source of your data, working with specific formats can make the job easier. Today we’ll look at two different formats that you can easily add to Google Maps Platform projects for quick map layer visualizations: GeoJSON and GeoRSS.
Here’s an example GeoJSON file with a single location:
This describes the location of an early capitol building: Congress Hall in Philadelphia, Pennsylvania.
Alternatively, you can load an external file using
loadGeoJson and include it in the map as a Data Layer. For more on this approach to GeoJSON, see the Data Layer documentation.
GeoRSS, derived from syndication format RSS
You may want to add geographic data to an existing content feed. GeoRSS is the right choice, as it’s a data format designed to work with RSS feeds. For example, a travel blog could include geotagged places with every post, which could then be added to a map. The GeoRSS feed could also be standalone and not delivered with other content.
There are two versions: GeoRSS-simple and GeoRSS GML. GeoRSS-simple is designed to be really quick and straightforward, great for most Google Maps Platform use cases, and is the format you’ll probably use most often. But for more on GeoRSS GML, especially if working with different coordinate systems, see the GeoRSS site.
You can make a point with GeoRSS-simple like so:
In this example, the data represents the location of another early US capitol building: Federal Hall in New York City.
When you load this map, you’ll see markers read in from the Flickr GeoRSS file.
For more information on Google Maps Platform, visit our website.
Feed Source: Cloud Blog
Article Source: Quick Map Layer Visualizations with GeoJSON and GeoRSS