Skip to content

Commit

Permalink
parseFloat fix for toFixed, also 5 not 6, closes #9
Browse files Browse the repository at this point in the history
  • Loading branch information
simonw committed Dec 17, 2021
1 parent f4b25e1 commit 3ecd505
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function configureMap(input) {
let geojson = {
type: "MultiPolygon",
coordinates: event.latLngs.map((shape) => [
shape.map((p) => [p.lng.toFixed(6), p.lat.toFixed(6)]),
shape.map((p) => [parseFloat(p.lng.toFixed(5)), parseFloat(p.lat.toFixed(5))]),
]),
};
input.value = JSON.stringify(geojson);
Expand Down

0 comments on commit 3ecd505

Please sign in to comment.