The Geometry Library in Maps JavaScript API will do basic spatial calculations, including:
- Area
- Distance
- Heading
- Length
- Point-on-Edge
- Point-in-Polygon
Geometry Library is not enabled by default, it is an optional supplemental library. To include Geometry Library, add &libraries=geometry to the bootstrap URL when you load Maps JavaScript API.
Need more functions than Geometry Library provides? Check out Turf. Turf is an open-source JavaScript library for performing spatial analysis. It'll work client-side in the browser or server-side in Node.js. Turf operates on GeoJSON data, making it a perfect complement to Data Layer.
Related
Which data sources does Google Maps JavaScript API support for visualizing my own data?
References
Maps JavaScript API - Geometry Library
Comments
0 comments
Article is closed for comments.