Adding GeoJSON to the Google Maps JavaScript API

XML is the first hero of services in the Web 2.0 zone. With the help of XML, services or machines can easily communicate between them. XML can also be readable by humans. But after browser evolution, JSON has become much more popular due to its native readability for JavaScript and its lightweight compared to XML. GeoJSON is a form of JSON that includes collections of simple features such as points, polylines, or polygons. GeoJSON is not a standard of OGC, but it is a new de facto standard used by most GIS software or services.

The Google Maps JavaScript API does not support GeoJSON natively, but GeoJSON support will be added with a few lines of coding or with some additional libraries. With coding, ...

Get Google Maps JavaScript API Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.