explicit radix
This commit is contained in:
parent
61b3ea3f37
commit
8c17bc9e4f
|
@ -314,8 +314,8 @@ S2.S2Cell.prototype.getNeighbors = function() {
|
||||||
var L = {};
|
var L = {};
|
||||||
|
|
||||||
L.LatLng = function (/*Number*/ rawLat, /*Number*/ rawLng, /*Boolean*/ noWrap) {
|
L.LatLng = function (/*Number*/ rawLat, /*Number*/ rawLng, /*Boolean*/ noWrap) {
|
||||||
var lat = parseFloat(rawLat);
|
var lat = parseFloat(rawLat, 10);
|
||||||
var lng = parseFloat(rawLng);
|
var lng = parseFloat(rawLng, 10);
|
||||||
|
|
||||||
if (isNaN(lat) || isNaN(lng)) {
|
if (isNaN(lat) || isNaN(lng)) {
|
||||||
throw new Error('Invalid LatLng object: (' + rawLat + ', ' + rawLng + ')');
|
throw new Error('Invalid LatLng object: (' + rawLat + ', ' + rawLng + ')');
|
||||||
|
|
Loading…
Reference in New Issue