| Issue 9424: | LatLng bug when using {lat: 0, lng: 0} | |
| 2 people starred this issue and may be notified of changes. | Back to list |
var coord = new google.maps.LatLng({lat: 0, lng: 0});
coord.lat()//gives NaN, should give 0
coord.lng()//gives NaN, should give 0
Using it as
coord = new google.maps.LatLng(0, 0)
works fine, both coord.lat() and coord.lng() gives 0 as expected.
Bug is in function google.maps.LatLng, the conditional
if (a && (a.lat || a.lng)) is WRONG,
it should check for
if (a && (!isNaN(a.lat) || !isNaN(a.lng)))
or similar.
Mar 20, 2016
This issue has been fixed in the latest experimental release.
Status:
Fixed
|
|
| ► Sign in to add a comment |
Owner: [email protected]
Labels: Internal-27571206