O'Reilly logo

Google Maps JavaScript API Cookbook by Balkan Uraz, Alper Dincer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding WKT to the Google Maps JavaScript API

Well-known Text (WKT) is a text markup language for representing vector geometry objects on the map according to Wikipedia. This format was originally defined by the Open Geospatial Consortium (OGC), which is also a standard.

Apart from XML or JSON, WKT is a defined text format that only defines geometries without properties compared to GeoJSON. It was an old and outdated format, but there are still software or services supporting this format. There are 18 distinct geometric objects that represent Earth features, but simple ones are observed in this recipe.

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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required