bounds method
Returns the projected planar bounding box (typically in pixels) for the
specified GeoJSON object
.
path.bounds(california) // [[18.48513821663947, 159.95146883594333], [162.7651668852596, 407.09641570706725]]
The bounding box is represented by a two-dimensional array: [[x₀, y₀], [x₁, y₁]], where x₀ is the minimum x-coordinate, y₀ is the minimum y-coordinate, x₁ is maximum x-coordinate, and y₁ is the maximum y-coordinate. This is handy for, say, zooming in to a particular feature. (Note that in projected planar coordinates, the minimum latitude is typically the maximum y-value, and the maximum latitude is typically the minimum y-value.) This method observes any clipping performed by the transform; see GeoProjection.clipAngle and GeoProjection.clipExtent. This is the planar equivalent of geoBounds.
Implementation
List<List<num>> bounds(Map object) => planar.bounds(object, _transformStream);