This repository was archived by the owner on Nov 30, 2018. It is now read-only.
This repository was archived by the owner on Nov 30, 2018. It is now read-only.
Initial coordinates seem to round for certain numbers triggering change event #1783
Closed
Description
I think Google maps is actually the cause of this.
When I create a map with certain coorinates e.g. lat=-32, lng=174.820940251555, a change event is triggered and the longitude gets changed to 174.82094025155493
I think an operation is happening in google maps causing the number to change slightly due to rounding on a double.
I work around this by hacking the code to only apply a change if it exceeds 174.820940251555-174.82094025155493=5.684341886080802e-14. This probably isn't the best solution as it's a mantissa accuracy/rounding issue, not the whole number.
Demo plnkr: http://plnkr.co/edit/D7IwzY2QVrxNurG5oDaW?p=preview