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 coding, we will go through the WKT format, split them into arrays, and read the coordinates one by one. Then, we will show the feature on the map according to its type, which can be point, polyline, or polygon.
In this recipe, we will...