d3-geo icon indicating copy to clipboard operation
d3-geo copied to clipboard

path.bounds should return numbers even when input coordinates are strings

Open Fil opened this issue 2 years ago • 0 comments

d3.geoPath().bounds({type: "MultiPoint", coordinates: [["-32", "-20"], [32, 20]]})

returns [["-32", "-20"], [32, 20]]. I suggest we coerce the coordinates to numbers in https://github.com/d3/d3-geo/blob/078f46d9a4b9079ddd6d382cfea81dd9c5a284ef/src/path/bounds.js#L21

related https://github.com/observablehq/plot/issues/1264

Fil avatar Feb 09 '23 18:02 Fil