A point is itself; a multipoint, its first point; a line, its middle VERTEX — a position
that lies on the line, which a route can be drawn to; anything else, the centre of its
box. ⚠️ The centre of a concave polygon's box may fall outside it: this answers "where to
look", not "a point inside".
Parameters
geometry: unknown
A GeoJSON geometry.
Returns {lat:number;lng:number}|null
{ lat, lng }, or null when the geometry holds no valid position.
One position that stands for a geometry.
A point is itself; a multipoint, its first point; a line, its middle VERTEX — a position that lies on the line, which a route can be drawn to; anything else, the centre of its box. ⚠️ The centre of a concave polygon's box may fall outside it: this answers "where to look", not "a point inside".